diff options
-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 c18f099f2c..7ac93786be 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) |