RFC: [PATCH] platform device driver model support
Mark A. Greer
mgreer at mvista.com
Fri Jan 14 04:34:35 EST 2005
Kumar Gala wrote:
>> My $0.02.
>>
>> I didn't go thru in complete detail but I like the idea. I have a
>> couple minor comments, though.
>>
>> 1) Can we pick something other than 'soc' since the Marvell bridges
>> really aren't SOCs? I don't really know what is better but just to
>> throw something out, how about haing them all look like ppc_pd_xxx()?
>
>
> What about ppc_plat_xxx() or ppc_sys_xxx() [for system]? 'sys' maybe
> more consistent with our naming conventions in that arch/ppc/platforms
> is more board focused, and arch/ppc/syslib is bridge and non-core chip
> functionality.
ppc_sys_xxx() sounds good to me.
>
>
>> 2) In 8540_ads.c you're digging out platform_device entries and
>> modifying them in your mpc8540ads_setup_arch() routine. I think the
>> platform_device "way" of doing that would be to make your mods via the
>> platform_notify() hook (eventually called by device_add() which was
>> ultimately called from platform_add_devices()).
>
>
> This is problematic for some things like the updating of the IOMEM
> resources since that needs to occur before platform_device_register is
> called.
I don't think so. In fact, the platform_notify() will be called from
[platform_add_devices()]/platform_device_register()/device_register()/device_add()/platform_notify().
There is an example in the bk://source.mvista.com/linux-2.5-marvell tree
inside arch/ppc/platforms/katana.c. It was only a suggestion anyway, so
its not a big deal.
Mark
More information about the Linuxppc-embedded
mailing list