summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-cardhu.c
diff options
context:
space:
mode:
authorRamalingam C <ramalingamc@nvidia.com>2012-07-11 14:47:48 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2012-07-30 16:04:30 +0530
commitbc0d0fac8d0228e8ca08b281e5f6f65372050ccb (patch)
treee178df2833ad0663ba2ee6b5f959892b4df2512c /arch/arm/mach-tegra/board-cardhu.c
parentf26ec02921862f7c6dfb85874fc2a469cff03efb (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.c25
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 1ccf13d24d38..37debb70c449 100644
--- a/arch/arm/mach-tegra/board-cardhu.c
+++ b/arch/arm/mach-tegra/board-cardhu.c
@@ -498,6 +498,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. */
@@ -559,6 +569,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);
@@ -604,6 +617,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));
}