pmu.c 916 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  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. #include <linux/platform_device.h>
  11. #include <asm/pmu.h>
  12. #include <mach/irqs.h>
  13. static struct resource pmu_resource = {
  14. #ifdef CONFIG_ARCH_IOP32X
  15. .start = IRQ_IOP32X_CORE_PMU,
  16. .end = IRQ_IOP32X_CORE_PMU,
  17. #endif
  18. #ifdef CONFIG_ARCH_IOP33X
  19. .start = IRQ_IOP33X_CORE_PMU,
  20. .end = IRQ_IOP33X_CORE_PMU,
  21. #endif
  22. .flags = IORESOURCE_IRQ,
  23. };
  24. static struct platform_device pmu_device = {
  25. .name = "arm-pmu",
  26. .id = ARM_PMU_DEVICE_CPU,
  27. .resource = &pmu_resource,
  28. .num_resources = 1,
  29. };
  30. static int __init iop3xx_pmu_init(void)
  31. {
  32. platform_device_register(&pmu_device);
  33. return 0;
  34. }
  35. arch_initcall(iop3xx_pmu_init);