pmu.c 882 B

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