diff options
author | Ramalingam C <ramalingamc@nvidia.com> | 2011-12-30 17:59:06 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2012-03-23 21:03:35 -0700 |
commit | b491b53b5eca61d9f3f8e366b530fbaa5def0958 (patch) | |
tree | 8d77231b59139a5dd4344dd9b04a8385e0742377 /arch/arm/mach-tegra/board-harmony.c | |
parent | 364cd1a2e6ad9007251139d8359ece88001f9316 (diff) |
arm: tegra: fix for spurious INT on PNP of uart
On Harmony during PNP of UART console, spurious interrupts are triggered
continuously. Hence kernel/irq/spurious.c will disable the interrupt.
To avoid the trigger of spurious interrupts, this patch disables the
modem status interrupts.
Bug: 909044
Change-Id: I00529ed16503d2c29f377e558b90f2c379e8b624
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: http://git-master/r/72751
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Rebase-Id: R53289c2898003dcec2dc5d72aec8a564b702e0a4
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony.c')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony.c | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index 97b5182c658b..fc436691a326 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c @@ -54,6 +54,7 @@ #include "clock.h" #include "devices.h" #include "gpio-names.h" +#include "pm.h" /* NVidia bootloader tags */ #define ATAG_NVIDIA 0x41000801 @@ -162,21 +163,6 @@ struct platform_device tegra_nand_device = { }, }; -static struct plat_serial8250_port debug_uart_platform_data[] = { - { - .membase = IO_ADDRESS(TEGRA_UARTD_BASE), - .mapbase = TEGRA_UARTD_BASE, - .irq = INT_UARTD, - .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, - .type = PORT_TEGRA, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = 216000000, - }, { - .flags = 0 - } -}; - static struct gpio_keys_button harmony_gpio_keys_buttons[] = { { .code = KEY_POWER, @@ -201,14 +187,6 @@ static struct platform_device harmony_gpio_keys_device = { } }; -static struct platform_device debug_uart = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev = { - .platform_data = debug_uart_platform_data, - }, -}; - static void harmony_keys_init(void) { int i; @@ -351,8 +329,34 @@ static struct platform_device pda_power_device = { }, }; +static void harmony_debug_uart_init(void) +{ + struct clk *c; + + debug_uart_clk = clk_get_sys("serial8250.0", "uartd"); + debug_uart_port_base = ((struct plat_serial8250_port *)( + debug_uartd_device.dev.platform_data))->mapbase; + + if (!IS_ERR_OR_NULL(debug_uart_clk)) { + pr_info("The debug console clock name is %s\n", + debug_uart_clk->name); + c = tegra_get_clock_by_name("pll_p"); + if (IS_ERR_OR_NULL(c)) + pr_err("Not getting the parent clock pll_p\n"); + else + clk_set_parent(debug_uart_clk, c); + + clk_enable(debug_uart_clk); + clk_set_rate(debug_uart_clk, clk_get_rate(c)); + } else { + pr_err("Not getting the clock %s for debug console\n", + debug_uart_clk->name); + } + return; +} + static struct platform_device *harmony_devices[] __initdata = { - &debug_uart, + &debug_uartd_device, &tegra_sdhci_device1, &tegra_sdhci_device2, &tegra_sdhci_device4, @@ -444,6 +448,8 @@ static void __init tegra_harmony_init(void) harmony_keys_init(); + harmony_debug_uart_init(); + tegra_sdhci_device1.dev.platform_data = &sdhci_pdata1; tegra_sdhci_device2.dev.platform_data = &sdhci_pdata2; tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; |