aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-armadillo5x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/mach-armadillo5x0.c')
-rw-r--r--arch/arm/mach-imx/mach-armadillo5x0.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c
index ede2710f8b76..83e5e3a7b12b 100644
--- a/arch/arm/mach-imx/mach-armadillo5x0.c
+++ b/arch/arm/mach-imx/mach-armadillo5x0.c
@@ -314,25 +314,19 @@ static struct mtd_partition armadillo5x0_nor_flash_partitions[] = {
314 }, 314 },
315}; 315};
316 316
317static struct physmap_flash_data armadillo5x0_nor_flash_pdata = { 317static const struct physmap_flash_data
318 armadillo5x0_nor_flash_pdata __initconst = {
318 .width = 2, 319 .width = 2,
319 .parts = armadillo5x0_nor_flash_partitions, 320 .parts = armadillo5x0_nor_flash_partitions,
320 .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions), 321 .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions),
321}; 322};
322 323
323static struct resource armadillo5x0_nor_flash_resource = { 324static const struct resource armadillo5x0_nor_flash_resource __initconst = {
324 .flags = IORESOURCE_MEM, 325 .flags = IORESOURCE_MEM,
325 .start = MX31_CS0_BASE_ADDR, 326 .start = MX31_CS0_BASE_ADDR,
326 .end = MX31_CS0_BASE_ADDR + SZ_64M - 1, 327 .end = MX31_CS0_BASE_ADDR + SZ_64M - 1,
327}; 328};
328 329
329static struct platform_device armadillo5x0_nor_flash = {
330 .name = "physmap-flash",
331 .id = -1,
332 .num_resources = 1,
333 .resource = &armadillo5x0_nor_flash_resource,
334};
335
336/* 330/*
337 * FB support 331 * FB support
338 */ 332 */
@@ -514,8 +508,10 @@ static void __init armadillo5x0_init(void)
514 imx31_add_mx3_sdc_fb(&mx3fb_pdata); 508 imx31_add_mx3_sdc_fb(&mx3fb_pdata);
515 509
516 /* Register NOR Flash */ 510 /* Register NOR Flash */
517 mxc_register_device(&armadillo5x0_nor_flash, 511 platform_device_register_resndata(NULL, "physmap-flash", -1,
518 &armadillo5x0_nor_flash_pdata); 512 &armadillo5x0_nor_flash_resource, 1,
513 &armadillo5x0_nor_flash_pdata,
514 sizeof(armadillo5x0_nor_flash_pdata));
519 515
520 /* Register NAND Flash */ 516 /* Register NAND Flash */
521 imx31_add_mxc_nand(&armadillo5x0_nand_board_info); 517 imx31_add_mxc_nand(&armadillo5x0_nand_board_info);