[U-Boot] [PATCH] IDE: Don't assume there are always two devices per bus

Rogan Dawes rogan at dawes.za.net
Sun Sep 5 23:23:32 CEST 2010


On 2010/09/04 11:07 AM, Albert ARIBAUD wrote:
> Le 04/09/2010 10:22, Albert ARIBAUD a écrit :
>> Le 26/08/2010 15:16, Rogan Dawes a écrit :
>>
>>> Anything wrong with this patch?
>>
>> I think I finally found what was bugging me with it.
>>
>> Granted, there are cases where we don't want two devices per bus, but
>> this is a requirement unrelated to the maximum number of busses and
>> devices: this is simply due to the fact that we're on a SATA, not PATA,
>> controller.
>>
>> I think that, rather than modifying IDE_BUS(dev), you should introduce a
>> CONFIG_SYS_IDE_MAXDEVICE_PER_BUS config option that will limit how many
>> devices will be probed for on a given bus.
>>
>> Without this config option, for each bus B there can be up to two
>> devices, numbered (B*2) and (B*2+1); with the config option, there can
>> be only one device numbered (B*2). In all cases, IDE_BUS(dev) can remain
>> defined as (dev>>  1) which will always amount to B.
>>
>> Amicalement,
> 
> Rogan,
> 
> Actually, I am looking into refactoring the cmd_ide.c code right now, 
> because I'll need it for supporting the net5big's eight ports and 
> devices. Do you mind if I give a try at my own suggestion?
> 
> Amicalement,

By all means.

Have at it! :-)

Rogan


More information about the U-Boot mailing list