From 68c94b40b31926f627573a7f656b903f6644744e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 4 Feb 2010 22:04:32 +0100 Subject: arm/mx2: use cpp magic to create spi_imx devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the source shorter and easier to verify. While at it switch to use the SoC-prefixed constants. Signed-off-by: Uwe Kleine-König --- arch/arm/mach-mx2/devices.h | 2 ++ 1 file changed, 2 insertions(+) (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 97306aa18f1c..e13a352f0b8a 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -25,6 +25,8 @@ extern struct platform_device mxc_usbh1; extern struct platform_device mxc_usbh2; extern struct platform_device mxc_spi_device0; extern struct platform_device mxc_spi_device1; +#ifdef CONFIG_MACH_MX27 extern struct platform_device mxc_spi_device2; +#endif extern struct platform_device imx_ssi_device0; extern struct platform_device imx_ssi_device1; -- cgit v1.2.3 From 2b84a3640ffdebbbea3ec004eae963e920c16e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 4 Feb 2010 14:11:02 +0100 Subject: arm/mx2: use cpp magic to create imx_gpt devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the source shorter and easier to verify. While at it switch to use the SoC-prefixed constants. Signed-off-by: Uwe Kleine-König --- arch/arm/mach-mx2/devices.h | 2 ++ 1 file changed, 2 insertions(+) (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 e13a352f0b8a..a0c6e1ad22d2 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -1,8 +1,10 @@ extern struct platform_device mxc_gpt1; extern struct platform_device mxc_gpt2; +#ifdef CONFIG_MACH_MX27 extern struct platform_device mxc_gpt3; extern struct platform_device mxc_gpt4; extern struct platform_device mxc_gpt5; +#endif extern struct platform_device mxc_wdt; extern struct platform_device mxc_uart_device0; extern struct platform_device mxc_uart_device1; -- cgit v1.2.3 From 9309b2ba54d9082b8eb2ce641ad395cf5d9929f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 4 Feb 2010 22:13:52 +0100 Subject: arm/mx2: use cpp magic to create imx-i2c devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the source shorter and easier to verify. While at it switch to use the SoC-prefixed constants. Signed-off-by: Uwe Kleine-König --- arch/arm/mach-mx2/devices.h | 2 ++ 1 file changed, 2 insertions(+) (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 a0c6e1ad22d2..0dee0f5e681c 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -18,7 +18,9 @@ extern struct platform_device mxc_fb_device; extern struct platform_device mxc_fec_device; extern struct platform_device mxc_pwm_device; extern struct platform_device mxc_i2c_device0; +#ifdef CONFIG_MACH_MX27 extern struct platform_device mxc_i2c_device1; +#endif extern struct platform_device mxc_sdhc_device0; extern struct platform_device mxc_sdhc_device1; extern struct platform_device mxc_otg_udc_device; -- cgit v1.2.3 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 0dee0f5e681c..02e5dd203095 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.2.3 From 3636a145321573f2f735e3ae69f87e0fb166abec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 11 Feb 2010 16:31:49 +0100 Subject: arm/mx2: use per-SOC nand device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous commit introduced one nand device per SoC. Use this directly instead of the compatibility macro that will break for multi-SoC kernels. And while at it remove the compatibility macro now that all in-tree users are fixed. Signed-off-by: Uwe Kleine-König --- arch/arm/mach-mx2/devices.h | 4 ---- 1 file changed, 4 deletions(-) (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 02e5dd203095..f15df2aaae4d 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h @@ -15,13 +15,9 @@ extern struct platform_device mxc_uart_device5; extern struct platform_device mxc_w1_master_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; -- cgit v1.2.3