Skip to content

Commit

Permalink
ARM: mach-imx/scb9328: Make the UART gpio setup simpler
Browse files Browse the repository at this point in the history
Place the UART gpio initialization inside the scb9328_init function as it is done on
other i.MX boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Fabio Estevam authored and Sascha Hauer committed Jul 7, 2011
1 parent ae81726 commit 31b738a
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions arch/arm/mach-imx/mach-scb9328.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,7 @@ static const int mxc_uart1_pins[] = {
PC12_PF_UART1_RXD,
};

static int uart1_mxc_init(struct platform_device *pdev)
{
return mxc_gpio_setup_multiple_pins(mxc_uart1_pins,
ARRAY_SIZE(mxc_uart1_pins), "UART1");
}

static void uart1_mxc_exit(struct platform_device *pdev)
{
mxc_gpio_release_multiple_pins(mxc_uart1_pins,
ARRAY_SIZE(mxc_uart1_pins));
}

static const struct imxuart_platform_data uart_pdata __initconst = {
.init = uart1_mxc_init,
.exit = uart1_mxc_exit,
.flags = IMXUART_HAVE_RTSCTS,
};

Expand All @@ -129,6 +115,9 @@ static struct platform_device *devices[] __initdata = {
*/
static void __init scb9328_init(void)
{
mxc_gpio_setup_multiple_pins(mxc_uart1_pins,
ARRAY_SIZE(mxc_uart1_pins), "UART1");

imx1_add_imx_uart0(&uart_pdata);

printk(KERN_INFO"Scb9328: Adding devices\n");
Expand Down

0 comments on commit 31b738a

Please sign in to comment.