From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luka Perkov Date: Tue, 15 May 2012 22:44:51 +0200 Subject: [U-Boot] [PATCH] fix IDE_BUS(dev) macro In-Reply-To: <4FB2B1C3.2020503@aribaud.net> References: <20120417190649.GA22913@w500.iskon.local> <4F8FB2DB.5090502@aribaud.net> <20120429201941.GA6293@w500.iskon.local> <20120514192910.GA23116@w500.iskon.local> <4FB2B1C3.2020503@aribaud.net> Message-ID: <20120515204451.GB25090@w500.iskon.local> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Albert, On Tue, May 15, 2012 at 09:42:59PM +0200, Albert ARIBAUD wrote: > >diff --git a/include/ide.h b/include/ide.h > >index 8ecc9dd..385e909 100644 > >--- a/include/ide.h > >+++ b/include/ide.h > >@@ -24,7 +24,7 @@ > > #ifndef _IDE_H > > #define _IDE_H > > > >-#define IDE_BUS(dev) (dev>> 1) > >+#define IDE_BUS(dev) (dev / (CONFIG_SYS_IDE_MAXDEVICE / CONFIG_SYS_IDE_MAXBUS)) > > > > #define ATA_CURR_BASE(dev) (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)]) > > Sorry, been busier than usual. I'll try and test this tomorrow > night; if not, that'll be next week I'm afraid. It's no hurry... I was pinging you so this does not end up forgotten. If this does not work for your boards we can always use #ifdef's. Regards, Luka