mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 22:20:45 +00:00
drivers: ram: rockchip: Fix dram channels calculation for rk3399
Only add the dram channel when we finally setup it successfully at the last step. Signed-off-by: Han Pengfei <pengphei@foxmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
69820e02d2
commit
fc1526f651
1 changed files with 2 additions and 2 deletions
|
@ -2964,8 +2964,6 @@ static int sdram_init(struct dram_info *dram,
|
|||
if (cap_info->rank == 0) {
|
||||
clear_channel_params(params, 1);
|
||||
continue;
|
||||
} else {
|
||||
params->base.num_channels++;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_RAM_ROCKCHIP_DEBUG)) {
|
||||
|
@ -2991,6 +2989,8 @@ static int sdram_init(struct dram_info *dram,
|
|||
printf("no ddrconfig find, Cap not support!\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
params->base.num_channels++;
|
||||
set_ddrconfig(chan, params, channel, cap_info->ddrconfig);
|
||||
set_cap_relate_config(chan, params, channel);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue