Skip to content

Commit

Permalink
arm/tegra: Harmony: Configure PMC for low-level interrupts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Warren authored and Olof Johansson committed Oct 13, 2011
1 parent add29e6 commit 9eb4b91
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion arch/arm/mach-tegra/board-harmony-power.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
#include <linux/i2c.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>

#include <linux/io.h>
#include <linux/regulator/machine.h>
#include <linux/mfd/tps6586x.h>

#include <mach/iomap.h>
#include <mach/irqs.h>

#include "board-harmony.h"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9eb4b91

Please sign in to comment.