Merge branches 'release', 'asus', 'sony-laptop' and 'thinkpad' into release
[pandora-kernel.git] / arch / arm / mach-ixp23xx / espresso.c
index bf688c1..d3a779a 100644 (file)
@@ -10,7 +10,6 @@
  * warranty of any kind, whether express or implied.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
@@ -20,7 +19,6 @@
 #include <linux/tty.h>
 #include <linux/bitops.h>
 #include <linux/ioport.h>
-#include <linux/serial.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_core.h>
 #include <linux/device.h>
@@ -41,7 +39,6 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/irq.h>
 #include <asm/mach/pci.h>
 
 static int __init espresso_pci_init(void)
@@ -53,9 +50,29 @@ static int __init espresso_pci_init(void)
 };
 subsys_initcall(espresso_pci_init);
 
+static struct physmap_flash_data espresso_flash_data = {
+       .width          = 2,
+};
+
+static struct resource espresso_flash_resource = {
+       .start          = 0x90000000,
+       .end            = 0x91ffffff,
+       .flags          = IORESOURCE_MEM,
+};
+
+static struct platform_device espresso_flash = {
+       .name           = "physmap-flash",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &espresso_flash_data,
+       },
+       .num_resources  = 1,
+       .resource       = &espresso_flash_resource,
+};
+
 static void __init espresso_init(void)
 {
-       physmap_configure(0x90000000, 0x02000000, 2, NULL);
+       platform_device_register(&espresso_flash);
 
        /*
         * Mark flash as writeable.