From f0d3ab49110327516b7f0b6d27fd33d6fa079d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 5 Feb 2010 16:57:59 +0100 Subject: arm/mx2: define seperate imx_nand devices for imx21 and imx27 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As the NFC controller has different addresses on imx21 and imx27 there are two different devices needed if not relying on the overloaded cpp macro NFC_BASE_ADDR. So some cpp magic is added to minimize code duplication. As obviously these two defines need different names, the name of the old device is #defined to the new one when building for only one of imx21 or imx27. Signed-off-by: Uwe Kleine-König --- arch/arm/mach-mx2/devices.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-mx2/devices.h') diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index 0dee0f5..02e5dd2 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -13,7 +13,16 @@ extern struct platform_device mxc_uart_device3; extern struct platform_device mxc_uart_device4; extern struct platform_device mxc_uart_device5; extern struct platform_device mxc_w1_master_device; -extern struct platform_device mxc_nand_device; +#ifdef CONFIG_MACH_MX21 +extern struct platform_device imx21_nand_device; +#define mxc_nand_device imx21_nand_device +#endif +#ifdef CONFIG_MACH_MX27 +extern struct platform_device imx27_nand_device; +#ifndef CONFIG_MACH_MX21 +#define mxc_nand_device imx27_nand_device +#endif +#endif extern struct platform_device mxc_fb_device; extern struct platform_device mxc_fec_device; extern struct platform_device mxc_pwm_device; -- cgit v1.1