diff options
author | Ramalingam C <ramalingamc@nvidia.com> | 2011-12-30 17:59:06 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-01-04 11:45:26 +0530 |
commit | 9b81082b053ee72f5b3185152c0157f8e85c99eb (patch) | |
tree | 9d9e0bc09075a6107981a2fcc6deb6a6640f7ee7 /arch | |
parent | 3beafd3f1ed49f96258e46accb108eaebd462881 (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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony.c | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index e69cf33e20a0..f3f15a1bd3db 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c @@ -55,6 +55,7 @@ #include "clock.h" #include "devices.h" #include "gpio-names.h" +#include "pm.h" /* NVidia bootloader tags */ #define ATAG_NVIDIA 0x41000801 @@ -163,20 +164,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, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = 216000000, - }, { - .flags = 0 - } -}; - static struct gpio_keys_button harmony_gpio_keys_buttons[] = { { .code = KEY_POWER, @@ -201,14 +188,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 +330,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, @@ -477,6 +482,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; |