aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-mx31moboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx31moboard.c')
-rw-r--r--arch/arm/mach-mx3/mach-mx31moboard.c43
1 files changed, 7 insertions, 36 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index fe18cd513cd7..a7dc5191bf5e 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -96,9 +96,6 @@ static unsigned int moboard_pins[] = {
96 /* LEDs */ 96 /* LEDs */
97 MX31_PIN_SVEN0__GPIO2_0, MX31_PIN_STX0__GPIO2_1, 97 MX31_PIN_SVEN0__GPIO2_0, MX31_PIN_STX0__GPIO2_1,
98 MX31_PIN_SRX0__GPIO2_2, MX31_PIN_SIMPD0__GPIO2_3, 98 MX31_PIN_SRX0__GPIO2_2, MX31_PIN_SIMPD0__GPIO2_3,
99 /* SEL */
100 MX31_PIN_DTR_DCE1__GPIO2_8, MX31_PIN_DSR_DCE1__GPIO2_9,
101 MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11,
102 /* SPI1 */ 99 /* SPI1 */
103 MX31_PIN_CSPI2_MOSI__MOSI, MX31_PIN_CSPI2_MISO__MISO, 100 MX31_PIN_CSPI2_MOSI__MOSI, MX31_PIN_CSPI2_MISO__MISO,
104 MX31_PIN_CSPI2_SCLK__SCLK, MX31_PIN_CSPI2_SPI_RDY__SPI_RDY, 101 MX31_PIN_CSPI2_SCLK__SCLK, MX31_PIN_CSPI2_SPI_RDY__SPI_RDY,
@@ -352,9 +349,7 @@ static struct fsl_usb2_platform_data usb_pdata = {
352 349
353static int moboard_usbh2_hw_init(struct platform_device *pdev) 350static int moboard_usbh2_hw_init(struct platform_device *pdev)
354{ 351{
355 int ret = gpio_request(USBH2_EN_B, "usbh2-en"); 352 int ret;
356 if (ret)
357 return ret;
358 353
359 mxc_iomux_set_gpr(MUX_PGP_UH2, true); 354 mxc_iomux_set_gpr(MUX_PGP_UH2, true);
360 355
@@ -371,6 +366,9 @@ static int moboard_usbh2_hw_init(struct platform_device *pdev)
371 mxc_iomux_set_pad(MX31_PIN_SRXD3, USB_PAD_CFG); 366 mxc_iomux_set_pad(MX31_PIN_SRXD3, USB_PAD_CFG);
372 mxc_iomux_set_pad(MX31_PIN_STXD3, USB_PAD_CFG); 367 mxc_iomux_set_pad(MX31_PIN_STXD3, USB_PAD_CFG);
373 368
369 ret = gpio_request(USBH2_EN_B, "usbh2-en");
370 if (ret)
371 return ret;
374 gpio_direction_output(USBH2_EN_B, 0); 372 gpio_direction_output(USBH2_EN_B, 0);
375 373
376 return 0; 374 return 0;
@@ -431,34 +429,6 @@ static struct platform_device mx31moboard_leds_device = {
431 }, 429 },
432}; 430};
433 431
434#define SEL0 IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1)
435#define SEL1 IOMUX_TO_GPIO(MX31_PIN_DSR_DCE1)
436#define SEL2 IOMUX_TO_GPIO(MX31_PIN_RI_DCE1)
437#define SEL3 IOMUX_TO_GPIO(MX31_PIN_DCD_DCE1)
438
439static void mx31moboard_init_sel_gpios(void)
440{
441 if (!gpio_request(SEL0, "sel0")) {
442 gpio_direction_input(SEL0);
443 gpio_export(SEL0, true);
444 }
445
446 if (!gpio_request(SEL1, "sel1")) {
447 gpio_direction_input(SEL1);
448 gpio_export(SEL1, true);
449 }
450
451 if (!gpio_request(SEL2, "sel2")) {
452 gpio_direction_input(SEL2);
453 gpio_export(SEL2, true);
454 }
455
456 if (!gpio_request(SEL3, "sel3")) {
457 gpio_direction_input(SEL3);
458 gpio_export(SEL3, true);
459 }
460}
461
462static struct ipu_platform_data mx3_ipu_data = { 432static struct ipu_platform_data mx3_ipu_data = {
463 .irq_base = MXC_IPU_IRQ_START, 433 .irq_base = MXC_IPU_IRQ_START,
464}; 434};
@@ -518,8 +488,6 @@ static void __init mxc_board_init(void)
518 488
519 mxc_register_device(&mxc_uart_device4, &uart4_pdata); 489 mxc_register_device(&mxc_uart_device4, &uart4_pdata);
520 490
521 mx31moboard_init_sel_gpios();
522
523 mxc_register_device(&mxc_i2c_device0, &moboard_i2c0_pdata); 491 mxc_register_device(&mxc_i2c_device0, &moboard_i2c0_pdata);
524 mxc_register_device(&mxc_i2c_device1, &moboard_i2c1_pdata); 492 mxc_register_device(&mxc_i2c_device1, &moboard_i2c1_pdata);
525 493
@@ -552,6 +520,9 @@ static void __init mxc_board_init(void)
552 case MX31MARXBOT: 520 case MX31MARXBOT:
553 mx31moboard_marxbot_init(); 521 mx31moboard_marxbot_init();
554 break; 522 break;
523 case MX31SMARTBOT:
524 mx31moboard_smartbot_init();
525 break;
555 default: 526 default:
556 printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n", 527 printk(KERN_ERR "Illegal mx31moboard_baseboard type %d\n",
557 mx31moboard_baseboard); 528 mx31moboard_baseboard);