diff options
author | Russ Dill | 2018-03-20 12:23:00 +0530 |
---|---|---|
committer | Tom Rini | 2018-04-06 17:04:33 -0400 |
commit | 025a0d40e126a0035bb00df067850c23aa783b80 (patch) | |
tree | e22b881c5ecf9d754ba5195f385e90bf057a366c /arch/arm/mach-omap2/am33xx/board.c | |
parent | e18945ad22eb2a8baad1a2dbc8c541411ac9528b (diff) |
ARM: am33xx: Inhibit re-initialization of DDR during RTC-only
This inhibits the re-inititialization of DDR during an RTC-only resume. If
this is not done, an L3 NOC error is produced as the DDR gets accessed
before the re-init has time to complete. Tested on AM437x GP EVM.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
[j-keerthy@ti.com Ported to Latest Master branch]
Signed-off-by: Keerthy <j-keerthy@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/am33xx/board.c')
-rw-r--r-- | arch/arm/mach-omap2/am33xx/board.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index ef1de1a115b..e1d4ddb44b7 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -376,6 +376,9 @@ static void watchdog_disable(void) static void rtc_only(void) { struct davinci_rtc *rtc = (struct davinci_rtc *)RTC_BASE; + struct prm_device_inst *prm_device = + (struct prm_device_inst *)PRM_DEVICE_INST; + u32 scratch1; void (*resume_func)(void); @@ -403,9 +406,20 @@ static void rtc_only(void) */ rtc_only_update_board_type(scratch1 >> RTC_BOARD_TYPE_SHIFT); + /* + * Enable EMIF_DEVOFF in PRCM_PRM_EMIF_CTRL to indicate to EMIF we + * are resuming from self-refresh. This avoids an unnecessary re-init + * of the DDR. The re-init takes time and we would need to wait for + * it to complete before accessing DDR to avoid L3 NOC errors. + */ + writel(EMIF_CTRL_DEVOFF, &prm_device->emif_ctrl); + rtc_only_prcm_init(); sdram_init(); + /* Disable EMIF_DEVOFF for normal operation and to exit self-refresh */ + writel(0, &prm_device->emif_ctrl); + resume_func = (void *)readl(&rtc->scratch0); if (resume_func) resume_func(); |