usb: dwc3: dwc3-octeon: Dump control register on clock init failure
authorLadislav Michl <ladis@linux-mips.org>
Mon, 31 Jul 2023 09:33:24 +0000 (11:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 12:52:15 +0000 (14:52 +0200)
It might be interesting to know control register value in case
clock fails to enable.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/ZMd/5OX9szEMnhQH@lenoch
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-octeon.c

index 330bcb5..d578110 100644 (file)
@@ -299,8 +299,8 @@ static int dwc3_octeon_setup(struct dwc3_octeon *octeon,
        val = dwc3_octeon_readq(uctl_ctl_reg);
        if ((div != FIELD_GET(USBDRD_UCTL_CTL_H_CLKDIV_SEL, val)) ||
            (!(FIELD_GET(USBDRD_UCTL_CTL_H_CLK_EN, val)))) {
-               dev_err(dev, "dwc3 controller clock init failure.\n");
-                       return -EINVAL;
+               dev_err(dev, "clock init failure (UCTL_CTL=%016llx)\n", val);
+               return -EINVAL;
        }
 
        /* Step 4c: Deassert the controller clock divider reset. */