diff options
Diffstat (limited to 'arch/arm/mach-exynos/common.c')
-rw-r--r-- | arch/arm/mach-exynos/common.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 02e35abd136b..603fedb80b0c 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <mach/regs-irq.h> | 39 | #include <mach/regs-irq.h> |
40 | #include <mach/regs-pmu.h> | 40 | #include <mach/regs-pmu.h> |
41 | #include <mach/regs-gpio.h> | 41 | #include <mach/regs-gpio.h> |
42 | #include <mach/irqs.h> | ||
42 | 43 | ||
43 | #include <plat/cpu.h> | 44 | #include <plat/cpu.h> |
44 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
@@ -850,3 +851,30 @@ static int __init exynos_init_irq_eint(void) | |||
850 | return 0; | 851 | return 0; |
851 | } | 852 | } |
852 | arch_initcall(exynos_init_irq_eint); | 853 | arch_initcall(exynos_init_irq_eint); |
854 | |||
855 | static struct resource exynos4_pmu_resource[] = { | ||
856 | DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU), | ||
857 | DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU_CPU1), | ||
858 | #if defined(CONFIG_SOC_EXYNOS4412) | ||
859 | DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU_CPU2), | ||
860 | DEFINE_RES_IRQ(EXYNOS4_IRQ_PMU_CPU3), | ||
861 | #endif | ||
862 | }; | ||
863 | |||
864 | static struct platform_device exynos4_device_pmu = { | ||
865 | .name = "arm-pmu", | ||
866 | .num_resources = ARRAY_SIZE(exynos4_pmu_resource), | ||
867 | .resource = exynos4_pmu_resource, | ||
868 | }; | ||
869 | |||
870 | static int __init exynos_armpmu_init(void) | ||
871 | { | ||
872 | if (!of_have_populated_dt()) { | ||
873 | if (soc_is_exynos4210() || soc_is_exynos4212()) | ||
874 | exynos4_device_pmu.num_resources = 2; | ||
875 | platform_device_register(&exynos4_device_pmu); | ||
876 | } | ||
877 | |||
878 | return 0; | ||
879 | } | ||
880 | arch_initcall(exynos_armpmu_init); | ||