bool "SWARM onboard IDE support"
depends on SIBYTE_SWARM
+config IDE_ARM
+ def_bool ARM && (ARCH_A5K || ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK)
+
config BLK_DEV_IDE_ICSIDE
tristate "ICS IDE interface support"
depends on ARM && ARCH_ACORN
ide-core-$(CONFIG_PROC_FS) += ide-proc.o
ide-core-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
+# built-in only drivers from arm/
+ide-core-$(CONFIG_IDE_ARM) += arm/ide_arm.o
+
# built-in only drivers from legacy/
ide-core-$(CONFIG_BLK_DEV_IDE_PC9800) += legacy/pc9800.o
ide-core-$(CONFIG_BLK_DEV_BUDDHA) += legacy/buddha.o
--- /dev/null
+/*
+ * ARM/ARM26 default IDE host driver
+ *
+ * Copyright (C) 2004 Bartlomiej Zolnierkiewicz
+ * Based on code by: Russell King, Ian Molton and Alexander Schulz.
+ *
+ * May be copied or modified under the terms of the GNU General Public License.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/ide.h>
+
+#include <asm/mach-types.h>
+#include <asm/irq.h>
+
+#ifdef CONFIG_ARM26
+# define IDE_ARM_HOST (machine_is_a5k())
+#else
+# define IDE_ARM_HOST (1)
+#endif
+
+#ifdef CONFIG_ARCH_CLPS7500
+# include <asm/arch/hardware.h>
+#
+# define IDE_ARM_IO (ISASLOT_IO + 0x1f0)
+# define IDE_ARM_IRQ IRQ_ISA_14
+#else
+# define IDE_ARM_IO 0x1f0
+# define IDE_ARM_IRQ IRQ_HARDDISK
+#endif
+
+void __init ide_arm_init(void)
+{
+ if (IDE_ARM_HOST) {
+ hw_regs_t hw;
+
+ memset(&hw, 0, sizeof(hw));
+ ide_std_init_ports(&hw, IDE_ARM_IO, IDE_ARM_IO + 0x206);
+ hw.irq = IDE_ARM_IRQ;
+ ide_register_hw(&hw, NULL);
+ }
+}
#endif
}
+extern void ide_arm_init(void);
+
/*
* init_ide_data() sets reasonable default values into all fields
* of all instances of the hwifs and drives, but only on the first call.
ide_init_default_hwifs();
initializing = 0;
#endif
+#ifdef CONFIG_IDE_ARM
+ ide_arm_init();
+#endif
}
/*
* Modifications:
* 29-07-1998 RMK Major re-work of IDE architecture specific code
*/
-#include <asm/irq.h>
-#include <asm/arch/hardware.h>
/*
* Set up a hw structure for a specified data port, control port and IRQ.
hw->io_ports[IDE_IRQ_OFFSET] = 0;
}
-/*
- * This registers the standard ports for this architecture with the IDE
- * driver.
- */
-static __inline__ void
-ide_init_default_hwifs(void)
-{
- hw_regs_t hw;
-
- ide_init_hwif_ports(&hw, ISASLOT_IO + 0x1f0, ISASLOT_IO + 0x3f6, NULL);
- hw.irq = IRQ_ISA_14;
- ide_register_hw(&hw);
-}
+static inline void ide_init_default_hwifs(void) { ; }
* Modifications:
* 29-07-1998 RMK Major re-work of IDE architecture specific code
*/
-#include <asm/irq.h>
/*
* Set up a hw structure for a specified data port, control port and IRQ.
*irq = 0;
}
-/*
- * This registers the standard ports for this architecture with the IDE
- * driver.
- */
-static __inline__ void
-ide_init_default_hwifs(void)
-{
- hw_regs_t hw;
-
- ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL);
- hw.irq = IRQ_HARDDISK;
- ide_register_hw(&hw, NULL);
-}
+static inline void ide_init_default_hwifs(void) { ; }
* Copyright (c) 1998 Russell King
*/
-#include <asm/irq.h>
-
/*
* Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses.
*irq = 0;
}
-/*
- * This registers the standard ports for this architecture with the IDE
- * driver.
- */
-static __inline__ void
-ide_init_default_hwifs(void)
-{
- hw_regs_t hw;
-
- ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL);
- hw.irq = 14;
- ide_register_hw(&hw,NULL);
-}
-
+static inline void ide_init_default_hwifs(void) { ; }
#define ide_init_default_irq(base) (0)
-/*
- * This registers the standard ports for this architecture with the IDE
- * driver.
- */
-static __inline__ void ide_init_default_hwifs(void)
-{
- if (machine_is_a5k()) {
- hw_regs_t hw;
-
- memset(&hw, 0, sizeof(hw));
-
- ide_init_hwif_ports(&hw, 0x1f0, 0x3f6, NULL);
- hw.irq = IRQ_HARDDISK;
- ide_register_hw(&hw,NULL);
- }
-}
-
+static inline void ide_init_default_hwifs(void) { ; }
/*
* We always use the new IDE port registering,