aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-06-16 05:17:45 -0400
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-06-30 03:00:30 -0400
commit1f8d721cd3dd1a2ee37152ce228f035212074984 (patch)
tree3a2b5ba694a4ffef0bceaeeacf46454d0511b2f3 /arch/arm
parent66384eedd900f2f6bb00e4f16c2cb770d6b0066b (diff)
ARM: imx: Change the way nand devices are registered (imx21)
Make use of new mechanism to register a nand device. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-imx/Kconfig1
-rw-r--r--arch/arm/mach-imx/devices-imx21.h13
-rw-r--r--arch/arm/mach-imx/devices.c4
-rw-r--r--arch/arm/mach-imx/devices.h3
-rw-r--r--arch/arm/mach-imx/mach-mx21ads.c6
5 files changed, 18 insertions, 9 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 73c70af35fc8..23671824abd9 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -68,6 +68,7 @@ comment "MX21 platforms:"
68 68
69config MACH_MX21ADS 69config MACH_MX21ADS
70 bool "MX21ADS platform" 70 bool "MX21ADS platform"
71 select IMX_HAVE_PLATFORM_MXC_NAND
71 help 72 help
72 Include support for MX21ADS platform. This includes specific 73 Include support for MX21ADS platform. This includes specific
73 configurations for the board and its peripherals. 74 configurations for the board and its peripherals.
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h
new file mode 100644
index 000000000000..e85dcb1b4604
--- /dev/null
+++ b/arch/arm/mach-imx/devices-imx21.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/mx21.h>
10#include <mach/devices-common.h>
11
12#define imx21_add_mxc_nand(pdata) \
13 imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata)
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c
index ceae6413d4c6..dbd1460e46cf 100644
--- a/arch/arm/mach-imx/devices.c
+++ b/arch/arm/mach-imx/devices.c
@@ -357,10 +357,6 @@ struct platform_device mxc_w1_master_device = {
357 .resource = pfx ## _nand_resources, \ 357 .resource = pfx ## _nand_resources, \
358 } 358 }
359 359
360#ifdef CONFIG_MACH_MX21
361DEFINE_MXC_NAND_DEVICE(imx21, MX21_NFC_BASE_ADDR, MX21_INT_NANDFC);
362#endif
363
364#ifdef CONFIG_MACH_MX27 360#ifdef CONFIG_MACH_MX27
365DEFINE_MXC_NAND_DEVICE(imx27, MX27_NFC_BASE_ADDR, MX27_INT_NANDFC); 361DEFINE_MXC_NAND_DEVICE(imx27, MX27_NFC_BASE_ADDR, MX27_INT_NANDFC);
366#endif 362#endif
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h
index 5c1a0dcb7511..d3c381f2c74f 100644
--- a/arch/arm/mach-imx/devices.h
+++ b/arch/arm/mach-imx/devices.h
@@ -26,9 +26,6 @@ extern struct platform_device imx2x_uart_device4;
26extern struct platform_device imx2x_uart_device5; 26extern struct platform_device imx2x_uart_device5;
27#endif 27#endif
28extern struct platform_device mxc_w1_master_device; 28extern struct platform_device mxc_w1_master_device;
29#ifdef CONFIG_MACH_MX21
30extern struct platform_device imx21_nand_device;
31#endif
32#ifdef CONFIG_MACH_MX27 29#ifdef CONFIG_MACH_MX27
33extern struct platform_device imx27_nand_device; 30extern struct platform_device imx27_nand_device;
34#endif 31#endif
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c
index 39c645a8adad..fde2a5770bfe 100644
--- a/arch/arm/mach-imx/mach-mx21ads.c
+++ b/arch/arm/mach-imx/mach-mx21ads.c
@@ -30,6 +30,7 @@
30#include <mach/mxc_nand.h> 30#include <mach/mxc_nand.h>
31#include <mach/mmc.h> 31#include <mach/mmc.h>
32 32
33#include "devices-imx21.h"
33#include "devices.h" 34#include "devices.h"
34 35
35/* 36/*
@@ -257,7 +258,8 @@ static struct imxmmc_platform_data mx21ads_sdhc_pdata = {
257 .exit = mx21ads_sdhc_exit, 258 .exit = mx21ads_sdhc_exit,
258}; 259};
259 260
260static struct mxc_nand_platform_data mx21ads_nand_board_info = { 261static const struct mxc_nand_platform_data
262mx21ads_nand_board_info __initconst = {
261 .width = 1, 263 .width = 1,
262 .hw_ecc = 1, 264 .hw_ecc = 1,
263}; 265};
@@ -298,7 +300,7 @@ static void __init mx21ads_board_init(void)
298 mxc_register_device(&imx2x_uart_device3, &uart_pdata); 300 mxc_register_device(&imx2x_uart_device3, &uart_pdata);
299 mxc_register_device(&mxc_fb_device, &mx21ads_fb_data); 301 mxc_register_device(&mxc_fb_device, &mx21ads_fb_data);
300 mxc_register_device(&mxc_sdhc_device0, &mx21ads_sdhc_pdata); 302 mxc_register_device(&mxc_sdhc_device0, &mx21ads_sdhc_pdata);
301 mxc_register_device(&imx21_nand_device, &mx21ads_nand_board_info); 303 imx21_add_mxc_nand(&mx21ads_nand_board_info);
302 304
303 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 305 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
304} 306}