[U-Boot] [PATCH] kirkwood: added common config file mv-config.h

Albert ARIBAUD albert.aribaud at free.fr
Fri Oct 1 08:35:32 CEST 2010


Le 01/10/2010 08:10, Prafulla Wadaskar a écrit :
>
>
>> -----Original Message-----
>> From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
>> Sent: Thursday, September 30, 2010 9:05 PM
>> To: Prafulla Wadaskar
>> Cc: Rogan Dawes; u-boot at lists.denx.de; Ashish Karkare;
>> Prabhanjan Sarnaik
>> Subject: Re: [U-Boot] [PATCH] kirkwood: added common config
>> file mv-config.h
>>
>> Le 30/09/2010 16:33, Prafulla Wadaskar a écrit :
>>
>>>>> +/*
>>>>> + * IDe Support on SATA port0
>>>>> + */
>>>>
>>>> IDe?
>>>
>>> I think Ide can be removed, right?
>
> I mean here s/Ide//g
>
>>
>> Do none of the boards have disks? At least openrd-base should
>> have IDE
>
> Guruplug, openrd_base and rd6281a have disk support
>
>> (and openrd-client as well if the patch to introduced it is
>> finally merged).
>>
>> So IDE should stay IMO, but the IDE stuff should be split into
>> board-specifics (basically the defines for the IDE0 and, if
>> it exists,
>> IDE1 base addresses) and SoC-specifics (basically everything
>> else, i.e.
>> all that is required for cmd_ide.c to compile).
>
> At this moment I only see the case with edminiv2 board where ATA bus0 is configured for sata port1.
> To extend this support for this board, we can undef and redef the respective macros.
>
> Whereas on all other boards it is one-to-one mapping.
>
> To me setting default configuration make more sense, that avoids code duplication in several files.
>
> Regards..
> Prafulla . .

Even if almost all boards have straight rather than cross mappings of 
IDE0/IDE1 to SATA0/SATA1, not all of them have two busses (guruplug has 
only one, and likewise another kirkwood based board I'm working on) so 
half the boards would have to modify the settings anyway.

Besides, having each board explicitely telling what busses is has rather 
than making it half implicit in the SoC common config file has two 
advantages:

- someone looking at the board config file will immediately know without 
if it supports IDE *and* how many busses it actually provides *and* how 
they are mapped;

- boards will always declare "what is there" rather than declaring 
either "what is there" or possibly "what isn't there even though the 
common config said there would be".

After all, this is only one or two lines in the board config, and they 
are always positively informative.

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list