]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/sni/pcimt.c
ahci: jmb361 has only one port
[linux-2.6-omap-h63xx.git] / arch / mips / sni / pcimt.c
index 97b234361b4d0afa8d5c0b64434c2bf07a253292..834650f371e08ebb5917cd8b7ca9a1659eaaf54f 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/pci.h>
 #include <linux/serial_8250.h>
 
-#include <asm/mc146818-time.h>
 #include <asm/sni.h>
 #include <asm/time.h>
 #include <asm/i8259.h>
@@ -90,6 +89,26 @@ static struct platform_device pcimt_serial8250_device = {
        },
 };
 
+static struct resource pcimt_cmos_rsrc[] = {
+        {
+                .start = 0x70,
+                .end   = 0x71,
+                .flags = IORESOURCE_IO
+        },
+        {
+                .start = 8,
+                .end   = 8,
+                .flags = IORESOURCE_IRQ
+        }
+};
+
+static struct platform_device pcimt_cmos_device = {
+        .name           = "rtc_cmos",
+        .num_resources  = ARRAY_SIZE(pcimt_cmos_rsrc),
+        .resource       = pcimt_cmos_rsrc
+};
+
+
 static struct resource sni_io_resource = {
        .start  = 0x00000000UL,
        .end    = 0x03bfffffUL,
@@ -225,9 +244,9 @@ static void pcimt_hwint1(void)
        if (pend & IT_EISA) {
                int irq;
                /*
-                * Note: ASIC PCI's builtin interrupt achknowledge feature is
+                * Note: ASIC PCI's builtin interrupt acknowledge feature is
                 * broken.  Using it may result in loss of some or all i8259
-                * interupts, so don't use PCIMT_INT_ACKNOWLEDGE ...
+                * interrupts, so don't use PCIMT_INT_ACKNOWLEDGE ...
                 */
                irq = i8259_irq();
                if (unlikely(irq < 0))
@@ -265,9 +284,9 @@ static void sni_pcimt_hwint(void)
        u32 pending = read_c0_cause() & read_c0_status();
 
        if (pending & C_IRQ5)
-               do_IRQ (MIPS_CPU_IRQ_BASE + 7);
+               do_IRQ(MIPS_CPU_IRQ_BASE + 7);
        else if (pending & C_IRQ4)
-               do_IRQ (MIPS_CPU_IRQ_BASE + 6);
+               do_IRQ(MIPS_CPU_IRQ_BASE + 6);
        else if (pending & C_IRQ3)
                pcimt_hwint3();
        else if (pending & C_IRQ1)
@@ -290,13 +309,10 @@ void __init sni_pcimt_irq_init(void)
        change_c0_status(ST0_IM, IE_IRQ1|IE_IRQ3);
 }
 
-void sni_pcimt_init(void)
+void __init sni_pcimt_init(void)
 {
        sni_pcimt_detect();
        sni_pcimt_sc_init();
-       rtc_mips_get_time = mc146818_get_cmos_time;
-       rtc_mips_set_time = mc146818_set_rtc_mmss;
-       board_time_init = sni_cpu_time_init;
        ioport_resource.end = sni_io_resource.end;
 #ifdef CONFIG_PCI
        PCIBIOS_MIN_IO = 0x9000;
@@ -312,6 +328,7 @@ static int __init snirm_pcimt_setup_devinit(void)
        case SNI_BRD_PCI_DESKTOP:
        case SNI_BRD_PCI_MTOWER_CPLUS:
                platform_device_register(&pcimt_serial8250_device);
+               platform_device_register(&pcimt_cmos_device);
                break;
        }