diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-mx31moboard.c')
| -rw-r--r-- | arch/arm/mach-imx/mach-mx31moboard.c | 38 | 
1 files changed, 13 insertions, 25 deletions
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index 6f424eced18..08730f23844 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c @@ -128,27 +128,15 @@ static struct platform_device mx31moboard_flash = {  	.num_resources = 1,  }; -static int moboard_uart0_init(struct platform_device *pdev) +static void __init moboard_uart0_init(void)  { -	int ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack"); -	if (ret) -		return ret; - -	ret = gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0); -	if (ret) +	if (!gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack")) { +		gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0);  		gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); - -	return ret; -} - -static void moboard_uart0_exit(struct platform_device *pdev) -{ -	gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); +	}  }  static const struct imxuart_platform_data uart0_pdata __initconst = { -	.init = moboard_uart0_init, -	.exit = moboard_uart0_exit,  };  static const struct imxuart_platform_data uart4_pdata __initconst = { @@ -236,32 +224,26 @@ static struct mc13xxx_led_platform_data moboard_led[] = {  	{  		.id = MC13783_LED_R1,  		.name = "coreboard-led-4:red", -		.max_current = 2,  	},  	{  		.id = MC13783_LED_G1,  		.name = "coreboard-led-4:green", -		.max_current = 2,  	},  	{  		.id = MC13783_LED_B1,  		.name = "coreboard-led-4:blue", -		.max_current = 2,  	},  	{  		.id = MC13783_LED_R2,  		.name = "coreboard-led-5:red", -		.max_current = 3,  	},  	{  		.id = MC13783_LED_G2,  		.name = "coreboard-led-5:green", -		.max_current = 3,  	},  	{  		.id = MC13783_LED_B2,  		.name = "coreboard-led-5:blue", -		.max_current = 3,  	},  }; @@ -271,8 +253,14 @@ static struct mc13xxx_leds_platform_data moboard_leds = {  	.led_control[0]	= MC13783_LED_C0_ENABLE | MC13783_LED_C0_ABMODE(0),  	.led_control[1]	= MC13783_LED_C1_SLEWLIM,  	.led_control[2]	= MC13783_LED_C2_SLEWLIM, -	.led_control[3]	= MC13783_LED_C3_PERIOD(0), -	.led_control[4]	= MC13783_LED_C3_PERIOD(0), +	.led_control[3]	= MC13783_LED_C3_PERIOD(0) | +			  MC13783_LED_C3_CURRENT_R1(2) | +			  MC13783_LED_C3_CURRENT_G1(2) | +			  MC13783_LED_C3_CURRENT_B1(2), +	.led_control[4]	= MC13783_LED_C4_PERIOD(0) | +			  MC13783_LED_C4_CURRENT_R2(3) | +			  MC13783_LED_C4_CURRENT_G2(3) | +			  MC13783_LED_C4_CURRENT_B2(3),  };  static struct mc13xxx_buttons_platform_data moboard_buttons = { @@ -543,6 +531,7 @@ static void __init mx31moboard_init(void)  	imx31_add_imx2_wdt(); +	moboard_uart0_init();  	imx31_add_imx_uart0(&uart0_pdata);  	imx31_add_imx_uart4(&uart4_pdata); @@ -611,7 +600,6 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")  	.map_io = mx31_map_io,  	.init_early = imx31_init_early,  	.init_irq = mx31_init_irq, -	.handle_irq = imx31_handle_irq,  	.init_time	= mx31moboard_timer_init,  	.init_machine = mx31moboard_init,  	.restart	= mxc_restart,  | 
