diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-mx1ads.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx1ads.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 842859c22de7..ebe9a29e30a6 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 | ||
71 | static struct physmap_flash_data mx1ads_flash_data = { | 71 | static 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 | ||
75 | static struct resource flash_resource = { | 75 | static 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 | ||
81 | static 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, |