diff options
author | Nicolas Pitre <nico@cam.org> | 2009-06-01 15:36:36 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@cam.org> | 2009-06-08 13:04:58 -0400 |
commit | fb7b2d3f0dda3fbd711c191fd3b9496653e81ac7 (patch) | |
tree | f13cc711bc6e81d6cd39b4f521303d3e9e455901 /arch/arm/mach-kirkwood/sheevaplug-setup.c | |
parent | a88656553d18c324554855fccc730c9644048111 (diff) |
[ARM] Kirkwood: rationalize NAND setup a bit
Common resource and platform device structures are moved to common.c
and only the partition table and chip delay remains a per board
parameter.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-kirkwood/sheevaplug-setup.c')
-rw-r--r-- | arch/arm/mach-kirkwood/sheevaplug-setup.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index dcc448c98389..c7319eeac8bb 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/mtd/nand.h> | ||
15 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
16 | #include <linux/mv643xx_eth.h> | 15 | #include <linux/mv643xx_eth.h> |
17 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
@@ -20,7 +19,6 @@ | |||
20 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
21 | #include <mach/kirkwood.h> | 20 | #include <mach/kirkwood.h> |
22 | #include <plat/mvsdio.h> | 21 | #include <plat/mvsdio.h> |
23 | #include <plat/orion_nand.h> | ||
24 | #include "common.h" | 22 | #include "common.h" |
25 | #include "mpp.h" | 23 | #include "mpp.h" |
26 | 24 | ||
@@ -40,32 +38,6 @@ static struct mtd_partition sheevaplug_nand_parts[] = { | |||
40 | }, | 38 | }, |
41 | }; | 39 | }; |
42 | 40 | ||
43 | static struct resource sheevaplug_nand_resource = { | ||
44 | .flags = IORESOURCE_MEM, | ||
45 | .start = KIRKWOOD_NAND_MEM_PHYS_BASE, | ||
46 | .end = KIRKWOOD_NAND_MEM_PHYS_BASE + | ||
47 | KIRKWOOD_NAND_MEM_SIZE - 1, | ||
48 | }; | ||
49 | |||
50 | static struct orion_nand_data sheevaplug_nand_data = { | ||
51 | .parts = sheevaplug_nand_parts, | ||
52 | .nr_parts = ARRAY_SIZE(sheevaplug_nand_parts), | ||
53 | .cle = 0, | ||
54 | .ale = 1, | ||
55 | .width = 8, | ||
56 | .chip_delay = 25, | ||
57 | }; | ||
58 | |||
59 | static struct platform_device sheevaplug_nand_flash = { | ||
60 | .name = "orion_nand", | ||
61 | .id = -1, | ||
62 | .dev = { | ||
63 | .platform_data = &sheevaplug_nand_data, | ||
64 | }, | ||
65 | .resource = &sheevaplug_nand_resource, | ||
66 | .num_resources = 1, | ||
67 | }; | ||
68 | |||
69 | static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { | 41 | static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { |
70 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 42 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
71 | }; | 43 | }; |
@@ -111,6 +83,7 @@ static void __init sheevaplug_init(void) | |||
111 | kirkwood_mpp_conf(sheevaplug_mpp_config); | 83 | kirkwood_mpp_conf(sheevaplug_mpp_config); |
112 | 84 | ||
113 | kirkwood_uart0_init(); | 85 | kirkwood_uart0_init(); |
86 | kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); | ||
114 | 87 | ||
115 | if (gpio_request(29, "USB Power Enable") != 0 || | 88 | if (gpio_request(29, "USB Power Enable") != 0 || |
116 | gpio_direction_output(29, 1) != 0) | 89 | gpio_direction_output(29, 1) != 0) |
@@ -120,7 +93,6 @@ static void __init sheevaplug_init(void) | |||
120 | kirkwood_ge00_init(&sheevaplug_ge00_data); | 93 | kirkwood_ge00_init(&sheevaplug_ge00_data); |
121 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | 94 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); |
122 | 95 | ||
123 | platform_device_register(&sheevaplug_nand_flash); | ||
124 | platform_device_register(&sheevaplug_leds); | 96 | platform_device_register(&sheevaplug_leds); |
125 | } | 97 | } |
126 | 98 | ||