From: Bob Liu <lliubbo@xxxxxxxxx> It's wrong to add 0x10 while save context registers like MUSB_TXMAXP, MUSB_TXCSR,MUSB_RXMAXP etc. This patch fix it. Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx> --- drivers/usb/musb/musb_core.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 540c766..bec4b86 100755 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2282,13 +2282,13 @@ void musb_save_context(struct musb *musb) for (i = 0; i < MUSB_C_NUM_EPS; ++i) { musb_writeb(musb_base, MUSB_INDEX, i); musb_context.index_regs[i].txmaxp = - musb_readw(musb_base, 0x10 + MUSB_TXMAXP); + musb_readw(musb_base, MUSB_TXMAXP); musb_context.index_regs[i].txcsr = - musb_readw(musb_base, 0x10 + MUSB_TXCSR); + musb_readw(musb_base, MUSB_TXCSR); musb_context.index_regs[i].rxmaxp = - musb_readw(musb_base, 0x10 + MUSB_RXMAXP); + musb_readw(musb_base, MUSB_RXMAXP); musb_context.index_regs[i].rxcsr = - musb_readw(musb_base, 0x10 + MUSB_RXCSR); + musb_readw(musb_base, MUSB_RXCSR); if (musb->dyn_fifo) { musb_context.index_regs[i].txfifoadd = @@ -2302,13 +2302,13 @@ void musb_save_context(struct musb *musb) } if (is_host_enabled(musb)) { musb_context.index_regs[i].txtype = - musb_readb(musb_base, 0x10 + MUSB_TXTYPE); + musb_readb(musb_base, MUSB_TXTYPE); musb_context.index_regs[i].txinterval = - musb_readb(musb_base, 0x10 + MUSB_TXINTERVAL); + musb_readb(musb_base, MUSB_TXINTERVAL); musb_context.index_regs[i].rxtype = - musb_readb(musb_base, 0x10 + MUSB_RXTYPE); + musb_readb(musb_base, MUSB_RXTYPE); musb_context.index_regs[i].rxinterval = - musb_readb(musb_base, 0x10 + MUSB_RXINTERVAL); + musb_readb(musb_base, MUSB_RXINTERVAL); musb_context.index_regs[i].txfunaddr = musb_read_txfunaddr(musb_base, i); @@ -2352,13 +2352,13 @@ void musb_restore_context(struct musb *musb) for (i = 0; i < MUSB_C_NUM_EPS; ++i) { musb_writeb(musb_base, MUSB_INDEX, i); - musb_writew(musb_base, 0x10 + MUSB_TXMAXP, + musb_writew(musb_base, MUSB_TXMAXP, musb_context.index_regs[i].txmaxp); - musb_writew(musb_base, 0x10 + MUSB_TXCSR, + musb_writew(musb_base, MUSB_TXCSR, musb_context.index_regs[i].txcsr); - musb_writew(musb_base, 0x10 + MUSB_RXMAXP, + musb_writew(musb_base, MUSB_RXMAXP, musb_context.index_regs[i].rxmaxp); - musb_writew(musb_base, 0x10 + MUSB_RXCSR, + musb_writew(musb_base, MUSB_RXCSR, musb_context.index_regs[i].rxcsr); if (musb->dyn_fifo) { @@ -2373,13 +2373,13 @@ void musb_restore_context(struct musb *musb) } if (is_host_enabled(musb)) { - musb_writeb(musb_base, 0x10 + MUSB_TXTYPE, + musb_writeb(musb_base, MUSB_TXTYPE, musb_context.index_regs[i].txtype); - musb_writeb(musb_base, 0x10 + MUSB_TXINTERVAL, + musb_writeb(musb_base, MUSB_TXINTERVAL, musb_context.index_regs[i].txinterval); - musb_writeb(musb_base, 0x10 + MUSB_RXTYPE, + musb_writeb(musb_base, MUSB_RXTYPE, musb_context.index_regs[i].rxtype); - musb_writeb(musb_base, 0x10 + MUSB_RXINTERVAL, + musb_writeb(musb_base, MUSB_RXINTERVAL, musb_context.index_regs[i].rxinterval); musb_write_txfunaddr(musb_base, i, -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html