diff options
author | Derek Basehore <dbasehore@chromium.org> | 2016-06-23 14:35:22 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-07-15 00:37:06 +0200 |
commit | 1dd0bc0f609e689d08decf26ec16298784740381 (patch) | |
tree | fbf3d9a9f3b1451ae7927da565b6342f2cd5853a /src/soc/rockchip | |
parent | d570a5ada0015c9efeec2a1f4914bb5e36e7f3d8 (diff) | |
download | coreboot-1dd0bc0f609e689d08decf26ec16298784740381.tar.xz |
rockchip/rk3399: cleanup variables in dram_all_config
This removes a variable that was only used once and makes variable
declarations consistent by moving those only used in one block of code
into that block.
BRANCH=none
BUG=none
TEST=on kevin/gru, run "stressapptest -M 1024 -s 3600"
Change-Id: Iacfc0ffef34a4953cfb304b8cb4975b045aea585
Signed-off-by: Martin Roth <martinroth@chromium.org>
Original-Commit-Id: a79bbbc83d0f5cccf6bb4ad44ae2239c7f4b45e3
Original-Change-Id: Id0ff0c45189c292ab40e1c4aa27929fb7780e864
Original-Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/355667
Original-Reviewed-by: Martin Roth <martinroth@chromium.org>
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/15654
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/rockchip')
-rw-r--r-- | src/soc/rockchip/rk3399/sdram.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/soc/rockchip/rk3399/sdram.c b/src/soc/rockchip/rk3399/sdram.c index 7fdb6e771e..6c7bc432f1 100644 --- a/src/soc/rockchip/rk3399/sdram.c +++ b/src/soc/rockchip/rk3399/sdram.c @@ -959,18 +959,15 @@ static void dram_all_config(const struct rk3399_sdram_params *sdram_params) u32 sys_reg = 0; unsigned int channel; unsigned int use; - struct rk3399_msch_regs *ddr_msch_regs; - const struct rk3399_msch_timings *noc_timing; sys_reg |= SYS_REG_ENC_DDRTYPE(sdram_params->dramtype); sys_reg |= SYS_REG_ENC_NUM_CH(sdram_params->num_channels); for (channel = 0, use = 0; (use < sdram_params->num_channels) && (channel < 2); channel++) { - struct rk3399_ddr_pctl_regs *ddr_pctl_regs = - rk3399_ddr_pctl[channel]; const struct rk3399_sdram_channel *info = &sdram_params->ch[channel]; - ddr_msch_regs = rk3399_msch[channel]; + struct rk3399_msch_regs *ddr_msch_regs; + const struct rk3399_msch_timings *noc_timing; if (sdram_params->ch[channel].col == 0) continue; @@ -986,6 +983,7 @@ static void dram_all_config(const struct rk3399_sdram_params *sdram_params) sys_reg |= SYS_REG_ENC_BW(info->bw, channel); sys_reg |= SYS_REG_ENC_DBW(info->dbw, channel); + ddr_msch_regs = rk3399_msch[channel]; noc_timing = &sdram_params->ch[channel].noc_timings; write32(&ddr_msch_regs->ddrtiminga0.d32, noc_timing->ddrtiminga0.d32); @@ -1000,7 +998,8 @@ static void dram_all_config(const struct rk3399_sdram_params *sdram_params) /* rank 1 memory clock disable (dfi_dram_clk_disable = 1) */ if (sdram_params->ch[channel].rank == 1) - setbits_le32(&ddr_pctl_regs->denali_ctl[276], 1 << 17); + setbits_le32(&rk3399_ddr_pctl[channel]->denali_ctl[276], + 1 << 17); } write32(&rk3399_pmugrf->os_reg2, sys_reg); |