[Top] [All Lists]

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

To: Sergei Shtylyov <>
Subject: Re: [PATCH] MIPS: Alchemy: move MMC driver registration to board code.
From: Manuel Lauss <>
Date: Tue, 9 Mar 2010 13:03:51 +0100
Cc: Linux-MIPS <>, Manuel Lauss <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=T0VB6hVTHbfq+mRpJL3Rxliu2gQKKI4p2HjGruflRDg=; b=inWPgeFgi0kGefZK/OGcIg4BYfBXEWsw65bNHp2IoZEPItHBXEYX3C87IPk51siUBb hWxPJjZh8csE90/9Wd68liaSg/GQ82Xv0w6AaRkwYrpd1dneWAP6nCHLlYCY/YwOoj/v uafwRsHq9K87AH4hGvhwN7BFGSCBIaSvFBusY=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=GFn+WAmdJv34fjCKarUGEUSpEq09Ow52I3Kxn6LbLXpsWJoxCcO/WWBwwed7VSlSHZ wrT5EVHuaL7LmUrT+xrIQs8ExGYlvASn1CIlUrVkDDm20R+gYGBCsLeXtW5buYlnV72u J9e+la0O0td2i/5WDrnTULh3sMWwL1XGbui5g=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <>
On Tue, Mar 9, 2010 at 12:51 PM, Sergei Shtylyov <> 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.


<Prev in Thread] Current Thread [Next in Thread>