gadget.c (83cf9cd6d50ed4f7e6ae265e80e38b235c792f5f) | gadget.c (89066b36c43dc9100ad2c86e0b6bf8c81ca0b4d4) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 4 * http://www.samsung.com 5 * 6 * Copyright 2008 Openmoko, Inc. 7 * Copyright 2008 Simtec Electronics 8 * Ben Dooks <ben@simtec.co.uk> --- 3416 unchanged lines hidden (view full) --- 3425 3426 dev_dbg(hsotg->dev, "Incomplete isoc in interrupt received:\n"); 3427 3428 daintmsk = dwc2_readl(hsotg->regs + DAINTMSK); 3429 3430 for (idx = 1; idx < hsotg->num_of_eps; idx++) { 3431 hs_ep = hsotg->eps_in[idx]; 3432 /* Proceed only unmasked ISOC EPs */ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 4 * http://www.samsung.com 5 * 6 * Copyright 2008 Openmoko, Inc. 7 * Copyright 2008 Simtec Electronics 8 * Ben Dooks <ben@simtec.co.uk> --- 3416 unchanged lines hidden (view full) --- 3425 3426 dev_dbg(hsotg->dev, "Incomplete isoc in interrupt received:\n"); 3427 3428 daintmsk = dwc2_readl(hsotg->regs + DAINTMSK); 3429 3430 for (idx = 1; idx < hsotg->num_of_eps; idx++) { 3431 hs_ep = hsotg->eps_in[idx]; 3432 /* Proceed only unmasked ISOC EPs */ |
3433 if (!hs_ep->isochronous || (BIT(idx) & ~daintmsk)) | 3433 if ((BIT(idx) & ~daintmsk) || !hs_ep->isochronous) |
3434 continue; 3435 3436 epctrl = dwc2_readl(hsotg->regs + DIEPCTL(idx)); 3437 if ((epctrl & DXEPCTL_EPENA) && 3438 dwc2_gadget_target_frame_elapsed(hs_ep)) { 3439 epctrl |= DXEPCTL_SNAK; 3440 epctrl |= DXEPCTL_EPDIS; 3441 dwc2_writel(epctrl, hsotg->regs + DIEPCTL(idx)); --- 29 unchanged lines hidden (view full) --- 3471 dev_dbg(hsotg->dev, "%s: GINTSTS_INCOMPL_SOOUT\n", __func__); 3472 3473 daintmsk = dwc2_readl(hsotg->regs + DAINTMSK); 3474 daintmsk >>= DAINT_OUTEP_SHIFT; 3475 3476 for (idx = 1; idx < hsotg->num_of_eps; idx++) { 3477 hs_ep = hsotg->eps_out[idx]; 3478 /* Proceed only unmasked ISOC EPs */ | 3434 continue; 3435 3436 epctrl = dwc2_readl(hsotg->regs + DIEPCTL(idx)); 3437 if ((epctrl & DXEPCTL_EPENA) && 3438 dwc2_gadget_target_frame_elapsed(hs_ep)) { 3439 epctrl |= DXEPCTL_SNAK; 3440 epctrl |= DXEPCTL_EPDIS; 3441 dwc2_writel(epctrl, hsotg->regs + DIEPCTL(idx)); --- 29 unchanged lines hidden (view full) --- 3471 dev_dbg(hsotg->dev, "%s: GINTSTS_INCOMPL_SOOUT\n", __func__); 3472 3473 daintmsk = dwc2_readl(hsotg->regs + DAINTMSK); 3474 daintmsk >>= DAINT_OUTEP_SHIFT; 3475 3476 for (idx = 1; idx < hsotg->num_of_eps; idx++) { 3477 hs_ep = hsotg->eps_out[idx]; 3478 /* Proceed only unmasked ISOC EPs */ |
3479 if (!hs_ep->isochronous || (BIT(idx) & ~daintmsk)) | 3479 if ((BIT(idx) & ~daintmsk) || !hs_ep->isochronous) |
3480 continue; 3481 3482 epctrl = dwc2_readl(hsotg->regs + DOEPCTL(idx)); 3483 if ((epctrl & DXEPCTL_EPENA) && 3484 dwc2_gadget_target_frame_elapsed(hs_ep)) { 3485 /* Unmask GOUTNAKEFF interrupt */ 3486 gintmsk = dwc2_readl(hsotg->regs + GINTMSK); 3487 gintmsk |= GINTSTS_GOUTNAKEFF; --- 157 unchanged lines hidden (view full) --- 3645 gintmsk = dwc2_readl(hsotg->regs + GINTMSK); 3646 gintmsk &= ~GINTSTS_GOUTNAKEFF; 3647 dwc2_writel(gintmsk, hsotg->regs + GINTMSK); 3648 3649 dev_dbg(hsotg->dev, "GOUTNakEff triggered\n"); 3650 for (idx = 1; idx < hsotg->num_of_eps; idx++) { 3651 hs_ep = hsotg->eps_out[idx]; 3652 /* Proceed only unmasked ISOC EPs */ | 3480 continue; 3481 3482 epctrl = dwc2_readl(hsotg->regs + DOEPCTL(idx)); 3483 if ((epctrl & DXEPCTL_EPENA) && 3484 dwc2_gadget_target_frame_elapsed(hs_ep)) { 3485 /* Unmask GOUTNAKEFF interrupt */ 3486 gintmsk = dwc2_readl(hsotg->regs + GINTMSK); 3487 gintmsk |= GINTSTS_GOUTNAKEFF; --- 157 unchanged lines hidden (view full) --- 3645 gintmsk = dwc2_readl(hsotg->regs + GINTMSK); 3646 gintmsk &= ~GINTSTS_GOUTNAKEFF; 3647 dwc2_writel(gintmsk, hsotg->regs + GINTMSK); 3648 3649 dev_dbg(hsotg->dev, "GOUTNakEff triggered\n"); 3650 for (idx = 1; idx < hsotg->num_of_eps; idx++) { 3651 hs_ep = hsotg->eps_out[idx]; 3652 /* Proceed only unmasked ISOC EPs */ |
3653 if (!hs_ep->isochronous || (BIT(idx) & ~daintmsk)) | 3653 if ((BIT(idx) & ~daintmsk) || !hs_ep->isochronous) |
3654 continue; 3655 3656 epctrl = dwc2_readl(hsotg->regs + DOEPCTL(idx)); 3657 3658 if (epctrl & DXEPCTL_EPENA) { 3659 epctrl |= DXEPCTL_SNAK; 3660 epctrl |= DXEPCTL_EPDIS; 3661 dwc2_writel(epctrl, hsotg->regs + DOEPCTL(idx)); --- 1475 unchanged lines hidden --- | 3654 continue; 3655 3656 epctrl = dwc2_readl(hsotg->regs + DOEPCTL(idx)); 3657 3658 if (epctrl & DXEPCTL_EPENA) { 3659 epctrl |= DXEPCTL_SNAK; 3660 epctrl |= DXEPCTL_EPDIS; 3661 dwc2_writel(epctrl, hsotg->regs + DOEPCTL(idx)); --- 1475 unchanged lines hidden --- |