MIPS: Alchemy: physmap-flash for all devboards
[pandora-kernel.git] / arch / mips / alchemy / devboards / pb1100 / platform.c
index 8487da5..bfc5ab6 100644 (file)
 #include <linux/init.h>
 
 #include <asm/mach-au1x00/au1000.h>
+#include <asm/mach-db1x00/bcsr.h>
 
 #include "../platform.h"
 
 static int __init pb1100_dev_init(void)
 {
+       int swapped;
+
        /* PCMCIA. single socket, identical to Pb1500 */
        db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS,
                                    PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
@@ -33,11 +36,15 @@ static int __init pb1100_dev_init(void)
                                    PCMCIA_MEM_PSEUDO_PHYS  + 0x00040000 - 1,
                                    PCMCIA_IO_PSEUDO_PHYS,
                                    PCMCIA_IO_PSEUDO_PHYS   + 0x00001000 - 1,
-                                   AU1000_GPIO_11,      /* card */
-                                   AU1000_GPIO_9,       /* insert */
-                                   /*AU1000_GPIO_10*/0, /* stschg */
+                                   AU1100_GPIO11_INT,   /* card */
+                                   AU1100_GPIO9_INT,    /* insert */
+                                   /*AU1100_GPIO10_INT*/0, /* stschg */
                                    0,                   /* eject */
                                    0);                  /* id */
+
+       swapped = bcsr_read(BCSR_STATUS) &  BCSR_STATUS_DB1000_SWAPBOOT;
+       db1x_register_norflash(64 * 1024 * 1024, 4, swapped);
+
        return 0;
 }
 device_initcall(pb1100_dev_init);