diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-02-16 15:59:32 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-02-23 08:37:56 +0900 |
commit | dd38374d2f1d89fb34d4c544f558537db1966a33 (patch) | |
tree | d0d90c7b4fcf280741fbda498e31d31b66835d22 /arch/arm/mach-uniphier/dram/umc-pxs2.c | |
parent | 784548efb2b76fdbfdb73f6a505a156f90bb1e55 (diff) |
ARM: uniphier: remove dram_nr_ch from board parameters
This parameter is redundant because we can know the number of
channels by checking if dram_ch[2].size is zero.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/arm/mach-uniphier/dram/umc-pxs2.c')
-rw-r--r-- | arch/arm/mach-uniphier/dram/umc-pxs2.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/mach-uniphier/dram/umc-pxs2.c b/arch/arm/mach-uniphier/dram/umc-pxs2.c index 05a62de45a..7fa29f119d 100644 --- a/arch/arm/mach-uniphier/dram/umc-pxs2.c +++ b/arch/arm/mach-uniphier/dram/umc-pxs2.c @@ -619,15 +619,17 @@ int uniphier_pxs2_umc_init(const struct uniphier_board_data *bd) return -EINVAL; } - for (ch = 0; ch < bd->dram_nr_ch; ch++) { + for (ch = 0; ch < DRAM_CH_NR; ch++) { unsigned long size = bd->dram_ch[ch].size; unsigned int width = bd->dram_ch[ch].width; - ret = umc_ch_init(umc_ch_base, freq, size / (width / 16), - width, ch); - if (ret) { - pr_err("failed to initialize UMC ch%d\n", ch); - return ret; + if (size) { + ret = umc_ch_init(umc_ch_base, freq, + size / (width / 16), width, ch); + if (ret) { + pr_err("failed to initialize UMC ch%d\n", ch); + return ret; + } } umc_ch_base += 0x00200000; |