Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[sfrench/cifs-2.6.git] / arch / arm / mach-mx3 / mach-mx31moboard.c
index fe18cd513cd7c23157659b727cb6362fcae5fcda..fccb9207b78d75112bed0b7ac0d3d45a17367e1b 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/fsl_devices.h>
+#include <linux/gfp.h>
 #include <linux/gpio.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
@@ -96,9 +97,6 @@ static unsigned int moboard_pins[] = {
        /* LEDs */
        MX31_PIN_SVEN0__GPIO2_0, MX31_PIN_STX0__GPIO2_1,
        MX31_PIN_SRX0__GPIO2_2, MX31_PIN_SIMPD0__GPIO2_3,
-       /* SEL */
-       MX31_PIN_DTR_DCE1__GPIO2_8, MX31_PIN_DSR_DCE1__GPIO2_9,
-       MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11,
        /* SPI1 */
        MX31_PIN_CSPI2_MOSI__MOSI, MX31_PIN_CSPI2_MISO__MISO,
        MX31_PIN_CSPI2_SCLK__SCLK, MX31_PIN_CSPI2_SPI_RDY__SPI_RDY,
@@ -352,9 +350,7 @@ static struct fsl_usb2_platform_data usb_pdata = {
 
 static int moboard_usbh2_hw_init(struct platform_device *pdev)
 {
-       int ret = gpio_request(USBH2_EN_B, "usbh2-en");
-       if (ret)
-               return ret;
+       int ret;
 
        mxc_iomux_set_gpr(MUX_PGP_UH2, true);
 
@@ -371,6 +367,9 @@ static int moboard_usbh2_hw_init(struct platform_device *pdev)
        mxc_iomux_set_pad(MX31_PIN_SRXD3, USB_PAD_CFG);
        mxc_iomux_set_pad(MX31_PIN_STXD3, USB_PAD_CFG);
 
+       ret = gpio_request(USBH2_EN_B, "usbh2-en");
+       if (ret)
+               return ret;
        gpio_direction_output(USBH2_EN_B, 0);
 
        return 0;
@@ -431,34 +430,6 @@ static struct platform_device mx31moboard_leds_device = {
        },
 };
 
-#define SEL0 IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1)
-#define SEL1 IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1)
-#define SEL2 IOMUX_TO_GPIO(MX31_PIN_RI_DCE1)
-#define SEL3 IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1)
-
-static void mx31moboard_init_sel_gpios(void)
-{
-       if (!gpio_request(SEL0, "sel0")) {
-               gpio_direction_input(SEL0);
-               gpio_export(SEL0, true);
-       }
-
-       if (!gpio_request(SEL1, "sel1")) {
-               gpio_direction_input(SEL1);
-               gpio_export(SEL1, true);
-       }
-
-       if (!gpio_request(SEL2, "sel2")) {
-               gpio_direction_input(SEL2);
-               gpio_export(SEL2, true);
-       }
-
-       if (!gpio_request(SEL3, "sel3")) {
-               gpio_direction_input(SEL3);
-               gpio_export(SEL3, true);
-       }
-}
-
 static struct ipu_platform_data mx3_ipu_data = {
        .irq_base = MXC_IPU_IRQ_START,
 };
@@ -518,8 +489,6 @@ static void __init mxc_board_init(void)
 
        mxc_register_device(&mxc_uart_device4, &uart4_pdata);
 
-       mx31moboard_init_sel_gpios();
-
        mxc_register_device(&mxc_i2c_device0, &moboard_i2c0_pdata);
        mxc_register_device(&mxc_i2c_device1, &moboard_i2c1_pdata);
 
@@ -552,6 +521,9 @@ static void __init mxc_board_init(void)
        case MX31MARXBOT:
                mx31moboard_marxbot_init();
                break;
+       case MX31SMARTBOT:
+               mx31moboard_smartbot_init();
+               break;
        default:
                printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n",
                        mx31moboard_baseboard);