pm-r8a7740.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * r8a7740 power management support
  3. *
  4. * Copyright (C) 2012 Renesas Solutions Corp.
  5. * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  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/console.h>
  12. #include <mach/pm-rmobile.h>
  13. #ifdef CONFIG_PM
  14. static int r8a7740_pd_a4s_suspend(void)
  15. {
  16. /*
  17. * The A4S domain contains the CPU core and therefore it should
  18. * only be turned off if the CPU is in use.
  19. */
  20. return -EBUSY;
  21. }
  22. struct rmobile_pm_domain r8a7740_pd_a4s = {
  23. .genpd.name = "A4S",
  24. .bit_shift = 10,
  25. .gov = &pm_domain_always_on_gov,
  26. .no_debug = true,
  27. .suspend = r8a7740_pd_a4s_suspend,
  28. };
  29. static int r8a7740_pd_a3sp_suspend(void)
  30. {
  31. /*
  32. * Serial consoles make use of SCIF hardware located in A3SP,
  33. * keep such power domain on if "no_console_suspend" is set.
  34. */
  35. return console_suspend_enabled ? 0 : -EBUSY;
  36. }
  37. struct rmobile_pm_domain r8a7740_pd_a3sp = {
  38. .genpd.name = "A3SP",
  39. .bit_shift = 11,
  40. .gov = &pm_domain_always_on_gov,
  41. .no_debug = true,
  42. .suspend = r8a7740_pd_a3sp_suspend,
  43. };
  44. struct rmobile_pm_domain r8a7740_pd_a4lc = {
  45. .genpd.name = "A4LC",
  46. .bit_shift = 1,
  47. };
  48. #endif /* CONFIG_PM */