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