[PATCH/2.6.17-rc4 1/10] Powerpc: Add general support for mpc7 448h pc2 (Taiga) platform

Kumar Gala galak at kernel.crashing.org
Fri May 19 02:43:59 EST 2006


On May 18, 2006, at 1:57 AM, Zang Roy-r61911 wrote:

>
>> On Wed, 2006-05-17 at 08:45 -0500, Kumar Gala wrote:
>>
>>>> +#ifdef TSI108_ETH
>>>> +hw_info hw_info_table[TSI108_ETH_MAX_PORTS + 1] = {
>>>> +	{TSI108_CSR_ADDR_PHYS + TSI108_ETH_OFFSET,
>>>> +	 TSI108_CSR_ADDR_PHYS + TSI108_ETH_OFFSET,
>>>> +	 TSI108_PHY0_ADDR, IRQ_TSI108_GIGE0},
>>>> +
>>>> +	{TSI108_CSR_ADDR_PHYS + TSI108_ETH_OFFSET + 0x400,
>>>> +	 TSI108_CSR_ADDR_PHYS + TSI108_ETH_OFFSET,
>>>> +	 TSI108_PHY1_ADDR, IRQ_TSI108_GIGE1},
>>>> +
>>>> +	{TBL_END, TBL_END, TBL_END, TBL_END}
>>>> +};
>>>> +#endif
>>>
>>> This table looks problematic.  Look at using something like a
>>> platform device.
>>
>> Bzzzt ... wrong answer :) That's a textbook example of stuff
>> that should
>> be provided via the device-tree.
>>
>>
>
> Well , should I register this data to a platform device or the  
> Ethernet
> driver get the information from device-tree directly?

I'd say the later.  Ben mentioned use of of_device which will allow  
you to do that more directly.  I used platform_device to maintain the  
fact that we had existing drivers to support that were using it already.

- k



More information about the Linuxppc-dev mailing list