[PATCH 1/4] [POWERPC] 85xx: add board support for the TQM8548 modules

Wolfgang Grandegger wg at grandegger.com
Fri May 30 17:12:54 EST 2008


Stephen Rothwell wrote:
> Hi Wolfgang,
> 
> On Fri, 30 May 2008 08:49:45 +0200 Wolfgang Grandegger <wg at grandegger.com> wrote:
>> +++ b/arch/powerpc/platforms/85xx/tqm85xx.c
>> @@ -120,8 +120,17 @@ static void __init tqm85xx_setup_arch(void)
>>  #endif
>>  
>>  #ifdef CONFIG_PCI
>> -	for_each_compatible_node(np, "pci", "fsl,mpc8540-pci")
>> -		fsl_add_bridge(np, 1);
>> +	for_each_node_by_type(np, "pci") {
>> +		if (of_device_is_compatible(np, "fsl,mpc8540-pci") ||
>> +		    of_device_is_compatible(np, "fsl,mpc8548-pcie")) {
>> +			struct resource rsrc;
>> +			of_address_to_resource(np, 0, &rsrc);
> 
> What happens if of_address_to_resource fails?

Checking the return code is missing, of course. Obviously a cut & paste
from a bad source (sbc8548.c).

Will fix.

Wolfgang.




More information about the Linuxppc-dev mailing list