Explorar o código

usb: chipidea: debug: add low power mode check before print registers

Since the required clock to access registers is gated off in low power mode,
add ci->in_lpm check before try to dump registers value.

Signed-off-by: Li Jun <jun.li@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Li Jun %!s(int64=10) %!d(string=hai) anos
pai
achega
0c4d6af42d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      drivers/usb/chipidea/debug.c

+ 2 - 2
drivers/usb/chipidea/debug.c

@@ -336,8 +336,8 @@ static int ci_registers_show(struct seq_file *s, void *unused)
 	struct ci_hdrc *ci = s->private;
 	u32 tmp_reg;
 
-	if (!ci)
-		return 0;
+	if (!ci || ci->in_lpm)
+		return -EPERM;
 
 	/* ------ Registers ----- */
 	tmp_reg = hw_read_intr_enable(ci);