]> Pileus Git - ~andy/linux/commitdiff
ep93xx: Add IDE support to edb93xx boards
authorRafal Prylowski <prylowski@metasoft.pl>
Thu, 12 Apr 2012 12:15:15 +0000 (14:15 +0200)
committerRyan Mallon <rmallon@gmail.com>
Mon, 4 Jun 2012 04:52:17 +0000 (14:52 +1000)
Add IDE support to edb93xx boards.

Signed-off-by: Rafal Prylowski <prylowski@metasoft.pl>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
arch/arm/mach-ep93xx/edb93xx.c

index d74c5cddb98b654972ae986489f90c0e700aa190..9005ea698f1e3432dbe7dc6422a7da8fb02e2055 100644 (file)
@@ -233,6 +233,29 @@ static void __init edb93xx_register_fb(void)
 }
 
 
+/*************************************************************************
+ * EDB93xx IDE
+ *************************************************************************/
+static int __init edb93xx_has_ide(void)
+{
+       /*
+        * Although EDB9312 and EDB9315 do have IDE capability, they have
+        * INTRQ line wired as pull-up, which makes using IDE interface
+        * problematic.
+        */
+       return machine_is_edb9312() || machine_is_edb9315() ||
+              machine_is_edb9315a();
+}
+
+static void __init edb93xx_register_ide(void)
+{
+       if (!edb93xx_has_ide())
+               return;
+
+       ep93xx_register_ide();
+}
+
+
 static void __init edb93xx_init_machine(void)
 {
        ep93xx_init_devices();
@@ -243,6 +266,7 @@ static void __init edb93xx_init_machine(void)
        edb93xx_register_i2s();
        edb93xx_register_pwm();
        edb93xx_register_fb();
+       edb93xx_register_ide();
 }