aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/imx6sl_wfi.S
Commit message (Collapse)AuthorAge
* ENGR00317542-1 ARM:imx6x: Dynamically calculate the size of low power mode code.Ranjani Vaidyanathan2014-06-12
| | | | | | | | | | | | | This patch adds support for dynamically calculating the size of all low power code (suspend, ddr freq change and low power idle). This allows for easy code changes in the future. This patch also moves the DDR frequency change code from lower 8K of the memory allocated for IRAM page table to regular IRAM. With this the lower 8K of the IRAM page table only contains suspend/resume and low power IDLE code. This gives a little more flexibility to the cdoe size for suspend/resume and low power IDLE. Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
* ENGR00309881 ARM:imx6: Disable L1 and L2 when DDR is in self-refresh.Ranjani Vaidyanathan2014-05-16
| | | | | | | | | When switching to page tables in IRAM, we are switching from a cacheable to non-cacheable page table. Based on recommendation from ARM, we need to ensure that branch prediction, L1 data nd L2 are disabled when DDR is put into self-refresh. Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
* ENGR00299939-2 ARM: imx6sl: Add dummy LDO2p5 regulator to support VBUS wakeupRanjani Vaidyanathan2014-04-16
| | | | | | | | | | | LDO2p5 cannot be disabled in low power idle mode when the USB driver enables VBUS wakeup. To identify when LDO2p5 can be disabled add a dummy regulator that the USB driver will enable when VBUS wakeup is required. This patch ensures that the low power idle code checks the status of the dummy ldo2p5 regulator before disabling LDO2p5. Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
* ENGR00297285-1 [MX6x] Support IRAM page table when DDR is in self-refreshRanjani Vaidyanathan2014-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever DDR is explicitly put into self-refresh, we need to ensure that no access are made to the DDR. All the bus masters excpet ARM are shutdown gracefully. The ARM core can continue to access the DDR due to: 1. Speculative accesses This can be prevented by flushing the Branch Target Address Cache 2. Aggressive Prefetching This can be minimized by adding nops. Apart from this the TLB architecture in ARM does not guarantee that an entry remains in the TLB unless its explicitly locked. Even if free slots are available an entry maybe evicted. So flushing the TLB does not guarantee a page table walk will not happen. The solution is to put a minimized page table in IRAM that can be used when DDR is in self-refresh. The IRAM page tables should have entries for IRAM, AIPS1 and AIPS2 as these entries will be needed by the code that puts DDR into self-refresh. It should not contain any entries that point to the DDR. This patch set accomplishes the following: 1. Set the IRAM to be mapped as 1M sections in the high mem region. This makes it possible to create entries for the IRAM code in the IRAM page table. We need to ensure that both the DDR and IRAM page table have mapping for the IRAM code. 2. Ensure the IRAM, AIPS1, AIPS2 have entries in the IRAM page table. 3. Save TTBR1 4. Set TTBR1 to point to the page tables stored in IRAM. Switch to using TTBR1 before DDR is put into self-refresh. Ensure the following settings: a. TTBCR.N = 1 This means the 0-2G virtual address space is translated using TTBR0 and 2G-4G is translated using TTBR1. b. Set TTBCR.PD0 = 1 With this setting page table walks using TTBR0 are disabled. 4. After the DDR has exited self-refresh, reset TTBCR to 0 (TTBR0 will be used for translations now). 5. Restore TTBR1 Even though TTBR1 is only used to decode the top 2G of virtual address space, ARM requires that we allocate the entire 16KB for the page table. To minimize IRAM/OCRAM required, we put the code in the bottom 8K and page table entries in the top 8K. This requires the low power code be optimized to occupy as little space as possible. This commit is cherry-picked: 93ae491d9dbe34a91e2dd5832b02b0f0a390ddbe Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
* ENGR00289268 [iMX6x] Ensure there is no TLB miss when DDR is in self-refreshRanjani Vaidyanathan2014-04-16
| | | | | | | | | | During DDR frequency change code or in low power IDLE code (in iMX6SL), we need to ensure that all register addresses accessed in the IRAM code are in the TLB. There should be no TLB walks when DDR is in self-refresh. To ensure this flush the TLB before DDR frequency change and before low power IDLE (only iMX6SL) procedures. Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
* ENGR00288506 [iMX6SL] Improve Audio playback powerRanjani Vaidyanathan2014-04-16
| | | | | | | | | | | | | When ARM executes WFI in audio playback mode, its possible to lower the power consumed on the VDDHIGH_IN and VDDSOC_IN rails by: 1. Putting DDR into self-refresh 2. Lower DDR frequency to 25MHz 3. Float DDR IO pads. Also drop AHB to 8MHz in audio playback mode (aligning with 3.0.35) Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
* ENGR00281017 [MX6SL]Low power IDLE mode optimizationsRanjani Vaidyanathan2014-04-16
Added a new bus freq mode - ultra_low_bus_freq_mode. In this mode the ARM is the only bus master that is active and the system is already in low power idle mode. And when ARM executes WFI in this mode, we do some aggressive power savings techinques like: 1. Drop DDR freq to 1MHz 2. Drop AHB freq to 3MHz 3. Float the DDR IO pads 4. If all PLLs are in bypass (which should be the case), do some analog power saving options like reducing the OSC-bias current, turning off the regular bandgap, disabling the regular 2P5, enabling the weak 2p5 etc. Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>