diff options
author | Ramalingam C <ramalingamc@nvidia.com> | 2012-07-11 14:47:48 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-07-23 14:50:07 -0700 |
commit | 8928dee2d0ddef01bff38c0cbb7931487f66de39 (patch) | |
tree | b2641ad9e37e3fb902667c6abfd78a4717217a90 /arch/arm/mach-tegra/board-cardhu.c | |
parent | 1f2b0eaf5293329eaf35742921e1260552313a2d (diff) |
arm: tegra: cardhu: IrDA support on UARTB
Adds the IrDA support functions to the platform_data of UARTB on Verbier
boards(E1198 and E1186). And also adds a config variable CONFIG_TEGRA_IRDA
to control the IrDA support on Tegra.
Bug 999895
Change-Id: Iab77c419004292190421d55fd02e249ff98c728e
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: http://git-master/r/114930
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c index f8fb5c528cbd..80cab77df587 100644 --- a/arch/arm/mach-tegra/board-cardhu.c +++ b/arch/arm/mach-tegra/board-cardhu.c @@ -492,6 +492,16 @@ static void __init uart_debug_init(void) debug_port_id = 1; } +#ifdef CONFIG_TEGRA_IRDA + if ((board_info.board_id == BOARD_E1186) || + (board_info.board_id == BOARD_E1198)) { + if (debug_port_id == 1) { + cardhu_irda_pdata.is_irda = false; + pr_err("UARTB is not available for IrDA\n"); + } + } +#endif + switch (debug_port_id) { case 0: /* UARTA is the debug port. */ @@ -553,6 +563,9 @@ static void __init cardhu_uart_init(void) { struct clk *c; int i; + struct board_info board_info; + + tegra_get_board_info(&board_info); for (i = 0; i < ARRAY_SIZE(uart_parent_clk); ++i) { c = tegra_get_clock_by_name(uart_parent_clk[i].name); @@ -598,6 +611,18 @@ static void __init cardhu_uart_init(void) } } +#ifdef CONFIG_TEGRA_IRDA + if (((board_info.board_id == BOARD_E1186) || + (board_info.board_id == BOARD_E1198)) && + cardhu_irda_pdata.is_irda) { + cardhu_irda_pdata.parent_clk_list = uart_parent_clk; + cardhu_irda_pdata.parent_clk_count = + ARRAY_SIZE(uart_parent_clk); + + tegra_uartb_device.dev.platform_data = &cardhu_irda_pdata; + } +#endif + platform_add_devices(cardhu_uart_devices, ARRAY_SIZE(cardhu_uart_devices)); } |