diff options
author | Lin Huang <hl@rock-chips.com> | 2017-05-26 16:17:11 +0800 |
---|---|---|
committer | Caesar Wang <wxt@rock-chips.com> | 2017-08-29 15:22:21 +0800 |
commit | 4c3770d9cfc1b4710809c88afd87c10e27f30bd8 (patch) | |
tree | 27b0d78f414fc538a682bca72a7a6a613e10185c /plat/rockchip | |
parent | a109ec92344fa443e39cc77c8b3de4527b8c1c4c (diff) |
rockchip/rk3399: use slice1 to restore ddr slice1 ~ slice4
we do not have enough pmusram space now, so use slice1 to restore
ddr slice1 ~ slice4, that's will save more pmusram space.
Change-Id: Id54a7944f33d01a8f244cee6a8a0707bfe4d42da
Signed-off-by: Lin Huang <hl@rock-chips.com>
Diffstat (limited to 'plat/rockchip')
-rw-r--r-- | plat/rockchip/rk3399/drivers/dram/dram.h | 6 | ||||
-rw-r--r-- | plat/rockchip/rk3399/drivers/dram/suspend.c | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/plat/rockchip/rk3399/drivers/dram/dram.h b/plat/rockchip/rk3399/drivers/dram/dram.h index fede7eef..0780fc3a 100644 --- a/plat/rockchip/rk3399/drivers/dram/dram.h +++ b/plat/rockchip/rk3399/drivers/dram/dram.h @@ -25,10 +25,10 @@ struct rk3399_ddr_pctl_regs { struct rk3399_ddr_publ_regs { /* - * PHY registers from 0 to 511. - * Only registers 0-90 of each 128 register range are used. + * PHY registers from 0 to 90 for slice1. + * These are used to restore slice1-4 on resume. */ - uint32_t phy0[4][91]; + uint32_t phy0[91]; /* * PHY registers from 512 to 895. * Only registers 0-37 of each 128 register range are used. diff --git a/plat/rockchip/rk3399/drivers/dram/suspend.c b/plat/rockchip/rk3399/drivers/dram/suspend.c index 89f0cd38..7d4abf0f 100644 --- a/plat/rockchip/rk3399/drivers/dram/suspend.c +++ b/plat/rockchip/rk3399/drivers/dram/suspend.c @@ -531,7 +531,7 @@ static __pmusramfunc void pctl_cfg(uint32_t ch, for (i = 0; i < 4; i++) sram_regcpy(PHY_REG(ch, 128 * i), - (uintptr_t)&phy_regs->phy0[i][0], 91); + (uintptr_t)&phy_regs->phy0[0], 91); for (i = 0; i < 3; i++) sram_regcpy(PHY_REG(ch, 512 + 128 * i), @@ -698,9 +698,8 @@ void dmc_suspend(void) /* mask DENALI_PI_00_DATA.START, only copy here, will trigger later*/ params_pi[0] &= ~(0x1 << 0); - for (i = 0; i < 4; i++) - dram_regcpy((uintptr_t)&phy_regs->phy0[i][0], - PHY_REG(0, 128 * i), 91); + dram_regcpy((uintptr_t)&phy_regs->phy0[0], + PHY_REG(0, 0), 91); for (i = 0; i < 3; i++) dram_regcpy((uintptr_t)&phy_regs->phy512[i][0], |