pm-r8a7790.c 968 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * r8a7790 Power management support
  3. *
  4. * Copyright (C) 2013 Renesas Electronics Corporation
  5. * Copyright (C) 2011 Renesas Solutions Corp.
  6. * Copyright (C) 2011 Magnus Damm
  7. *
  8. * This file is subject to the terms and conditions of the GNU General Public
  9. * License. See the file "COPYING" in the main directory of this archive
  10. * for more details.
  11. */
  12. #include <linux/kernel.h>
  13. #include <asm/io.h>
  14. #include <mach/pm-rcar.h>
  15. #include <mach/r8a7790.h>
  16. /* SYSC */
  17. #define SYSCIER 0x0c
  18. #define SYSCIMR 0x10
  19. #if defined(CONFIG_SMP)
  20. static void __init r8a7790_sysc_init(void)
  21. {
  22. void __iomem *base = rcar_sysc_init(0xe6180000);
  23. /* enable all interrupt sources, but do not use interrupt handler */
  24. iowrite32(0x0131000e, base + SYSCIER);
  25. iowrite32(0, base + SYSCIMR);
  26. }
  27. #else /* CONFIG_SMP */
  28. static inline void r8a7790_sysc_init(void) {}
  29. #endif /* CONFIG_SMP */
  30. void __init r8a7790_pm_init(void)
  31. {
  32. static int once;
  33. if (!once++)
  34. r8a7790_sysc_init();
  35. }