mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
8428e5ad75
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>
34 lines
1.0 KiB
Makefile
34 lines
1.0 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for memory devices
|
|
#
|
|
|
|
ifeq ($(CONFIG_DDR),y)
|
|
obj-$(CONFIG_OF) += of_memory.o
|
|
endif
|
|
obj-$(CONFIG_ARM_PL172_MPMC) += pl172.o
|
|
obj-$(CONFIG_ATMEL_SDRAMC) += atmel-sdramc.o
|
|
obj-$(CONFIG_ATMEL_EBI) += atmel-ebi.o
|
|
obj-$(CONFIG_ARCH_BRCMSTB) += brcmstb_dpfe.o
|
|
obj-$(CONFIG_TI_AEMIF) += ti-aemif.o
|
|
obj-$(CONFIG_TI_EMIF) += emif.o
|
|
obj-$(CONFIG_OMAP_GPMC) += omap-gpmc.o
|
|
obj-$(CONFIG_FSL_CORENET_CF) += fsl-corenet-cf.o
|
|
obj-$(CONFIG_FSL_IFC) += fsl_ifc.o
|
|
obj-$(CONFIG_MVEBU_DEVBUS) += mvebu-devbus.o
|
|
obj-$(CONFIG_TEGRA20_MC) += tegra20-mc.o
|
|
obj-$(CONFIG_JZ4780_NEMC) += jz4780-nemc.o
|
|
obj-$(CONFIG_MTK_SMI) += mtk-smi.o
|
|
obj-$(CONFIG_DA8XX_DDRCTL) += da8xx-ddrctl.o
|
|
|
|
obj-$(CONFIG_SAMSUNG_MC) += samsung/
|
|
obj-$(CONFIG_TEGRA_MC) += tegra/
|
|
obj-$(CONFIG_TI_EMIF_SRAM) += ti-emif-sram.o
|
|
ti-emif-sram-objs := ti-emif-pm.o ti-emif-sram-pm.o
|
|
|
|
AFLAGS_ti-emif-sram-pm.o :=-Wa,-march=armv7-a
|
|
|
|
include drivers/memory/Makefile.asm-offsets
|
|
|
|
drivers/memory/ti-emif-sram-pm.o: include/generated/ti-emif-asm-offsets.h
|