linux/drivers/memory
Dave Gerlach 8428e5ad75 memory: ti-emif-sram: introduce relocatable suspend/resume handlers
Certain SoCs like Texas Instruments AM335x and AM437x require parts
of the EMIF PM code to run late in the suspend sequence from SRAM,
such as saving and restoring the EMIF context and placing the memory
into self-refresh.

One requirement for these SoCs to suspend and enter its lowest power
mode, called DeepSleep0, is that the PER power domain must be shut off.
Because the EMIF (DDR Controller) resides within this power domain, it
will lose context during a suspend operation, so we must save it so we
can restore once we resume. However, we cannot execute this code from
external memory, as it is not available at this point, so the code must
be executed late in the suspend path from SRAM.

This patch introduces a ti-emif-sram driver that includes several
functions written in ARM ASM that are relocatable so the PM SRAM
code can use them. It also allocates a region of writable SRAM to
be used by the code running in the executable region of SRAM to save
and restore the EMIF context. It can export a table containing the
absolute addresses of the available PM functions so that other SRAM
code can branch to them. This code is required for suspend/resume on
AM335x and AM437x to work.

In addition to this, to be able to share data structures between C and
the ti-emif-sram-pm assembly code, we can automatically generate all of
the C struct member offsets and sizes as macros by processing
emif-asm-offsets.c into assembly code and then extracting the relevant
data as is done for the generated platform asm-offsets.h files.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
2017-12-02 19:27:17 -08:00
..
samsung memory: samsung: exynos-srom: Fix wrong count of registers 2016-07-06 08:16:56 +02:00
tegra License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-ebi.c ARM: SoC driver updates for v4.14 2017-09-10 20:40:00 -07:00
atmel-sdramc.c memory: atmel-sdramc: use builtin_platform_driver to simplify the code 2016-10-20 11:59:57 +02:00
brcmstb_dpfe.c memory: brcmstb: dpfe: skip downloading firmware when possible 2017-10-06 16:19:14 -07:00
da8xx-ddrctl.c memory: da8xx-ddrctl: drop the call to of_flat_dt_get_machine_name() 2016-11-23 20:26:42 +05:30
emif-asm-offsets.c memory: ti-emif-sram: introduce relocatable suspend/resume handlers 2017-12-02 19:27:17 -08:00
emif.c
emif.h memory: ti-emif-sram: introduce relocatable suspend/resume handlers 2017-12-02 19:27:17 -08:00
fsl_ifc.c memory: Update dependency of IFC for Layerscape 2016-07-13 17:31:10 -07:00
fsl-corenet-cf.c memory: fsl-corenet: Fix module autoload for OF platform driver 2015-10-05 04:44:11 +01:00
jz4780-nemc.c memory: Convert to using %pOF instead of full_name 2017-08-16 21:37:00 +02:00
Kconfig memory: ti-emif-sram: introduce relocatable suspend/resume handlers 2017-12-02 19:27:17 -08:00
Makefile memory: ti-emif-sram: introduce relocatable suspend/resume handlers 2017-12-02 19:27:17 -08:00
Makefile.asm-offsets memory: ti-emif-sram: introduce relocatable suspend/resume handlers 2017-12-02 19:27:17 -08:00
mtk-smi.c memory: mtk-smi: Degrade SMI init to module_init 2017-08-22 16:38:00 +02:00
mvebu-devbus.c memory: Convert to using %pOF instead of full_name 2017-08-16 21:37:00 +02:00
of_memory.c fix:memory:of_memory:add missing header dependencies 2016-08-31 15:21:18 +02:00
of_memory.h
omap-gpmc.c memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg() 2017-11-03 15:06:11 +02:00
pl172.c memory: pl172: add ARM PrimeCell PL176 MPMC support 2015-09-29 22:19:02 +02:00
tegra20-mc.c memory: drop owner assignment from platform_drivers 2014-10-20 16:20:52 +02:00
ti-aemif.c memory: ti-aemif: Handle return value of clk_prepare_enable 2017-06-03 19:08:14 +09:00
ti-emif-pm.c memory: ti-emif-sram: introduce relocatable suspend/resume handlers 2017-12-02 19:27:17 -08:00
ti-emif-sram-pm.S memory: ti-emif-sram: introduce relocatable suspend/resume handlers 2017-12-02 19:27:17 -08:00