diff options
Diffstat (limited to 'arch/arm/mach-ep93xx/edb93xx.c')
-rw-r--r-- | arch/arm/mach-ep93xx/edb93xx.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 3884182cd362..c2ce9034ba87 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | #include <linux/mtd/physmap.h> | ||
31 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
32 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
33 | #include <linux/i2c-gpio.h> | 32 | #include <linux/i2c-gpio.h> |
@@ -38,39 +37,13 @@ | |||
38 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
39 | 38 | ||
40 | 39 | ||
41 | static struct physmap_flash_data edb93xx_flash_data; | ||
42 | |||
43 | static struct resource edb93xx_flash_resource = { | ||
44 | .flags = IORESOURCE_MEM, | ||
45 | }; | ||
46 | |||
47 | static struct platform_device edb93xx_flash = { | ||
48 | .name = "physmap-flash", | ||
49 | .id = 0, | ||
50 | .dev = { | ||
51 | .platform_data = &edb93xx_flash_data, | ||
52 | }, | ||
53 | .num_resources = 1, | ||
54 | .resource = &edb93xx_flash_resource, | ||
55 | }; | ||
56 | |||
57 | static void __init __edb93xx_register_flash(unsigned int width, | ||
58 | resource_size_t start, resource_size_t size) | ||
59 | { | ||
60 | edb93xx_flash_data.width = width; | ||
61 | edb93xx_flash_resource.start = start; | ||
62 | edb93xx_flash_resource.end = start + size - 1; | ||
63 | |||
64 | platform_device_register(&edb93xx_flash); | ||
65 | } | ||
66 | |||
67 | static void __init edb93xx_register_flash(void) | 40 | static void __init edb93xx_register_flash(void) |
68 | { | 41 | { |
69 | if (machine_is_edb9307() || machine_is_edb9312() || | 42 | if (machine_is_edb9307() || machine_is_edb9312() || |
70 | machine_is_edb9315()) { | 43 | machine_is_edb9315()) { |
71 | __edb93xx_register_flash(4, EP93XX_CS6_PHYS_BASE, SZ_32M); | 44 | ep93xx_register_flash(4, EP93XX_CS6_PHYS_BASE, SZ_32M); |
72 | } else { | 45 | } else { |
73 | __edb93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M); | 46 | ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M); |
74 | } | 47 | } |
75 | } | 48 | } |
76 | 49 | ||