memory: ti-emif-sram: Add resume function to recopy sram code
authorDave Gerlach <d-gerlach@ti.com>
Tue, 26 Jun 2018 17:05:17 +0000 (10:05 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Tue, 26 Jun 2018 17:05:17 +0000 (10:05 -0700)
commit38853979e6dce8466a1f611cadebc0f00adb901b
tree4e760c4ad3ecc722ab87448128e55cf2008920a9
parentce397d215ccd07b8ae3f71db689aedb85d56ab40
memory: ti-emif-sram: Add resume function to recopy sram code

After an RTC+DDR cycle we lose sram context so emif pm functions present
in sram are lost. We can check if the first byte of the original
code in DDR contains the same first byte as the code in sram, and if
they do not match we know we have lost context and must recopy the
functions to the previous address to maintain PM functionality.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
drivers/memory/ti-emif-pm.c