Skip to content

Commit

Permalink
usb: chipidea: debug: add low power mode check before print registers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li Jun authored and Peter Chen committed Apr 8, 2015
1 parent 9b6567e commit 0c4d6af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/chipidea/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0c4d6af

Please sign in to comment.