Commit ba48eab8 authored by Robert Baldyga's avatar Robert Baldyga Committed by Felipe Balbi

usb: dwc2: gadget: change variable name to more meaningful

Since we handle FIFOs and endpoint separately, using variable named 'ep'
in context of FIFO is misleading, hence we rename it to 'fifo'.
Signed-off-by: default avatarRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent aa381a72
...@@ -186,7 +186,7 @@ static void dwc2_hsotg_ctrl_epint(struct dwc2_hsotg *hsotg, ...@@ -186,7 +186,7 @@ static void dwc2_hsotg_ctrl_epint(struct dwc2_hsotg *hsotg,
*/ */
static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg) static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
{ {
unsigned int ep; unsigned int fifo;
unsigned int addr; unsigned int addr;
int timeout; int timeout;
u32 dptxfsizn; u32 dptxfsizn;
...@@ -217,8 +217,8 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg) ...@@ -217,8 +217,8 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
* them to endpoints dynamically according to maxpacket size value of * them to endpoints dynamically according to maxpacket size value of
* given endpoint. * given endpoint.
*/ */
for (ep = 1; ep < MAX_EPS_CHANNELS; ep++) { for (fifo = 1; fifo < MAX_EPS_CHANNELS; fifo++) {
dptxfsizn = dwc2_readl(hsotg->regs + DPTXFSIZN(ep)); dptxfsizn = dwc2_readl(hsotg->regs + DPTXFSIZN(fifo));
val = (dptxfsizn & FIFOSIZE_DEPTH_MASK) | addr; val = (dptxfsizn & FIFOSIZE_DEPTH_MASK) | addr;
addr += dptxfsizn >> FIFOSIZE_DEPTH_SHIFT; addr += dptxfsizn >> FIFOSIZE_DEPTH_SHIFT;
...@@ -226,7 +226,7 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg) ...@@ -226,7 +226,7 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
if (addr > hsotg->fifo_mem) if (addr > hsotg->fifo_mem)
break; break;
dwc2_writel(val, hsotg->regs + DPTXFSIZN(ep)); dwc2_writel(val, hsotg->regs + DPTXFSIZN(fifo));
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment