aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory/ti-emif-pm.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-03-05memory: ti-emif-sram: remove redundant dev_err call in ti_emif_probe()Wei Yongjun1-1/+0
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
2017-12-06memory: ti-emif-sram: remove unused variableArnd Bergmann1-1/+0
The newly introduced driver causes a harmless warning for a variable that was evidently never used: drivers/memory/ti-emif-pm.c: In function 'ti_emif_remove': drivers/memory/ti-emif-pm.c:303:17: error: unused variable 'dev' [-Werror=unused-variable] Fixes: 8428e5ad750d ("memory: ti-emif-sram: introduce relocatable suspend/resume handlers") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
2017-12-02memory: ti-emif-sram: introduce relocatable suspend/resume handlersDave Gerlach1-0/+325
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>