arm/tegra: Harmony: Configure PMC for low-level interrupts
Subsystems (3)
PATCH 1/1 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 <[email protected]> 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?
--- arch/arm/mach-tegra/board-harmony-power.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
arch/arm/mach-tegra/board-harmony-power.c +12 -1
@@ -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"
@@ -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 ;
Signature · 1 line
1.7.0.4
PATCH 1/1 arm/tegra: Harmony: Configure PMC for low-level interrupts
Stephen Warren wrote at Wednesday, September 21, 2011 4:11 PM:
Quoted 9 lines
Without this, the PMC continually detects an interrupt when the
PMU_IRQline is high, causing the tps6686x IRQ handler thread to hog an entire CPU.This change was originally written by Wei Ni <[email protected]> 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?
Olof, is this change OK for inclusion? Or, should we create some kind of PMU driver and interrupt controller to solve this?
Thanks.
Quoted 15 lines
int
__initharmony_regulator_init(void)
{arch/arm/mach-tegra/board-harmony-power.c +10
-0+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 ;
Signature · 1 line
nvpublic
PATCH 1/1 arm/tegra: Harmony: Configure PMC for low-level interrupts
Quoted 5 lines · Stephen Warren
Stephen Warren wrote at Wednesday, September 21, 2011 4:11 PM:
Quoted 4 lines
Without this, the PMC continually detects an interrupt when the
PMU_IRQline is high, causing the tps6686x IRQ handler thread to hog an entire CPU.
Quoted 8 lines
Quoted 5 lines
This change was originally written by Wei Ni <[email protected]> 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?
Olof, is this change OK for inclusion? Or, should we create some kind of PMU driver and interrupt controller to solve this?
I'm OK with it going in now as it is, but as we move to more things to device-tree, having a common piece of code that does it based on properties there would make sense. Today I think every single board needs it.
I'll pick up the patch and push it out later today.
-Olof
Olof Johansson
AppliedQuoted 11 lines · Stephen Warren
Without this, the PMC continually detects an interrupt when the
PMU_IRQline is high, causing the tps6686x IRQ handler thread to hog an entire CPU.This change was originally written by Wei Ni <[email protected]> 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 <[email protected]>
Thanks, applied to for-3.2/features.
-Olof