pmu.c 756 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * PMU IRQ registration for the PXA 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. #include <linux/platform_device.h>
  11. #include <asm/pmu.h>
  12. #include <mach/irqs.h>
  13. static struct resource pmu_resource = {
  14. .start = IRQ_PMU,
  15. .end = IRQ_PMU,
  16. .flags = IORESOURCE_IRQ,
  17. };
  18. static struct platform_device pmu_device = {
  19. .name = "arm-pmu",
  20. .id = ARM_PMU_DEVICE_CPU,
  21. .resource = &pmu_resource,
  22. .num_resources = 1,
  23. };
  24. static int __init pxa_pmu_init(void)
  25. {
  26. platform_device_register(&pmu_device);
  27. return 0;
  28. }
  29. arch_initcall(pxa_pmu_init);