aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-mx1ads.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/mach-mx1ads.c')
-rw-r--r--arch/arm/mach-imx/mach-mx1ads.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
index 530ea08dbafd..fc49785e7340 100644
--- a/arch/arm/mach-imx/mach-mx1ads.c
+++ b/arch/arm/mach-imx/mach-mx1ads.c
@@ -68,23 +68,16 @@ static const struct imxuart_platform_data uart1_pdata __initconst = {
68 * Physmap flash 68 * Physmap flash
69 */ 69 */
70 70
71static struct physmap_flash_data mx1ads_flash_data = { 71static const struct physmap_flash_data mx1ads_flash_data __initconst = {
72 .width = 4, /* bankwidth in bytes */ 72 .width = 4, /* bankwidth in bytes */
73}; 73};
74 74
75static struct resource flash_resource = { 75static const struct resource flash_resource __initconst = {
76 .start = MX1_CS0_PHYS, 76 .start = MX1_CS0_PHYS,
77 .end = MX1_CS0_PHYS + SZ_32M - 1, 77 .end = MX1_CS0_PHYS + SZ_32M - 1,
78 .flags = IORESOURCE_MEM, 78 .flags = IORESOURCE_MEM,
79}; 79};
80 80
81static struct platform_device flash_device = {
82 .name = "physmap-flash",
83 .id = 0,
84 .resource = &flash_resource,
85 .num_resources = 1,
86};
87
88/* 81/*
89 * I2C 82 * I2C
90 */ 83 */
@@ -125,7 +118,9 @@ static void __init mx1ads_init(void)
125 imx1_add_imx_uart1(&uart1_pdata); 118 imx1_add_imx_uart1(&uart1_pdata);
126 119
127 /* Physmap flash */ 120 /* Physmap flash */
128 mxc_register_device(&flash_device, &mx1ads_flash_data); 121 platform_device_register_resndata(NULL, "physmap-flash", 0,
122 &flash_resource, 1,
123 &mx1ads_flash_data, sizeof(mx1ads_flash_data));
129 124
130 /* I2C */ 125 /* I2C */
131 i2c_register_board_info(0, mx1ads_i2c_devices, 126 i2c_register_board_info(0, mx1ads_i2c_devices,
@@ -149,6 +144,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS")
149 .map_io = mx1_map_io, 144 .map_io = mx1_map_io,
150 .init_early = imx1_init_early, 145 .init_early = imx1_init_early,
151 .init_irq = mx1_init_irq, 146 .init_irq = mx1_init_irq,
147 .handle_irq = imx1_handle_irq,
152 .timer = &mx1ads_timer, 148 .timer = &mx1ads_timer,
153 .init_machine = mx1ads_init, 149 .init_machine = mx1ads_init,
154MACHINE_END 150MACHINE_END
@@ -158,6 +154,7 @@ MACHINE_START(MXLADS, "Freescale MXLADS")
158 .map_io = mx1_map_io, 154 .map_io = mx1_map_io,
159 .init_early = imx1_init_early, 155 .init_early = imx1_init_early,
160 .init_irq = mx1_init_irq, 156 .init_irq = mx1_init_irq,
157 .handle_irq = imx1_handle_irq,
161 .timer = &mx1ads_timer, 158 .timer = &mx1ads_timer,
162 .init_machine = mx1ads_init, 159 .init_machine = mx1ads_init,
163MACHINE_END 160MACHINE_END