blob: c6d979ace52491d027f68344f70d01c4a63903c7 [file] [log] [blame]
Will Deaconde4338f2010-04-09 13:57:02 +01001/*
2 * PMU IRQ registration for the iop3xx xscale PMU families.
3 * Copyright (C) 2010 Will Deacon, ARM Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 */
10
11#include <linux/platform_device.h>
Will Deaconde4338f2010-04-09 13:57:02 +010012#include <mach/irqs.h>
13
14static struct resource pmu_resource = {
15#ifdef CONFIG_ARCH_IOP32X
16 .start = IRQ_IOP32X_CORE_PMU,
17 .end = IRQ_IOP32X_CORE_PMU,
18#endif
19#ifdef CONFIG_ARCH_IOP33X
20 .start = IRQ_IOP33X_CORE_PMU,
21 .end = IRQ_IOP33X_CORE_PMU,
22#endif
23 .flags = IORESOURCE_IRQ,
24};
25
26static struct platform_device pmu_device = {
Mark Rutlandb22a75c2014-05-23 14:39:39 +010027 .name = "xscale-pmu",
Sudeep KarkadaNageshadf3d17e2012-07-19 09:50:21 +010028 .id = -1,
Will Deaconde4338f2010-04-09 13:57:02 +010029 .resource = &pmu_resource,
30 .num_resources = 1,
31};
32
33static int __init iop3xx_pmu_init(void)
34{
35 platform_device_register(&pmu_device);
36 return 0;
37}
38
39arch_initcall(iop3xx_pmu_init);