aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-harmony-power.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-09-21 18:10:40 -0400
committerOlof Johansson <olof@lixom.net>2011-10-13 18:04:55 -0400
commit9eb4b91e69242a0fd249b8c320c307c17917cbf8 (patch)
tree28c3af2176c9be6e5537b025522d89255991cd12 /arch/arm/mach-tegra/board-harmony-power.c
parentadd29e61d4651fc2f87dab443f47faa70ee96f8f (diff)
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 <wni@nvidia.com> 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 <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony-power.c')
-rw-r--r--arch/arm/mach-tegra/board-harmony-power.c13
1 files changed, 12 insertions, 1 deletions
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 @@
18#include <linux/i2c.h> 18#include <linux/i2c.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21 21#include <linux/io.h>
22#include <linux/regulator/machine.h> 22#include <linux/regulator/machine.h>
23#include <linux/mfd/tps6586x.h> 23#include <linux/mfd/tps6586x.h>
24 24
25#include <mach/iomap.h>
25#include <mach/irqs.h> 26#include <mach/irqs.h>
26 27
27#include "board-harmony.h" 28#include "board-harmony.h"
@@ -113,6 +114,16 @@ static struct i2c_board_info __initdata harmony_regulators[] = {
113 114
114int __init harmony_regulator_init(void) 115int __init harmony_regulator_init(void)
115{ 116{
117 void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
118 u32 pmc_ctrl;
119
120 /*
121 * Configure the power management controller to trigger PMU
122 * interrupts when low
123 */
124 pmc_ctrl = readl(pmc + PMC_CTRL);
125 writel(pmc_ctrl | PMC_CTRL_INTR_LOW, pmc + PMC_CTRL);
126
116 i2c_register_board_info(3, harmony_regulators, 1); 127 i2c_register_board_info(3, harmony_regulators, 1);
117 128
118 return 0; 129 return 0;