dev-rtc.c 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* linux/arch/arm/plat-samsung/dev-rtc.c
  2. *
  3. * Copyright 2009 by Maurus Cuelenaere <mcuelenaere@gmail.com>
  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. #include <linux/kernel.h>
  10. #include <linux/string.h>
  11. #include <linux/platform_device.h>
  12. #include <mach/irqs.h>
  13. #include <mach/map.h>
  14. #include <plat/devs.h>
  15. static struct resource s3c_rtc_resource[] = {
  16. [0] = {
  17. .start = S3C_PA_RTC,
  18. .end = S3C_PA_RTC + 0xff,
  19. .flags = IORESOURCE_MEM,
  20. },
  21. [1] = {
  22. .start = IRQ_RTC_ALARM,
  23. .end = IRQ_RTC_ALARM,
  24. .flags = IORESOURCE_IRQ,
  25. },
  26. [2] = {
  27. .start = IRQ_RTC_TIC,
  28. .end = IRQ_RTC_TIC,
  29. .flags = IORESOURCE_IRQ
  30. }
  31. };
  32. struct platform_device s3c_device_rtc = {
  33. .name = "s3c64xx-rtc",
  34. .id = -1,
  35. .num_resources = ARRAY_SIZE(s3c_rtc_resource),
  36. .resource = s3c_rtc_resource,
  37. };
  38. EXPORT_SYMBOL(s3c_device_rtc);