diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-03-04 06:54:29 (GMT) |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-03-08 16:10:47 (GMT) |
commit | 51244a60805fb91112f61ef268f58fc6d47a3d0a (patch) | |
tree | 10a45dc6c809264af3ad4607557ee7f145ea67aa /arch | |
parent | c6c7eed741981e12111ef6fa25265cc5f0b53908 (diff) | |
download | u-boot-51244a60805fb91112f61ef268f58fc6d47a3d0a.tar.xz |
ARM: uniphier: fix build error when CONFIG_CMD_DDRMPHY_DUMP=y
The build fails if compiled with CONFIG_CMD_DDRMPHY_DUMP=y since commit
46abfcc99e04 ("ARM: uniphier: rework struct uniphier_board_data").
Fixes: 46abfcc99e04 ("ARM: uniphier: rework struct uniphier_board_data")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-uniphier/dram/cmd_ddrmphy.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c index c18f099..7ac9378 100644 --- a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c +++ b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c @@ -28,28 +28,14 @@ static int get_nr_ch(void) { const struct uniphier_board_data *bd = uniphier_get_board_param(); - return bd->dram_ch2_width ? 3 : 2; + return bd->dram_ch[2].size ? 3 : 2; } static int get_nr_datx8(int ch) { - unsigned int width; - const struct uniphier_board_data *bd = uniphier_get_board_param(); - switch (ch) { - case 0: - width = bd->dram_ch0_width; - break; - case 1: - width = bd->dram_ch1_width; - break; - default: - width = bd->dram_ch2_width; - break; - } - - return width / 8; + return bd->dram_ch[ch].width / 8; } static void print_bdl(void __iomem *reg, int n) |