提交 51244a60 编写于 作者: M Masahiro Yamada

ARM: uniphier: fix build error when CONFIG_CMD_DDRMPHY_DUMP=y

The build fails if compiled with CONFIG_CMD_DDRMPHY_DUMP=y since commit
46abfcc9 ("ARM: uniphier: rework struct uniphier_board_data").

Fixes: 46abfcc9 ("ARM: uniphier: rework struct uniphier_board_data")
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 c6c7eed7
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册