ide: Drop ATA_PORT_ADDR
This is not needed anymore. Drop it to simplify the code. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
@@ -45,8 +45,6 @@ struct blk_desc ide_dev_desc[CONFIG_SYS_IDE_MAXDEVICE];
|
|||||||
|
|
||||||
#define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */
|
#define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */
|
||||||
|
|
||||||
#define ATA_PORT_ADDR(port) (port)
|
|
||||||
|
|
||||||
#ifdef CONFIG_IDE_RESET
|
#ifdef CONFIG_IDE_RESET
|
||||||
extern void ide_set_reset(int idereset);
|
extern void ide_set_reset(int idereset);
|
||||||
|
|
||||||
@@ -676,8 +674,7 @@ static void ide_ident(struct blk_desc *dev_desc)
|
|||||||
__weak void ide_outb(int dev, int port, unsigned char val)
|
__weak void ide_outb(int dev, int port, unsigned char val)
|
||||||
{
|
{
|
||||||
debug("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
|
debug("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
|
||||||
dev, port, val,
|
dev, port, val, ATA_CURR_BASE(dev) + port);
|
||||||
(ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
|
|
||||||
|
|
||||||
#if defined(CONFIG_IDE_AHB)
|
#if defined(CONFIG_IDE_AHB)
|
||||||
if (port) {
|
if (port) {
|
||||||
@@ -688,7 +685,7 @@ __weak void ide_outb(int dev, int port, unsigned char val)
|
|||||||
outb(val, (ATA_CURR_BASE(dev)));
|
outb(val, (ATA_CURR_BASE(dev)));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
outb(val, (ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
|
outb(val, ATA_CURR_BASE(dev) + port);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -699,12 +696,11 @@ __weak unsigned char ide_inb(int dev, int port)
|
|||||||
#if defined(CONFIG_IDE_AHB)
|
#if defined(CONFIG_IDE_AHB)
|
||||||
val = ide_read_register(dev, port);
|
val = ide_read_register(dev, port);
|
||||||
#else
|
#else
|
||||||
val = inb((ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)));
|
val = inb(ATA_CURR_BASE(dev) + port);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
debug("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
|
debug("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
|
||||||
dev, port,
|
dev, port, ATA_CURR_BASE(dev) + port, val);
|
||||||
(ATA_CURR_BASE(dev) + ATA_PORT_ADDR(port)), val);
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user