diff -purN u-boot-0.4.8/common/cmd_ide.c u-boot-0.4.8_new/common/cmd_ide.c --- u-boot-0.4.8/common/cmd_ide.c 2003-07-01 23:07:07.000000000 +0200 +++ u-boot-0.4.8_new/common/cmd_ide.c 2003-10-09 00:06:50.000000000 +0200 @@ -42,8 +42,12 @@ #ifdef CONFIG_STATUS_LED # include #endif -#ifdef __I386__ +#ifndef __PPC__ #include +#ifdef __MIPS__ +/* Macros depend on this variable */ +static unsigned long mips_io_port_base = 0; +#endif #endif #ifdef CONFIG_SHOW_BOOT_PROGRESS @@ -116,9 +120,8 @@ ulong ide_bus_offset[CFG_IDE_MAXBUS] = { #endif }; -#ifdef __PPC__ + #define ATA_CURR_BASE(dev) (CFG_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)]) -#endif #ifndef CONFIG_AMIGAONEG3SE static int ide_bus_ok[CFG_IDE_MAXBUS]; @@ -763,7 +766,7 @@ ide_outb(int dev, int port, unsigned cha static void __inline__ ide_outb(int dev, int port, unsigned char val) { - outb(val, port); + outb(val, ATA_CURR_BASE(dev)+port); } #endif /* __PPC__ */ @@ -785,7 +788,7 @@ ide_inb(int dev, int port) static unsigned char __inline__ ide_inb(int dev, int port) { - return inb(port); + return inb(ATA_CURR_BASE(dev)+port); } #endif /* __PPC__ */ @@ -846,7 +849,7 @@ output_data(int dev, ulong *sect_buf, in static void output_data(int dev, ulong *sect_buf, int words) { - outsw(ATA_DATA_REG, sect_buf, words<<1); + outsw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words<<1); } #endif /* __PPC__ */ @@ -870,7 +873,7 @@ input_data(int dev, ulong *sect_buf, int static void input_data(int dev, ulong *sect_buf, int words) { - insw(ATA_DATA_REG, sect_buf, words << 1); + insw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words << 1); } #endif /* __PPC__ */ @@ -1420,14 +1423,14 @@ input_data_shorts(int dev, ushort *sect_ static void output_data_shorts(int dev, ushort *sect_buf, int shorts) { - outsw(ATA_DATA_REG, sect_buf, shorts); + outsw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, shorts); } static void input_data_shorts(int dev, ushort *sect_buf, int shorts) { - insw(ATA_DATA_REG, sect_buf, shorts); + insw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, shorts); } #endif /* __PPC__ */ diff -purN u-boot-0.4.8/include/configs/shannon.h u-boot-0.4.8_new/include/configs/shannon.h --- u-boot-0.4.8/include/configs/shannon.h 2002-11-03 19:03:56.000000000 +0100 +++ u-boot-0.4.8_new/include/configs/shannon.h 2003-10-08 23:45:24.000000000 +0200 @@ -204,13 +204,13 @@ #define CFG_ATA_BASE_ADDR CFG_PCMCIA_ATTRB_ADDR /* Offset for data I/O */ -#define CFG_ATA_DATA_OFFSET (CFG_ATA_BASE_ADDR) +#define CFG_ATA_DATA_OFFSET 0 /* Offset for normal register accesses */ -#define CFG_ATA_REG_OFFSET (CFG_ATA_BASE_ADDR) +#define CFG_ATA_REG_OFFSET 0 /* Offset for alternate registers */ -#define CFG_ATA_ALT_OFFSET (CFG_ATA_BASE_ADDR) +#define CFG_ATA_ALT_OFFSET 0 /*----------------------------------------------------------------------- */