From 6313667e379f57c05938a04ee43321ff516c4892 Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Fri, 9 Apr 2010 13:57:51 +0100 Subject: [PATCH] --- yaml --- r: 191788 b: refs/heads/master c: 3e9cc70590287f7cb7e38793bbf968b3362b7612 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/devices.c | 34 ----------------------------- trunk/arch/arm/plat-pxa/Makefile | 2 +- trunk/arch/arm/plat-pxa/pmu.c | 33 ++++++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 36 deletions(-) create mode 100644 trunk/arch/arm/plat-pxa/pmu.c diff --git a/[refs] b/[refs] index bf13cce758ec..35f84eb74975 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 883413341e479d4e9f9c69def4884b4c6e1cef4e +refs/heads/master: 3e9cc70590287f7cb7e38793bbf968b3362b7612 diff --git a/trunk/arch/arm/mach-omap2/devices.c b/trunk/arch/arm/mach-omap2/devices.c index 4a1c2328bcc3..23e4d7733610 100644 --- a/trunk/arch/arm/mach-omap2/devices.c +++ b/trunk/arch/arm/mach-omap2/devices.c @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include #include @@ -455,37 +453,6 @@ static void omap_init_mcspi(void) static inline void omap_init_mcspi(void) {} #endif -static struct resource omap2_pmu_resource = { - .start = 3, - .end = 3, - .flags = IORESOURCE_IRQ, -}; - -static struct resource omap3_pmu_resource = { - .start = INT_34XX_BENCH_MPU_EMUL, - .end = INT_34XX_BENCH_MPU_EMUL, - .flags = IORESOURCE_IRQ, -}; - -static struct platform_device omap_pmu_device = { - .name = "arm-pmu", - .id = ARM_PMU_DEVICE_CPU, - .num_resources = 1, -}; - -static void omap_init_pmu(void) -{ - if (cpu_is_omap24xx()) - omap_pmu_device.resource = &omap2_pmu_resource; - else if (cpu_is_omap34xx()) - omap_pmu_device.resource = &omap3_pmu_resource; - else - return; - - platform_device_register(&omap_pmu_device); -} - - #ifdef CONFIG_OMAP_SHA1_MD5 static struct resource sha1_md5_resources[] = { { @@ -830,7 +797,6 @@ static int __init omap2_init_devices(void) omap_init_camera(); omap_init_mbox(); omap_init_mcspi(); - omap_init_pmu(); omap_hdq_init(); omap_init_sti(); omap_init_sha1_md5(); diff --git a/trunk/arch/arm/plat-pxa/Makefile b/trunk/arch/arm/plat-pxa/Makefile index 0264bfb0ca4f..f68da35f4fb3 100644 --- a/trunk/arch/arm/plat-pxa/Makefile +++ b/trunk/arch/arm/plat-pxa/Makefile @@ -2,7 +2,7 @@ # Makefile for code common across different PXA processor families # -obj-y := dma.o +obj-y := dma.o pmu.o obj-$(CONFIG_GENERIC_GPIO) += gpio.o obj-$(CONFIG_PXA3xx) += mfp.o diff --git a/trunk/arch/arm/plat-pxa/pmu.c b/trunk/arch/arm/plat-pxa/pmu.c new file mode 100644 index 000000000000..267ceb6feb2f --- /dev/null +++ b/trunk/arch/arm/plat-pxa/pmu.c @@ -0,0 +1,33 @@ +/* + * PMU IRQ registration for the PXA xscale PMU families. + * Copyright (C) 2010 Will Deacon, ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include +#include + +static struct resource pmu_resource = { + .start = IRQ_PMU, + .end = IRQ_PMU, + .flags = IORESOURCE_IRQ, +}; + +static struct platform_device pmu_device = { + .name = "arm-pmu", + .id = ARM_PMU_DEVICE_CPU, + .resource = &pmu_resource, + .num_resources = 1, +}; + +static int __init pxa_pmu_init(void) +{ + platform_device_register(&pmu_device); + return 0; +} +arch_initcall(pxa_pmu_init);