mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
ide: Correct IDE_BUS(dev) macro
The IDE_BUS(dev) macro was previously doing dev >> 1. This however is a mis-match of the usage in common/cmd_ide.c and would cause boards with multiple ports / devices to not correctly detect all devices. For more details please see: http://lists.denx.de/pipermail/u-boot/2012-April/122525.html [Tom Rini: Reword commit message only] Tested-by: Luka Perkov <uboot@lukaperkov.net> Signed-off-by: Simon Baatz <gmbnomis@gmail.com> Signed-off-by: Tom Rini <trini@ti.com>
This commit is contained in:
parent
633efe9c23
commit
8a10180d62
1 changed files with 1 additions and 1 deletions
|
@ -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)])
|
||||
|
||||
|
|
Loading…
Reference in a new issue