From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Sat, 04 Sep 2010 10:22:35 +0200 Subject: [U-Boot] [PATCH] IDE: Don't assume there are always two devices per bus In-Reply-To: <4C76691D.9070701@dawes.za.net> References: <20100815213046.A427B1606A5@gemini.denx.de> <1281937660-25632-2-git-send-email-user@aphrodite> <4C76691D.9070701@dawes.za.net> Message-ID: <4C8201CB.9080606@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.