1
0

115-musb-ignore-vbus-errors.patch 931 B

1234567891011121314151617181920212223242526
  1. From fce20ac5d8c98f1a8ea5298051d9fa669e455f04 Mon Sep 17 00:00:00 2001
  2. From: Hans de Goede <hdegoede@redhat.com>
  3. Date: Tue, 4 Aug 2015 23:22:45 +0200
  4. Subject: [PATCH] musb: sunxi: Ignore VBus errors in host-only mode
  5. For some unclear reason sometimes we get VBus errors in host-only mode,
  6. even though we do not have any vbus-detection then. Ignore these.
  7. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  8. ---
  9. drivers/usb/musb/sunxi.c | 4 ++++
  10. 1 file changed, 4 insertions(+)
  11. --- a/drivers/usb/musb/sunxi.c
  12. +++ b/drivers/usb/musb/sunxi.c
  13. @@ -194,6 +194,10 @@ static irqreturn_t sunxi_musb_interrupt(
  14. musb_writeb(musb->mregs, MUSB_FADDR, 0);
  15. }
  16. + /* Ignore Vbus errors when in host only mode */
  17. + if (musb->port_mode == MUSB_PORT_MODE_HOST)
  18. + musb->int_usb &= ~MUSB_INTR_VBUSERROR;
  19. +
  20. musb->int_tx = readw(musb->mregs + SUNXI_MUSB_INTRTX);
  21. if (musb->int_tx)
  22. writew(musb->int_tx, musb->mregs + SUNXI_MUSB_INTRTX);