ARM: mx6: ddr: Make debug prints work with tiny printf
authorMarek Vasut <marex@denx.de>
Tue, 26 Nov 2019 08:34:49 +0000 (09:34 +0100)
committerStefano Babic <sbabic@denx.de>
Tue, 7 Jan 2020 09:26:56 +0000 (10:26 +0100)
The %08X format returns just zeroes with tiny printf, which is
horribly confusing, especially when debugging DRAM calibration
problems. Change the format to %08x (with lowercase x), which
behaves correctly with either implementation of printf in SPL.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eric Nelson <eric@nelint.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Eric Nelson <eric@nelint.com>
arch/arm/mach-imx/mx6/ddr.c

index 84b92362495a6b540b1f3289afeda1d66b9c6c24..e6f69e904fae9110fab87ebbf1ce85542ea5b0cf 100644 (file)
@@ -214,14 +214,14 @@ int mmdc_do_write_level_calibration(struct mx6_ddr_sysinfo const *sysinfo)
        writel(esdmisc_val, &mmdc0->mdref);
        writel(zq_val, &mmdc0->mpzqhwctrl);
 
-       debug("\tMMDC_MPWLDECTRL0 after write level cal: 0x%08X\n",
+       debug("\tMMDC_MPWLDECTRL0 after write level cal: 0x%08x\n",
              readl(&mmdc0->mpwldectrl0));
-       debug("\tMMDC_MPWLDECTRL1 after write level cal: 0x%08X\n",
+       debug("\tMMDC_MPWLDECTRL1 after write level cal: 0x%08x\n",
              readl(&mmdc0->mpwldectrl1));
        if (sysinfo->dsize == 2) {
-               debug("\tMMDC_MPWLDECTRL0 after write level cal: 0x%08X\n",
+               debug("\tMMDC_MPWLDECTRL0 after write level cal: 0x%08x\n",
                      readl(&mmdc1->mpwldectrl0));
-               debug("\tMMDC_MPWLDECTRL1 after write level cal: 0x%08X\n",
+               debug("\tMMDC_MPWLDECTRL1 after write level cal: 0x%08x\n",
                      readl(&mmdc1->mpwldectrl1));
        }
 
@@ -557,20 +557,20 @@ int mmdc_do_dqs_calibration(struct mx6_ddr_sysinfo const *sysinfo)
         */
        debug("MMDC registers updated from calibration\n");
        debug("Read DQS gating calibration:\n");
-       debug("\tMPDGCTRL0 PHY0 = 0x%08X\n", readl(&mmdc0->mpdgctrl0));
-       debug("\tMPDGCTRL1 PHY0 = 0x%08X\n", readl(&mmdc0->mpdgctrl1));
+       debug("\tMPDGCTRL0 PHY0 = 0x%08x\n", readl(&mmdc0->mpdgctrl0));
+       debug("\tMPDGCTRL1 PHY0 = 0x%08x\n", readl(&mmdc0->mpdgctrl1));
        if (sysinfo->dsize == 2) {
-               debug("\tMPDGCTRL0 PHY1 = 0x%08X\n", readl(&mmdc1->mpdgctrl0));
-               debug("\tMPDGCTRL1 PHY1 = 0x%08X\n", readl(&mmdc1->mpdgctrl1));
+               debug("\tMPDGCTRL0 PHY1 = 0x%08x\n", readl(&mmdc1->mpdgctrl0));
+               debug("\tMPDGCTRL1 PHY1 = 0x%08x\n", readl(&mmdc1->mpdgctrl1));
        }
        debug("Read calibration:\n");
-       debug("\tMPRDDLCTL PHY0 = 0x%08X\n", readl(&mmdc0->mprddlctl));
+       debug("\tMPRDDLCTL PHY0 = 0x%08x\n", readl(&mmdc0->mprddlctl));
        if (sysinfo->dsize == 2)
-               debug("\tMPRDDLCTL PHY1 = 0x%08X\n", readl(&mmdc1->mprddlctl));
+               debug("\tMPRDDLCTL PHY1 = 0x%08x\n", readl(&mmdc1->mprddlctl));
        debug("Write calibration:\n");
-       debug("\tMPWRDLCTL PHY0 = 0x%08X\n", readl(&mmdc0->mpwrdlctl));
+       debug("\tMPWRDLCTL PHY0 = 0x%08x\n", readl(&mmdc0->mpwrdlctl));
        if (sysinfo->dsize == 2)
-               debug("\tMPWRDLCTL PHY1 = 0x%08X\n", readl(&mmdc1->mpwrdlctl));
+               debug("\tMPWRDLCTL PHY1 = 0x%08x\n", readl(&mmdc1->mpwrdlctl));
 
        /*
         * Registers below are for debugging purposes.  These print out