treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
[sfrench/cifs-2.6.git] / arch / arm / plat-iop / pmu.c
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * PMU IRQ registration for the iop3xx xscale PMU families.
4  * Copyright (C) 2010 Will Deacon, ARM Ltd.
5  */
6
7 #include <linux/platform_device.h>
8 #include <mach/irqs.h>
9
10 static struct resource pmu_resource = {
11 #ifdef CONFIG_ARCH_IOP32X
12         .start  = IRQ_IOP32X_CORE_PMU,
13         .end    = IRQ_IOP32X_CORE_PMU,
14 #endif
15 #ifdef CONFIG_ARCH_IOP33X
16         .start  = IRQ_IOP33X_CORE_PMU,
17         .end    = IRQ_IOP33X_CORE_PMU,
18 #endif
19         .flags  = IORESOURCE_IRQ,
20 };
21
22 static struct platform_device pmu_device = {
23         .name           = "xscale-pmu",
24         .id             = -1,
25         .resource       = &pmu_resource,
26         .num_resources  = 1,
27 };
28
29 static int __init iop3xx_pmu_init(void)
30 {
31         platform_device_register(&pmu_device);
32         return 0;
33 }
34
35 arch_initcall(iop3xx_pmu_init);