diff options
author | Tom Rini <trini@konsulko.com> | 2015-11-22 08:20:03 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-11-22 08:20:03 -0500 |
commit | 80d307d1159b7edfc28b465e5a359c1dfb20566e (patch) | |
tree | fc65889724eac5ec28d0229226ecd3edfb94a2e8 /drivers/usb/musb-new/sunxi.c | |
parent | f3c71c93d71dbc8994648b7f7b98210df2d0a0a6 (diff) | |
parent | aa56cb374de8ae83f3280fdd6c280724228b86d7 (diff) |
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
Diffstat (limited to 'drivers/usb/musb-new/sunxi.c')
-rw-r--r-- | drivers/usb/musb-new/sunxi.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index a146c0861f..5eb8d19b74 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -166,6 +166,17 @@ static void USBC_ConfigFIFO_Base(void) } /****************************************************************************** + * Needed for the DFU polling magic + ******************************************************************************/ + +static u8 last_int_usb; + +bool dfu_usb_get_reset(void) +{ + return !!(last_int_usb & MUSB_INTR_RESET); +} + +/****************************************************************************** * MUSB Glue code ******************************************************************************/ @@ -176,6 +187,7 @@ static irqreturn_t sunxi_musb_interrupt(int irq, void *__hci) /* read and flush interrupts */ musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB); + last_int_usb = musb->int_usb; if (musb->int_usb) musb_writeb(musb->mregs, MUSB_INTRUSB, musb->int_usb); musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX); |