On Sat, Feb 06, 2016 at 10:23:33PM +0000, Alyssa Milburn wrote:
On Sat, Feb 06, 2016 at 05:12:19PM -0500, Tarl Neustaedter wrote:
On 2016-Feb-6 17:02 , Alyssa Milburn wrote:
chosen = find_dev("/chosen");
push_str(buf);
fword("open-dev");
set_int_property(chosen, "interrupt-controller", POP());
/chosen won't have an "open" method, so the open-dev will fail. You probably don't need the open-dev anyway, you should be able to call set_int_property with the chosen phandle without doing an open on it. That is, delete the 3rd line of the above, it probably works.
I'm trying to open the openpic (at the path in 'buf'), but you're right, it doesn't have an open..!
"interrupt-controller" in /chosen is supposed to contain a phandle, not an ihandle. Try something like
chosen = find_dev("/chosen"); ic = find_dev(buf); set_int_property(chosen, "interrupt-controller", ic);
Segher