On Sat, 2009-12-19 at 00:50 +0100, Alexander Graf wrote:
On 19.12.2009, at 00:43, Andreas Färber wrote:
Am 18.12.2009 um 23:44 schrieb Alexander Graf:
Index: drivers/escc.c
--- drivers/escc.c (revision 644) +++ drivers/escc.c (working copy) @@ -418,6 +418,11 @@ OLDWORLD(set_property(dnode, "AAPL,interrupts", (char *)&props, 1 * sizeof(cell)));
- props[0] = 0;
- props[0] = (0x24) + offset;
It's probably a stupid question again, but is there a reason to double-initialize props[0]? Shouldn't one of them go to a different index or the first one be dropped?
Yes, but the real question is a different one.
[01:02] benh: so any node whose interrupt parent is directly the MPIC will have 2 cells per interrupts [01:02] benh: the first one is the line number, the second is polarity/sense
So I guess props[0] is correct, but props[1] needs to define if it's edge/level(?).
And that encoding depends on what the parent PIC is. I don't think the drivers should setup their own interrupt properties that way anyways.
Platform code in forth should layout that stuff. Where does that 0x24 come from anyways ? It's just arbitrary crap. Nothing to do in the escc driver itself.
Cheers, Ben.