alistair23-linux/arch/arm/mach-tegra
Jon Hunter 5883ac2010 ARM: tegra: Ensure entire dcache is flushed on entering LP0/1
Tegra support several low-power (LPx) states, which are:
- LP0: CPU + Core voltage off and DRAM in self-refresh
- LP1: CPU voltage off and DRAM in self-refresh
- LP2: CPU voltage off

When entering any of the above states the tegra_disable_clean_inv_dcache()
function is called to flush the dcache. The function
tegra_disable_clean_inv_dcache() will either flush the entire data cache or
up to the Level of Unification Inner Shareable (LoUIS) depending on the
value in r0. When tegra_disable_clean_inv_dcache() is called by
tegra20_sleep_core_finish() or tegra30_sleep_core_finish(), to enter LP0
and LP1 power state, the r0 register contains a physical memory address
which will not be equal to TEGRA_FLUSH_CACHE_ALL (1) and so the data cache
will be only flushed to the LoUIS. However, when
tegra_disable_clean_inv_dcache() called by tegra_sleep_cpu_finish() to
enter to LP2 power state, r0 is set to TEGRA_FLUSH_CACHE_ALL to flush the
entire dcache.

Please note that tegra20_sleep_core_finish(), tegra30_sleep_core_finish()
and tegra_sleep_cpu_finish() are called by the boot CPU once all other CPUs
have been disabled and so it seems appropriate to flush the entire cache at
this stage.

Therefore, ensure that r0 is set to TEGRA_FLUSH_CACHE_ALL when calling
tegra_disable_clean_inv_dcache() from tegra20_sleep_core_finish() and
tegra30_sleep_core_finish().

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2015-11-24 16:47:26 +01:00
..
board-paz00.c ARM: tegra: paz00: use con_id's to refer GPIO's in gpiod_lookup table 2015-10-02 14:30:57 +02:00
board.h
common.h
cpuidle-tegra20.c ARM: tegra20: Store CPU "resettable" status in IRAM 2015-05-04 12:58:19 +02:00
cpuidle-tegra30.c Power management and ACPI updates for v4.1-rc1 2015-04-14 20:21:54 -07:00
cpuidle-tegra114.c ARM: tegra: cpuidle: implement cpuidle_state.enter_freeze() 2015-08-13 16:53:38 +02:00
cpuidle.c
cpuidle.h
flowctrl.c ARM: tegra: Initialize flow controller from DT 2014-08-26 11:43:55 -06:00
flowctrl.h ARM: tegra: Initialize flow controller from DT 2014-08-26 11:43:55 -06:00
hotplug.c ARM: Remove __ref on hotplug cpu die path 2015-10-22 09:55:03 -07:00
io.c
iomap.h soc/tegra: fuse: Unify Tegra20 and Tegra30 drivers 2015-07-16 10:38:28 +02:00
irammap.h
irq.c ARM: tegra: remove old LIC support 2015-03-15 00:40:52 +00:00
irq.h ARM: tegra: remove old LIC support 2015-03-15 00:40:52 +00:00
Kconfig soc/tegra: Provide per-SoC Kconfig symbols 2015-11-24 16:47:24 +01:00
Makefile ARM: v7 setup function should invalidate L1 cache 2015-06-01 11:30:26 +01:00
platsmp.c
pm-tegra20.c
pm-tegra30.c
pm.c
pm.h
reset-handler.S ARM: tegra20: Store CPU "resettable" status in IRAM 2015-05-04 12:58:19 +02:00
reset.c ARM: v7 setup function should invalidate L1 cache 2015-06-01 11:30:26 +01:00
reset.h ARM: SoC: platform support for v4.2 2015-06-26 11:34:35 -07:00
sleep-tegra20.S ARM: tegra: Ensure entire dcache is flushed on entering LP0/1 2015-11-24 16:47:26 +01:00
sleep-tegra30.S ARM: tegra: Ensure entire dcache is flushed on entering LP0/1 2015-11-24 16:47:26 +01:00
sleep.h ARM: tegra20: Store CPU "resettable" status in IRAM 2015-05-04 12:58:19 +02:00
sleep.S
tegra.c soc/tegra: pmc: move to using a restart handler 2015-05-04 14:21:45 +02:00