[PATCH 3/3] 82xx: SBCPQ2 board platform support

Segher Boessenkool segher at kernel.crashing.org
Wed Jul 18 02:30:56 EST 2007


>>>>> +	np = of_find_compatible_node(NULL, "cpm-pic", "CPM2");
>>>>> +	if (np == NULL) {
>>>>> +		printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
>>>>> +		return;
>>>>> +	}
>>>>
>>>> This looks like your device tree is wrong. Shouldn't the interrupt
>>>> controller have device_type="interrupt-controller" and a specific
>>>> compatible property instead of having the name in the device_type?

So, I looked it up :-)

The device_type should specify the specific interrupt
controller programming model, because a real OF typically
needs to know the meaning of the interrupt specifiers;
also, when the interrupt binding recommended practice
isn't used, it is needed to know the #interrupt-cells
(which is implicit from the device_type in that case).

If there is no defined binding for your interrupt
controller, just don't put a device_type in your tree at
all, for flat device trees.

>>> Here, I just copy the codes from mpc82xx_ads, is there anything  
>>> wrong?
>>
>> I just checked the Recommended Practice document for interrupt  
>> mapping
>> and it seems that it's ok. The interrupt controller needs to have
>> an property named "interrupt-controller", but does not need a  
>> specific
>> device_type. So it appears to be correct here.

Please also look at the base specifications, not just
the imap thing.  But you reached the correct conclusion.


Segher




More information about the Linuxppc-dev mailing list