diff options
author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-07-06 16:00:45 -0400 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-07-06 16:00:45 -0400 |
commit | 56d3914eb46cb440895c8a071f63ceed97c4e775 (patch) | |
tree | 6b265aecd74b9dc017fa36c91e8aba739e2519e0 | |
parent | 6ee705144a3f19928796bd21d128e2a9316c4f94 (diff) |
Revert "arm: omap4: support pmu"
This reverts commit 4fefbe94a77c3d3b5e75d386628c36298c72c57f.
On Wed, 6 Jul 2011, john stultz wrote:
> As posted in https://bugs.launchpad.net/linux-linaro/+bug/802693 the
> following commit has been causing boot hangs on some panda boards:
>
> arm: omap4: support pmu - 4fefbe94a77c3d3b5e75d386628c36298c72c57f
>
> Reverting it seems to resolve the hang. Avik doesn't see the problem on
> his board, but Zach and I both have hit it with ours. We have not gotten
> any traction on resolving the hang and its blocking Linaro Android
> Platform Images for panda.
>
> Since its been a week with no solution, I wanted to propose we revert
> that patch.
Lack of boot hang is certainly preferable to lack of PMU support.
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 82 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap44xx.h | 2 |
2 files changed, 3 insertions, 81 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 53e5070ba31..5b8ca680ed9 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -22,7 +22,6 @@ #include <asm/mach-types.h> #include <asm/mach/map.h> #include <asm/pmu.h> -#include <asm/cti.h> #include <plat/tc.h> #include <plat/board.h> @@ -401,95 +400,20 @@ static struct resource omap3_pmu_resource = { .flags = IORESOURCE_IRQ, }; -static struct resource omap4_pmu_resource[] = { - { - .start = OMAP44XX_IRQ_CTI0, - .end = OMAP44XX_IRQ_CTI0, - .flags = IORESOURCE_IRQ, - }, - { - .start = OMAP44XX_IRQ_CTI1, - .end = OMAP44XX_IRQ_CTI1, - .flags = IORESOURCE_IRQ, - } -}; - static struct platform_device omap_pmu_device = { .name = "arm-pmu", .id = ARM_PMU_DEVICE_CPU, .num_resources = 1, }; -static struct arm_pmu_platdata omap4_pmu_data; -static struct cti omap4_cti[2]; - -static void omap4_enable_cti(int irq) -{ - if (irq == OMAP44XX_IRQ_CTI0) - cti_enable(&omap4_cti[0]); - else if (irq == OMAP44XX_IRQ_CTI1) - cti_enable(&omap4_cti[1]); -} - -static void omap4_disable_cti(int irq) -{ - if (irq == OMAP44XX_IRQ_CTI0) - cti_disable(&omap4_cti[0]); - else if (irq == OMAP44XX_IRQ_CTI1) - cti_disable(&omap4_cti[1]); -} - -static irqreturn_t omap4_pmu_handler(int irq, void *dev, irq_handler_t handler) -{ - if (irq == OMAP44XX_IRQ_CTI0) - cti_irq_ack(&omap4_cti[0]); - else if (irq == OMAP44XX_IRQ_CTI1) - cti_irq_ack(&omap4_cti[1]); - - return handler(irq, dev); -} - -static void omap4_configure_pmu_irq(void) -{ - void __iomem *base0; - void __iomem *base1; - - base0 = ioremap(OMAP44XX_CTI0_BASE, SZ_4K); - base1 = ioremap(OMAP44XX_CTI1_BASE, SZ_4K); - if (!base0 && !base1) { - pr_err("ioremap for OMAP4 CTI failed\n"); - return; - } - - /*configure CTI0 for pmu irq routing*/ - cti_init(&omap4_cti[0], base0, OMAP44XX_IRQ_CTI0, 6); - cti_unlock(&omap4_cti[0]); - cti_map_trigger(&omap4_cti[0], 1, 6, 2); - - /*configure CTI1 for pmu irq routing*/ - cti_init(&omap4_cti[1], base1, OMAP44XX_IRQ_CTI1, 6); - cti_unlock(&omap4_cti[1]); - cti_map_trigger(&omap4_cti[1], 1, 6, 2); - - omap4_pmu_data.handle_irq = omap4_pmu_handler; - omap4_pmu_data.enable_irq = omap4_enable_cti; - omap4_pmu_data.disable_irq = omap4_disable_cti; -} - static void omap_init_pmu(void) { - if (cpu_is_omap24xx()) { + if (cpu_is_omap24xx()) omap_pmu_device.resource = &omap2_pmu_resource; - } else if (cpu_is_omap34xx()) { + else if (cpu_is_omap34xx()) omap_pmu_device.resource = &omap3_pmu_resource; - } else if (cpu_is_omap44xx()) { - omap_pmu_device.resource = omap4_pmu_resource; - omap_pmu_device.num_resources = 2; - omap_pmu_device.dev.platform_data = &omap4_pmu_data; - omap4_configure_pmu_irq(); - } else { + else return; - } platform_device_register(&omap_pmu_device); } diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h index b127a1641f4..ea2b8a6306e 100644 --- a/arch/arm/plat-omap/include/plat/omap44xx.h +++ b/arch/arm/plat-omap/include/plat/omap44xx.h @@ -57,7 +57,5 @@ #define OMAP44XX_HSUSB_OHCI_BASE (L4_44XX_BASE + 0x64800) #define OMAP44XX_HSUSB_EHCI_BASE (L4_44XX_BASE + 0x64C00) -#define OMAP44XX_CTI0_BASE 0x54148000 -#define OMAP44XX_CTI1_BASE 0x54149000 #endif /* __ASM_ARCH_OMAP44XX_H */ |