synchronousMemoryDatabase.c 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * OMAP MPUSS low power code
  3. *
  4. * Copyright (C) 2011 Texas Instruments, Inc.
  5. * Santosh Shilimkar <santosh.shilimkar@ti.com>
  6. *
  7. * OMAP4430 MPUSS mainly consists of dual Cortex-A9 with per-CPU
  8. * Local timer and Watchdog, GIC, SCU, PL310 L2 cache controller,
  9. * CPU0 and CPU1 LPRM modules.
  10. * CPU0, CPU1 and MPUSS each have there own power domain and
  11. * hence multiple low power combinations of MPUSS are possible.
  12. *
  13. * The CPU0 and CPU1 can't support Closed switch Retention (CSWR)
  14. * because the mode is not supported by hw constraints of dormant
  15. * mode. While waking up from the dormant mode, a reset signal
  16. * to the Cortex-A9 processor must be asserted by the external
  17. * power controller.
  18. *
  19. * With architectural inputs and hardware recommendations, only
  20. * below modes are supported from power gain vs latency point of view.
  21. *
  22. * CPU0 CPU1 MPUSS
  23. * ----------------------------------------------
  24. * ON ON ON
  25. * ON(Inactive) OFF ON(Inactive)
  26. * OFF OFF CSWR
  27. * OFF OFF OSWR
  28. * OFF OFF OFF(Device OFF *TBD)
  29. * ----------------------------------------------
  30. *
  31. * Note: CPU0 is the master core and it is the last CPU to go down
  32. * and first to wake-up when MPUSS low power states are excercised
  33. *
  34. *
  35. * This program is free software; you can redistribute it and/or modify
  36. * it under the terms of the GNU General Public License version 2 as
  37. * published by the Free Software Foundation.
  38. */
  39. #include <linux/kernel.h>
  40. #include <linux/io.h>
  41. #include <linux/errno.h>
  42. #include <linux/linkage.h>
  43. #include <linux/smp.h>
  44. #include <asm/cacheflush.h>
  45. #include <asm/tlbflush.h>
  46. #include <asm/smp_scu.h>
  47. #include <asm/pgalloc.h>
  48. #include <asm/suspend.h>
  49. #include <asm/hardware/cache-l2x0.h>
  50. #include "soc.h"
  51. #include "common.h"
  52. #include "omap44xx.h"
  53. #include "omap4-sar-layout.h"
  54. #include "pm.h"
  55. #include "prcm_mpu44xx.h"
  56. #include "prminst44xx.h"
  57. #include "prcm44xx.h"
  58. #include "prm44xx.h"
  59. #include "prm-regbits-44xx.h"
  60. #ifdef CONFIG_SMP
  61. struct omap4_cpu_pm_info {
  62. struct powerdomain *pwrdm;
  63. void __iomem *scu_sar_addr;
  64. void __iomem *wkup_sar_addr;
  65. void __iomem *l2x0_sar_addr;
  66. void (*secondary_startup)(void);
  67. };
  68. static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info);
  69. static struct powerdomain *mpuss_pd;
  70. static void __iomem *sar_base;