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>
This commit is contained in:
Lin Huang 2017-05-26 16:17:11 +08:00 committed by Caesar Wang
parent a109ec9234
commit 4c3770d9cf
2 changed files with 6 additions and 7 deletions

View File

@ -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.

View File

@ -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],