All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fix IDE_BUS(dev) macro
@ 2012-04-17 19:06 Luka Perkov
  2012-04-18 21:37 ` David Purdy
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Luka Perkov @ 2012-04-17 19:06 UTC (permalink / raw)
  To: u-boot

IDE_BUS assumes that each bus has two devices and thus returns the first
bus even when the second one should be probed.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Tested-by: Luka Perkov <uboot@lukaperkov.net>
---

Simon discovered this while adding support for new board IB NAS6210.

More info can be found here:

http://lists.denx.de/pipermail/u-boot/2012-April/122525.html

When this is commited I will do a coding style cleanup. There are tabs
after few "#define" parts in include/ide.h.

 include/ide.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)])
 

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2012-10-08 18:46 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17 19:06 [U-Boot] [PATCH] fix IDE_BUS(dev) macro Luka Perkov
2012-04-18 21:37 ` David Purdy
2012-04-19  6:38   ` Albert ARIBAUD
2012-04-21 19:38     ` David Purdy
2012-04-29 20:19     ` Luka Perkov
2012-05-14 19:29       ` Luka Perkov
2012-05-15 19:42         ` Albert ARIBAUD
2012-05-15 20:44           ` Luka Perkov
2012-06-07 13:30           ` Luka Perkov
2012-06-20  8:05             ` Albert ARIBAUD
2012-08-09 20:36               ` Wolfgang Denk
2012-08-13 12:27                 ` Albert ARIBAUD
2012-08-14  8:30                   ` Albert ARIBAUD
2012-08-14 12:33                   ` DrEagle
2012-10-08 18:46         ` [U-Boot] " Tom Rini
2012-06-03 20:23     ` [U-Boot] [PATCH] " Rogan Dawes
2012-06-03 21:25       ` Luka Perkov
2012-04-20  5:17 ` Prafulla Wadaskar
2012-06-03 15:03 ` Vágó Tibor
2012-06-03 15:03 ` Vágó Tibor
2012-06-03 21:24   ` Luka Perkov
2012-10-07  7:15 ` uboot at lukaperkov.net
2012-10-07  9:28   ` Albert ARIBAUD
2012-10-07 14:40     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.