diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2010-07-19 01:16:36 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-08-05 05:30:21 -0400 |
commit | 02a0456b3b6ad7503a37fab6f00a27d2bd53d483 (patch) | |
tree | 660e57e707fc0620382864f555bad4460a9d0b16 /arch/arm/plat-s5p/dev-pmu.c | |
parent | 9fe6206f400646a2322096b56c59891d530e8d51 (diff) |
ARM: S5P: Add PMU device
This patch adds an initcall for the s5p platforms so that they register
their PMU IRQs with the PMU framework in the Kernel.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-s5p/dev-pmu.c')
-rw-r--r-- | arch/arm/plat-s5p/dev-pmu.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/plat-s5p/dev-pmu.c b/arch/arm/plat-s5p/dev-pmu.c new file mode 100644 index 000000000000..a08576da72b0 --- /dev/null +++ b/arch/arm/plat-s5p/dev-pmu.c | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/plat-s5p/dev-pmu.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd | ||
5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <linux/platform_device.h> | ||
15 | #include <asm/pmu.h> | ||
16 | #include <mach/irqs.h> | ||
17 | |||
18 | static struct resource s5p_pmu_resource = { | ||
19 | .start = IRQ_PMU, | ||
20 | .end = IRQ_PMU, | ||
21 | .flags = IORESOURCE_IRQ, | ||
22 | }; | ||
23 | |||
24 | struct platform_device s5p_device_pmu = { | ||
25 | .name = "arm-pmu", | ||
26 | .id = ARM_PMU_DEVICE_CPU, | ||
27 | .num_resources = 1, | ||
28 | .resource = &s5p_pmu_resource, | ||
29 | }; | ||
30 | |||
31 | static int __init s5p_pmu_init(void) | ||
32 | { | ||
33 | platform_device_register(&s5p_device_pmu); | ||
34 | return 0; | ||
35 | } | ||
36 | arch_initcall(s5p_pmu_init); | ||