Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=34a780a0afeb8f99c9ca9934f4cc0822541769c6
Commit:     34a780a0afeb8f99c9ca9934f4cc0822541769c6
Parent:     dd12666278daa0008ac439603c8d3037bc213556
Author:     Kristoffer Ericson <[EMAIL PROTECTED]>
AuthorDate: Tue Apr 10 07:45:08 2007 +0900
Committer:  Paul Mundt <[EMAIL PROTECTED]>
CommitDate: Mon May 7 02:11:56 2007 +0000

    sh: hp6xx pata_platform support.
    
    Drop the hd64461 I/O ops and wire up pata_platform for MMIO.
    
    Signed-off-by: Kristoffer Ericson <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>
---
 arch/sh/boards/hp6xx/setup.c |   67 +++++++++++++++++++++++-------------------
 1 files changed, 37 insertions(+), 30 deletions(-)

diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c
index b5a9664..6aeee85 100644
--- a/arch/sh/boards/hp6xx/setup.c
+++ b/arch/sh/boards/hp6xx/setup.c
@@ -2,6 +2,7 @@
  * linux/arch/sh/boards/hp6xx/setup.c
  *
  * Copyright (C) 2002 Andriy Skulysh
+ * Copyright (C) 2007 Kristoffer Ericson <[EMAIL PROTECTED]>
  *
  * May be copied or modified under the terms of the GNU General Public
  * License.  See linux/COPYING for more information.
@@ -10,6 +11,7 @@
  */
 #include <linux/types.h>
 #include <linux/init.h>
+#include <linux/platform_device.h>
 #include <asm/hd64461.h>
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -19,6 +21,40 @@
 #define        SCPCR   0xa4000116
 #define SCPDR  0xa4000136
 
+/* CF Slot */
+static struct resource cf_ide_resources[] = {
+       [0] = {
+               .start = 0x15000000 + 0x1f0,
+               .end   = 0x15000000 + 0x1f0 + 0x08 - 0x01,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = 0x15000000 + 0x1fe,
+               .end   = 0x15000000 + 0x1fe + 0x01,
+               .flags = IORESOURCE_MEM,
+       },
+       [2] = {
+               .start = 93,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device cf_ide_device = {
+       .name           =  "pata_platform",
+       .id             =  -1,
+       .num_resources  = ARRAY_SIZE(cf_ide_resources),
+       .resource       = cf_ide_resources,
+};
+
+static struct platform_device *hp6xx_devices[] __initdata = {
+       &cf_ide_device,
+};
+
+static int __init hp6xx_devices_setup(void)
+{
+       return platform_add_devices(hp6xx_devices, ARRAY_SIZE(hp6xx_devices));
+}
+
 static void __init hp6xx_setup(char **cmdline_p)
 {
        u8 v8;
@@ -60,41 +96,12 @@ static void __init hp6xx_setup(char **cmdline_p)
        v |= SCPCR_TS_ENABLE;
        ctrl_outw(v, SCPCR);
 }
+device_initcall(hp6xx_devices_setup);
 
-/*
- * XXX: This is stupid, we should have a generic machine vector for the cchips
- * and just wrap the platform setup code in to this, as it's the only thing
- * that ends up being different.
- */
 struct sh_machine_vector mv_hp6xx __initmv = {
        .mv_name = "hp6xx",
        .mv_setup = hp6xx_setup,
        .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM,
-
-       .mv_inb = hd64461_inb,
-       .mv_inw = hd64461_inw,
-       .mv_inl = hd64461_inl,
-       .mv_outb = hd64461_outb,
-       .mv_outw = hd64461_outw,
-       .mv_outl = hd64461_outl,
-
-       .mv_inb_p = hd64461_inb_p,
-       .mv_inw_p = hd64461_inw,
-       .mv_inl_p = hd64461_inl,
-       .mv_outb_p = hd64461_outb_p,
-       .mv_outw_p = hd64461_outw,
-       .mv_outl_p = hd64461_outl,
-
-       .mv_insb = hd64461_insb,
-       .mv_insw = hd64461_insw,
-       .mv_insl = hd64461_insl,
-       .mv_outsb = hd64461_outsb,
-       .mv_outsw = hd64461_outsw,
-       .mv_outsl = hd64461_outsl,
-
-       .mv_readw = hd64461_readw,
-       .mv_writew = hd64461_writew,
-
        .mv_irq_demux = hd64461_irq_demux,
 };
 ALIAS_MV(hp6xx)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to