[OpenBIOS] [PATCH] Make interrupts work on newworld machines

Alexander Graf agraf at suse.de
Sun Dec 20 02:51:00 CET 2009


Am 20.12.2009 um 00:26 schrieb Benjamin Herrenschmidt <benh at kernel.crashing.org 
 >:

> 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.

Yes, it's completely arbitrary.

I looked up what the properties look like on the powerstation and it  
had a setup exactly like this.
  In fact, the irq lookup debug code in linux breaks when ch-a does  
not define an interrupt parent.

I'm totally open to alternatives or hints what real hw does!
>

Alex


More information about the OpenBIOS mailing list