dev-pmu.c 880 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * linux/arch/arm/plat-s5p/dev-pmu.c
  3. *
  4. * Copyright (C) 2010 Samsung Electronics Co.Ltd
  5. * Author: Joonyoung Shim <jy0922.shim@samsung.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation; either version 2 of the License, or (at your
  10. * option) any later version.
  11. *
  12. */
  13. #include <linux/platform_device.h>
  14. #include <asm/pmu.h>
  15. #include <mach/irqs.h>
  16. static struct resource s5p_pmu_resource = {
  17. .start = IRQ_PMU,
  18. .end = IRQ_PMU,
  19. .flags = IORESOURCE_IRQ,
  20. };
  21. struct platform_device s5p_device_pmu = {
  22. .name = "arm-pmu",
  23. .id = ARM_PMU_DEVICE_CPU,
  24. .num_resources = 1,
  25. .resource = &s5p_pmu_resource,
  26. };
  27. static int __init s5p_pmu_init(void)
  28. {
  29. platform_device_register(&s5p_device_pmu);
  30. return 0;
  31. }
  32. arch_initcall(s5p_pmu_init);