From: Stephen Warren Date: Wed, 21 Sep 2011 22:10:40 +0000 (-0600) Subject: arm/tegra: Harmony: Configure PMC for low-level interrupts X-Git-Tag: firefly_0821_release~3680^2~4236^2~1^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9eb4b91e69242a0fd249b8c320c307c17917cbf8;p=firefly-linux-kernel-4.4.55.git arm/tegra: Harmony: Configure PMC for low-level interrupts Without this, the PMC continually detects an interrupt when the PMU_IRQ line is high, causing the tps6686x IRQ handler thread to hog an entire CPU. This change was originally written by Wei Ni for Seaboard in the ChromeOS kernel. Long-term, this should probably be moved into some kind of PMU driver, or perhaps integrated into the GPIO/IRQ/pinmux system? Signed-off-by: Stephen Warren Signed-off-by: Olof Johansson --- diff --git a/arch/arm/mach-tegra/board-harmony-power.c b/arch/arm/mach-tegra/board-harmony-power.c index 5ad8b2f94f8d..21d1285731b3 100644 --- a/arch/arm/mach-tegra/board-harmony-power.c +++ b/arch/arm/mach-tegra/board-harmony-power.c @@ -18,10 +18,11 @@ #include #include #include - +#include #include #include +#include #include #include "board-harmony.h" @@ -113,6 +114,16 @@ static struct i2c_board_info __initdata harmony_regulators[] = { int __init harmony_regulator_init(void) { + void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); + u32 pmc_ctrl; + + /* + * Configure the power management controller to trigger PMU + * interrupts when low + */ + pmc_ctrl = readl(pmc + PMC_CTRL); + writel(pmc_ctrl | PMC_CTRL_INTR_LOW, pmc + PMC_CTRL); + i2c_register_board_info(3, harmony_regulators, 1); return 0;