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

Albert ARIBAUD
2010-09-04T09:07:44Z

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,
--
Albert.