summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/ide.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
commitd6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch)
treee2be02f33984c48ec019c654051d27964e42c441 /include/asm-ppc/ide.h
parent609d1e803baf519487233b765eb487f9ec227a18 (diff)
Merge with 2.3.19.
Diffstat (limited to 'include/asm-ppc/ide.h')
-rw-r--r--include/asm-ppc/ide.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/asm-ppc/ide.h b/include/asm-ppc/ide.h
index 4bca472e1..fffe270cb 100644
--- a/include/asm-ppc/ide.h
+++ b/include/asm-ppc/ide.h
@@ -21,6 +21,7 @@
#ifdef __KERNEL__
+#include <linux/config.h>
#include <linux/hdreg.h>
#include <linux/ioport.h>
#include <asm/io.h>
@@ -105,16 +106,20 @@ static __inline__ void ide_init_hwif_ports(hw_regs_t *hw,
static __inline__ void ide_init_default_hwifs(void)
{
-#ifdef __DO_I_NEED_THIS
+#ifndef CONFIG_BLK_DEV_IDEPCI
hw_regs_t hw;
int index;
-
- for(index = 0; index < MAX_HWIFS; index++) {
- ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
- hw.irq = ide_default_irq(ide_default_io_base(index));
+ ide_ioreg_t base;
+
+ for (index = 0; index < MAX_HWIFS; index++) {
+ base = ide_default_io_base(index);
+ if (base == 0)
+ continue;
+ ide_init_hwif_ports(&hw, base, 0, NULL);
+ hw.irq = ide_default_irq(base);
ide_register_hw(&hw, NULL);
}
-#endif /* __DO_I_NEED_THIS */
+#endif /* CONFIG_BLK_DEV_IDEPCI */
}
static __inline__ int ide_check_region (ide_ioreg_t from, unsigned int extent)