aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx25/Kconfig1
-rw-r--r--arch/arm/mach-mx25/devices-imx25.h13
-rw-r--r--arch/arm/mach-mx25/devices.c20
-rw-r--r--arch/arm/mach-mx25/devices.h1
-rw-r--r--arch/arm/mach-mx25/mach-mx25_3ds.c10
5 files changed, 20 insertions, 25 deletions
diff --git a/arch/arm/mach-mx25/Kconfig b/arch/arm/mach-mx25/Kconfig
index 54d217314ee9..3c4f1eeb88e5 100644
--- a/arch/arm/mach-mx25/Kconfig
+++ b/arch/arm/mach-mx25/Kconfig
@@ -4,5 +4,6 @@ comment "MX25 platforms:"
4 4
5config MACH_MX25_3DS 5config MACH_MX25_3DS
6 bool "Support MX25PDK (3DS) Platform" 6 bool "Support MX25PDK (3DS) Platform"
7 select IMX_HAVE_PLATFORM_MXC_NAND
7 8
8endif 9endif
diff --git a/arch/arm/mach-mx25/devices-imx25.h b/arch/arm/mach-mx25/devices-imx25.h
new file mode 100644
index 000000000000..f8d4ee0b1eb6
--- /dev/null
+++ b/arch/arm/mach-mx25/devices-imx25.h
@@ -0,0 +1,13 @@
1/*
2 * Copyright (C) 2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation.
8 */
9#include <mach/mx25.h>
10#include <mach/devices-common.h>
11
12#define imx25_add_mxc_nand(pdata) \
13 imx_add_mxc_nand_v21(MX25_NFC_BASE_ADDR, MX25_INT_NANDFC, pdata)
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c
index 80f313180713..e1c3cd14078c 100644
--- a/arch/arm/mach-mx25/devices.c
+++ b/arch/arm/mach-mx25/devices.c
@@ -439,26 +439,6 @@ struct platform_device mx25_fec_device = {
439 .resource = mx25_fec_resources, 439 .resource = mx25_fec_resources,
440}; 440};
441 441
442static struct resource mxc_nand_resources[] = {
443 {
444 .start = MX25_NFC_BASE_ADDR,
445 .end = MX25_NFC_BASE_ADDR + 0x1fff,
446 .flags = IORESOURCE_MEM,
447 },
448 {
449 .start = MX25_INT_NANDFC,
450 .end = MX25_INT_NANDFC,
451 .flags = IORESOURCE_IRQ,
452 },
453};
454
455struct platform_device mxc_nand_device = {
456 .name = "mxc_nand",
457 .id = 0,
458 .num_resources = ARRAY_SIZE(mxc_nand_resources),
459 .resource = mxc_nand_resources,
460};
461
462static struct resource mx25_rtc_resources[] = { 442static struct resource mx25_rtc_resources[] = {
463 { 443 {
464 .start = MX25_DRYICE_BASE_ADDR, 444 .start = MX25_DRYICE_BASE_ADDR,
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h
index cee12c0a0be6..f212c93648c9 100644
--- a/arch/arm/mach-mx25/devices.h
+++ b/arch/arm/mach-mx25/devices.h
@@ -18,7 +18,6 @@ extern struct platform_device mxc_i2c_device0;
18extern struct platform_device mxc_i2c_device1; 18extern struct platform_device mxc_i2c_device1;
19extern struct platform_device mxc_i2c_device2; 19extern struct platform_device mxc_i2c_device2;
20extern struct platform_device mx25_fec_device; 20extern struct platform_device mx25_fec_device;
21extern struct platform_device mxc_nand_device;
22extern struct platform_device mx25_rtc_device; 21extern struct platform_device mx25_rtc_device;
23extern struct platform_device mx25_fb_device; 22extern struct platform_device mx25_fb_device;
24extern struct platform_device mxc_wdt; 23extern struct platform_device mxc_wdt;
diff --git a/arch/arm/mach-mx25/mach-mx25_3ds.c b/arch/arm/mach-mx25/mach-mx25_3ds.c
index 26ba246c57ee..e1e98864c8e7 100644
--- a/arch/arm/mach-mx25/mach-mx25_3ds.c
+++ b/arch/arm/mach-mx25/mach-mx25_3ds.c
@@ -40,11 +40,12 @@
40#include <mach/common.h> 40#include <mach/common.h>
41#include <mach/imx-uart.h> 41#include <mach/imx-uart.h>
42#include <mach/mx25.h> 42#include <mach/mx25.h>
43#include <mach/mxc_nand.h>
44#include <mach/imxfb.h> 43#include <mach/imxfb.h>
45#include "devices.h"
46#include <mach/iomux-mx25.h> 44#include <mach/iomux-mx25.h>
47 45
46#include "devices-imx25.h"
47#include "devices.h"
48
48static struct imxuart_platform_data uart_pdata = { 49static struct imxuart_platform_data uart_pdata = {
49 .flags = IMXUART_HAVE_RTSCTS, 50 .flags = IMXUART_HAVE_RTSCTS,
50}; 51};
@@ -109,7 +110,8 @@ static void __init mx25pdk_fec_reset(void)
109 gpio_set_value(FEC_RESET_B_GPIO, 1); 110 gpio_set_value(FEC_RESET_B_GPIO, 1);
110} 111}
111 112
112static struct mxc_nand_platform_data mx25pdk_nand_board_info = { 113static const struct mxc_nand_platform_data
114mx25pdk_nand_board_info __initconst = {
113 .width = 1, 115 .width = 1,
114 .hw_ecc = 1, 116 .hw_ecc = 1,
115 .flash_bbt = 1, 117 .flash_bbt = 1,
@@ -150,7 +152,7 @@ static void __init mx25pdk_init(void)
150 152
151 mxc_register_device(&mxc_uart_device0, &uart_pdata); 153 mxc_register_device(&mxc_uart_device0, &uart_pdata);
152 mxc_register_device(&mxc_usbh2, NULL); 154 mxc_register_device(&mxc_usbh2, NULL);
153 mxc_register_device(&mxc_nand_device, &mx25pdk_nand_board_info); 155 imx25_add_mxc_nand(&mx25pdk_nand_board_info);
154 mxc_register_device(&mx25_rtc_device, NULL); 156 mxc_register_device(&mx25_rtc_device, NULL);
155 mxc_register_device(&mx25_fb_device, &mx25pdk_fb_pdata); 157 mxc_register_device(&mx25_fb_device, &mx25pdk_fb_pdata);
156 158