Re: [PATCH] MIPS: Alchemy: move MMC driver registration to board code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 9, 2010 at 12:51 PM, Sergei Shtylyov <sshtylyov@xxxxxxxxxx> wrote:
> Manuel Lauss wrote:
>
>>>> Where it really belongs to.
>>>
>>> I disagree (again). SoC platform devices dont belong with the board code.
>>>
>>
>> Figured as much.  However with additional boards the #ifdef mess in
>> common/platform.c
>> is only going to get worse. MUCH worse.
>
>  We could probably eliminate the board #ifdef in platfrom.c by not supplying
> the platfrom data for MMC1.

What if I wanted to build a kernel which supports multiple different
Au1200-based systems, like the SH-port does with its mach vector?


>> Just look at the au1000-eth platform data situation!
>> I have these platform devices on Au1200/Au1300 even thought they don't
>> have
>> a built-in MAC.
>>
>
>  Need to add the SoC type checks then when registering the devices. Or at
> least the #ifdef's. :-)

I'd like to get rid of the ifdefs, not encourage them to mate and multiply ;-)


>> The board which uses the device should register it.
>
>  Contrarywise, the SoC that has the devices, should register them.

My point is that most drivers require additional information from the board, and
maybe due to hardware design the ids may need to be swapped.  Rather than
#ifdeffing these cases for every board in a central file I'd let the board using
the devices sort this out.

In my case, I don't need UART0 of the Au1200, but need UART1 to be ttyS0.

And on a personal note, that file just bothers me.  It's messy, can
cause merge conflicts,
it references structures defined inside board-specific code. In short,
it just plain annoys
my sense of aesthetics.

Manuel


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux