gadget.c (d1ac8c802dce92971d1cc81f82a3466b2104e787) | gadget.c (1b4977c793d3d9818ff04df1a09f3c60166626fa) |
---|---|
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> --- 3398 unchanged lines hidden (view full) --- 3407 * The following actions will be taken: 3408 * - Determine the EP 3409 * - Disable EP; when 'Endpoint Disabled' interrupt is received Flush FIFO 3410 */ 3411static void dwc2_gadget_handle_incomplete_isoc_in(struct dwc2_hsotg *hsotg) 3412{ 3413 struct dwc2_hsotg_ep *hs_ep; 3414 u32 epctrl; | 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> --- 3398 unchanged lines hidden (view full) --- 3407 * The following actions will be taken: 3408 * - Determine the EP 3409 * - Disable EP; when 'Endpoint Disabled' interrupt is received Flush FIFO 3410 */ 3411static void dwc2_gadget_handle_incomplete_isoc_in(struct dwc2_hsotg *hsotg) 3412{ 3413 struct dwc2_hsotg_ep *hs_ep; 3414 u32 epctrl; |
3415 u32 daintmsk; |
|
3415 u32 idx; 3416 3417 dev_dbg(hsotg->dev, "Incomplete isoc in interrupt received:\n"); 3418 | 3416 u32 idx; 3417 3418 dev_dbg(hsotg->dev, "Incomplete isoc in interrupt received:\n"); 3419 |
3420 daintmsk = dwc2_readl(hsotg->regs + DAINTMSK); 3421 |
|
3419 for (idx = 1; idx <= hsotg->num_of_eps; idx++) { 3420 hs_ep = hsotg->eps_in[idx]; | 3422 for (idx = 1; idx <= hsotg->num_of_eps; idx++) { 3423 hs_ep = hsotg->eps_in[idx]; |
3424 /* Proceed only unmasked ISOC EPs */ 3425 if (!hs_ep->isochronous || (BIT(idx) & ~daintmsk)) 3426 continue; 3427 |
|
3421 epctrl = dwc2_readl(hsotg->regs + DIEPCTL(idx)); | 3428 epctrl = dwc2_readl(hsotg->regs + DIEPCTL(idx)); |
3422 if ((epctrl & DXEPCTL_EPENA) && hs_ep->isochronous && | 3429 if ((epctrl & DXEPCTL_EPENA) && |
3423 dwc2_gadget_target_frame_elapsed(hs_ep)) { 3424 epctrl |= DXEPCTL_SNAK; 3425 epctrl |= DXEPCTL_EPDIS; 3426 dwc2_writel(epctrl, hsotg->regs + DIEPCTL(idx)); 3427 } 3428 } 3429 3430 /* Clear interrupt */ --- 1401 unchanged lines hidden --- | 3430 dwc2_gadget_target_frame_elapsed(hs_ep)) { 3431 epctrl |= DXEPCTL_SNAK; 3432 epctrl |= DXEPCTL_EPDIS; 3433 dwc2_writel(epctrl, hsotg->regs + DIEPCTL(idx)); 3434 } 3435 } 3436 3437 /* Clear interrupt */ --- 1401 unchanged lines hidden --- |