pm-r8a7779.c 796 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * r8a7779 Power management support
  3. *
  4. * Copyright (C) 2011 Renesas Solutions Corp.
  5. * Copyright (C) 2011 Magnus Damm
  6. *
  7. * This file is subject to the terms and conditions of the GNU General Public
  8. * License. See the file "COPYING" in the main directory of this archive
  9. * for more details.
  10. */
  11. #include <linux/soc/renesas/rcar-sysc.h>
  12. #include <asm/io.h>
  13. #include "r8a7779.h"
  14. /* SYSC */
  15. #define SYSCIER 0x0c
  16. #define SYSCIMR 0x10
  17. #if defined(CONFIG_PM) || defined(CONFIG_SMP)
  18. static void __init r8a7779_sysc_init(void)
  19. {
  20. rcar_sysc_init(0xffd85000, 0x0131000e);
  21. }
  22. #else /* CONFIG_PM || CONFIG_SMP */
  23. static inline void r8a7779_sysc_init(void) {}
  24. #endif /* CONFIG_PM || CONFIG_SMP */
  25. void __init r8a7779_pm_init(void)
  26. {
  27. static int once;
  28. if (!once++)
  29. r8a7779_sysc_init();
  30. }