Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Subject: Re: [PATCH 0/3] Alchemy: platform updates
Date: Sun, 29 Mar 2009 17:03:58 +0400	[thread overview]
Message-ID: <49CF71BE.2070109@ru.mvista.com> (raw)
In-Reply-To: <20090329143802.0a09baca@scarran.roarinelk.net>

Hello.

Manuel Lauss wrote:

>>> Patch overview:
>>>
>>> #1: eliminate alchemy/common/platform.c.  Add platform device
>>>     registration to all boards instead.
>>>   
>>>       
>>   I'm strongly voting against this, as it causes totally unneeded code 
>> duplication. Please don't apply.
>>     
>
> I know it seems like a lot of unecessary duplication.  My reasons for
> doing this are
>
> a) I want to get rid of the various cpu-type specific config symbols,
>    (i.e. I want one kernel binary to run on 2 or more Alchemy boards
>    with different cpu models.  There's no technical reason this
>    shouldn't work.  The OHCI block for instance has different addresses
>    on pre-Au1200 silicon; the easiest solution to that (for me) is
>    to simply move device registration to the boards that need/want it.)
>   

   Well, then create several files (like 
arch/mips/alchemy/common/au1200.c) for SoC specific platfrom device sets 
variations but don't move all platform devices into the board files. 
This will be a cleaner solution.

>    (BTW, what do you think about this?  Please tell me now if I ever
>     have a chance to get your approval on this, so I can stop wasting
>     my and everybody else's time as soon as possible).
>   

  Single kernel binary? If it's at all possible, I am all for it.

> b) the way it is now just seems wrong to me, probably comes from working
>    on SH port where each board registers the devices it needs.  I know
>    this is in no way a valid technical justification; but everytime I
>    look at this file something tells me it is just wrong ;)
>   

  Don't listen to the voices in your head. ;-)

>>>     I realize this is a lot of (needless) code duplication at first,
>>>     but it seems a lot cleaner to me if each board registered the
>>>     devices it needs/wants.  
>>>       
>>    No, it's certainly a step backwards. You could make the common code 
>> more flexible by checking what devices are enabled and registering them 
>> selectively
>>     
>
> Please elaborate.  Shall I check for a config symbol or if bootloader
> has enabled the peripherals?  The latter is IMO stupid since the
> bootloader should only load an OS and not preemptively enable every
> device which might some day be used just because the running OS doesn't
> know what it wants...
>   

   It should check what the board code (or bootloader) has enabled. I 
remember the board code writes some config registers...

> 	Manuel Lauss
>   

WBR, Sergei

  reply	other threads:[~2009-03-29 13:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-29  9:26 [PATCH 0/3] Alchemy: platform updates Manuel Lauss
2009-03-29  9:27 ` [PATCH 1/3] Alchemy: get rid of common/platform.c Manuel Lauss
2009-03-29  9:27   ` [PATCH 2/3] Alchemy: add RTC device to devboards Manuel Lauss
2009-03-29  9:27     ` [PATCH 3/3] Alchemy: convert to physmap flash Manuel Lauss
2009-04-06  7:57       ` Florian Fainelli
2009-03-29 11:36   ` [PATCH 1/3] Alchemy: get rid of common/platform.c Sergei Shtylyov
2009-03-29 11:37   ` Sergei Shtylyov
2009-03-29 11:35 ` [PATCH 0/3] Alchemy: platform updates Sergei Shtylyov
2009-03-29 12:38   ` Manuel Lauss
2009-03-29 13:03     ` Sergei Shtylyov [this message]
2009-03-29 15:27       ` Kevin Hickey
2009-03-29 15:52         ` Manuel Lauss
2009-03-30  8:39           ` Florian Fainelli
2009-03-30 16:23           ` Ralf Baechle
2009-03-29 15:43       ` Manuel Lauss
2009-03-29 20:48       ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49CF71BE.2070109@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=linux-mips@linux-mips.org \
    --cc=mano@roarinelk.homelinux.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox