From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rogan Dawes Date: Sat, 14 Aug 2010 12:46:09 +0200 Subject: [U-Boot] IDE_BUS unconditionally expects 2 devices per bus In-Reply-To: <4C6672C3.202@dawes.za.net> References: <4C6672C3.202@dawes.za.net> Message-ID: <4C6673F1.2010501@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/08/14 12:41 PM, Rogan Dawes wrote: > -#define IDE_BUS(dev) (dev>> 1) > +#define IDE_BUS(dev) (dev>> (CONFIG_SYS_IDE_MAXDEVICE / > CONFIG_SYS_IDE_MAXBUS - 1)) > > #define ATA_CURR_BASE(dev) > (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)]) Ok, I'm an idiot! The reason was staring me in the face! ATA_CURR_BASE(dev) relies on IDE_BUS, which is why the same disk was being enumerated twice. It seems that the above patch is indeed correct. Rogan