cpuimx27 and mbimx27: allow fine control of UART4 and SDHC2 usage
authorEric Bénard <eric@eukrea.com>
Wed, 19 May 2010 16:45:59 +0000 (18:45 +0200)
committerSascha Hauer <s.hauer@pengutronix.de>
Mon, 26 Jul 2010 12:17:39 +0000 (14:17 +0200)
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-mx2/Kconfig
arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c
arch/arm/mach-mx2/mach-cpuimx27.c

index 742fd4e6dcb928486d299eec335f95b7cba6a431..9d3a9091dd7431c9c707a34d9f19a4711ee583ff 100644 (file)
@@ -67,9 +67,16 @@ config MACH_EUKREA_CPUIMX27_USESDHC2
        bool "CPUIMX27 integrates SDHC2 module"
        depends on MACH_CPUIMX27
        help
-         This adds support for the internal SDHC2 used on CPUIMX27 used
+         This adds support for the internal SDHC2 used on CPUIMX27
          for wifi or eMMC.
 
+config MACH_EUKREA_CPUIMX27_USEUART4
+       bool "CPUIMX27 integrates UART4 module"
+       depends on MACH_CPUIMX27
+       help
+         This adds support for the internal UART4 used on CPUIMX27
+         for bluetooth.
+
 choice
        prompt "Baseboard"
        depends on MACH_CPUIMX27
index 91ab7bbd9fc020b5261f94e627d2297fd872ae2a..fff6c8dc4b3b684f507abd1fe53937c15dbe127b 100644 (file)
@@ -50,10 +50,12 @@ static int eukrea_mbimx27_pins[] = {
        PE10_PF_UART3_CTS,
        PE11_PF_UART3_RTS,
        /* UART4 */
+#if !defined(MACH_EUKREA_CPUIMX27_USEUART4)
        PB26_AF_UART4_RTS,
        PB28_AF_UART4_TXD,
        PB29_AF_UART4_CTS,
        PB31_AF_UART4_RXD,
+#endif
        /* SDHC1*/
        PE18_PF_SD1_D0,
        PE19_PF_SD1_D1,
@@ -229,6 +231,9 @@ static struct imxuart_platform_data uart_pdata[] = {
        {
                .flags = IMXUART_HAVE_RTSCTS,
        },
+       {
+               .flags = IMXUART_HAVE_RTSCTS,
+       },
 };
 
 #if defined(CONFIG_TOUCHSCREEN_ADS7846)
@@ -293,6 +298,9 @@ void __init eukrea_mbimx27_baseboard_init(void)
 
        mxc_register_device(&mxc_uart_device1, &uart_pdata[0]);
        mxc_register_device(&mxc_uart_device2, &uart_pdata[1]);
+#if !defined(MACH_EUKREA_CPUIMX27_USEUART4)
+       mxc_register_device(&mxc_uart_device3, &uart_pdata[2]);
+#endif
 
        mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data);
        mxc_register_device(&mxc_sdhc_device0, NULL);
index 1f616dcaabc9bbf1089438c29e81bc57d0140dea..5c6a16b45891800898196e9120616c3a27c45c37 100644 (file)
@@ -49,10 +49,12 @@ static int eukrea_cpuimx27_pins[] = {
        PE14_PF_UART1_CTS,
        PE15_PF_UART1_RTS,
        /* UART4 */
+#if defined(MACH_EUKREA_CPUIMX27_USEUART4)
        PB26_AF_UART4_RTS,
        PB28_AF_UART4_TXD,
        PB29_AF_UART4_CTS,
        PB31_AF_UART4_RXD,
+#endif
        /* FEC */
        PD0_AIN_FEC_TXD0,
        PD1_AIN_FEC_TXD1,
@@ -76,12 +78,14 @@ static int eukrea_cpuimx27_pins[] = {
        PD17_PF_I2C_DATA,
        PD18_PF_I2C_CLK,
        /* SDHC2 */
+#if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2)
        PB4_PF_SD2_D0,
        PB5_PF_SD2_D1,
        PB6_PF_SD2_D2,
        PB7_PF_SD2_D3,
        PB8_PF_SD2_CMD,
        PB9_PF_SD2_CLK,
+#endif
 #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
        /* Quad UART's IRQ */
        GPIO_PORTD | 22 | GPIO_GPIO | GPIO_IN,
@@ -202,6 +206,8 @@ static void __init eukrea_cpuimx27_init(void)
 #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2)
        /* SDHC2 can be used for Wifi */
        mxc_register_device(&mxc_sdhc_device1, NULL);
+#endif
+#if defined(MACH_EUKREA_CPUIMX27_USEUART4)
        /* in which case UART4 is also used for Bluetooth */
        mxc_register_device(&mxc_uart_device3, &uart_pdata[1]);
 #endif