[PATCH v2 02/23] at91: Make Ethernet device common

Ryan Mallon ryan at bluewatersys.com
Tue Apr 26 01:26:56 EDT 2011


On 04/26/2011 04:35 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 08:16 Tue 26 Apr     , Ryan Mallon wrote:
>> On 04/22/2011 11:02 AM, H Hartley Sweeten wrote:
>>> On Wednesday, April 20, 2011 10:42 PM, Ryan Mallon wrote:
>>>>
>>>> Replace the individual Ethernet device code for each at91 variant with
>>>> a single implementation in devices.
>>>>
>>>> Signed-off-by: Ryan Mallon <ryan at bluewatersys.com>
>>>> ---
>>>>
>>>>  arch/arm/mach-at91/at572d940hf.c         |    4 +
>>>>  arch/arm/mach-at91/at572d940hf_devices.c |   83 +++++++----------------
>>>>  arch/arm/mach-at91/at91cap9.c            |    4 +
>>>>  arch/arm/mach-at91/at91cap9_devices.c    |  103 ++++++++++------------------
>>>>  arch/arm/mach-at91/at91rm9200.c          |    4 +
>>>>  arch/arm/mach-at91/at91rm9200_devices.c  |  103 ++++++++++------------------
>>>>  arch/arm/mach-at91/at91sam9260.c         |    4 +
>>>>  arch/arm/mach-at91/at91sam9260_devices.c |  104 +++++++++++------------------
>>>>  arch/arm/mach-at91/at91sam9263.c         |    4 +
>>>>  arch/arm/mach-at91/at91sam9263_devices.c |  102 ++++++++++------------------
>>>>  arch/arm/mach-at91/at91sam9g45.c         |    4 +
>>>>  arch/arm/mach-at91/at91sam9g45_devices.c |  108 +++++++++++-------------------
>>>>  arch/arm/mach-at91/devices.c             |   61 +++++++++++++++++
>>>>  arch/arm/mach-at91/devices.h             |   10 +++
>>>>  14 files changed, 309 insertions(+), 389 deletions(-)
>>>>
>>>> diff --git a/arch/arm/mach-at91/at572d940hf.c b/arch/arm/mach-at91/at572d940hf.c
>>>> index a6b9c68..48c1ec2 100644
>>>> --- a/arch/arm/mach-at91/at572d940hf.c
>>>> +++ b/arch/arm/mach-at91/at572d940hf.c
>>>> @@ -34,6 +34,8 @@
>>>>  #include "generic.h"
>>>>  #include "clock.h"
>>>>  
>>>> +extern void at572d940hf_init_devices(void);
>>>
>>> You might consider moving this, and all the other similar externs, to the generic.h
>>> header.  That's where all the other platform init functions are defined.
>>
>> I put the externs in the .c files since that is the only place they are
>> actually called from. What is the general consensus on this?
> no I do not want to 1000 of export function again
> 
> with the new soc we do not need it anymore

Yes. In merging with your patch the init_devices function can become a
member of struct at91_soc, which removes this whole problem.

~Ryan

-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan at bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934



More information about the linux-arm-kernel mailing list