]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
Merge branch 'master' of git://git.denx.de/u-boot-uniphier
[u-boot] / arch / arm / mach-uniphier / dram / cmd_ddrmphy.c
index c18f099f2c008478396a5effe83b9002a9d9cc2c..47cee6fb31618fb5a1165e2e5153c79830f62a26 100644 (file)
@@ -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)
@@ -318,7 +304,7 @@ static int do_ddrm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 U_BOOT_CMD(
        ddrm,   2,      1,      do_ddrm,
        "UniPhier DDR PHY parameters dumper",
-       "- dump all of the followings\n"
+       "- dump all of the following\n"
        "ddrm zq - dump Impedance Data\n"
        "ddrm wbdl - dump Write Bit Delay\n"
        "ddrm rbdl - dump Read Bit Delay\n"