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

Albert ARIBAUD albert.aribaud at free.fr
Sat Sep 4 10:22:35 CEST 2010


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


More information about the U-Boot mailing list