diff options
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index fc192ad9cc6a..a501542dfeb5 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2157,11 +2157,19 @@ static void musb_restore_context(struct musb *musb) | |||
2157 | void __iomem *musb_base = musb->mregs; | 2157 | void __iomem *musb_base = musb->mregs; |
2158 | void __iomem *ep_target_regs; | 2158 | void __iomem *ep_target_regs; |
2159 | void __iomem *epio; | 2159 | void __iomem *epio; |
2160 | u8 power; | ||
2160 | 2161 | ||
2161 | musb_writew(musb_base, MUSB_FRAME, musb->context.frame); | 2162 | musb_writew(musb_base, MUSB_FRAME, musb->context.frame); |
2162 | musb_writeb(musb_base, MUSB_TESTMODE, musb->context.testmode); | 2163 | musb_writeb(musb_base, MUSB_TESTMODE, musb->context.testmode); |
2163 | musb_write_ulpi_buscontrol(musb->mregs, musb->context.busctl); | 2164 | musb_write_ulpi_buscontrol(musb->mregs, musb->context.busctl); |
2164 | musb_writeb(musb_base, MUSB_POWER, musb->context.power); | 2165 | |
2166 | /* Don't affect SUSPENDM/RESUME bits in POWER reg */ | ||
2167 | power = musb_readb(musb_base, MUSB_POWER); | ||
2168 | power &= MUSB_POWER_SUSPENDM | MUSB_POWER_RESUME; | ||
2169 | musb->context.power &= ~(MUSB_POWER_SUSPENDM | MUSB_POWER_RESUME); | ||
2170 | power |= musb->context.power; | ||
2171 | musb_writeb(musb_base, MUSB_POWER, power); | ||
2172 | |||
2165 | musb_writew(musb_base, MUSB_INTRTXE, musb->intrtxe); | 2173 | musb_writew(musb_base, MUSB_INTRTXE, musb->intrtxe); |
2166 | musb_writew(musb_base, MUSB_INTRRXE, musb->intrrxe); | 2174 | musb_writew(musb_base, MUSB_INTRRXE, musb->intrrxe); |
2167 | musb_writeb(musb_base, MUSB_INTRUSBE, musb->context.intrusbe); | 2175 | musb_writeb(musb_base, MUSB_INTRUSBE, musb->context.intrusbe); |