staging: dwc2: re-use hptxfsiz variable
For some reason, the value of the HPTXFSIZ register was built in the ptxfsiz variable, while there was also a hptxfsiz variable availble. Better just use that and remove the (now unused) ptxfsiz variable. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
57bb8aeda0
commit
c35205aa05
1 changed files with 7 additions and 7 deletions
|
@ -507,7 +507,7 @@ void dwc2_disable_host_interrupts(struct dwc2_hsotg *hsotg)
|
||||||
static void dwc2_config_fifos(struct dwc2_hsotg *hsotg)
|
static void dwc2_config_fifos(struct dwc2_hsotg *hsotg)
|
||||||
{
|
{
|
||||||
struct dwc2_core_params *params = hsotg->core_params;
|
struct dwc2_core_params *params = hsotg->core_params;
|
||||||
u32 rxfsiz, nptxfsiz, ptxfsiz, hptxfsiz, dfifocfg;
|
u32 rxfsiz, nptxfsiz, hptxfsiz, dfifocfg;
|
||||||
|
|
||||||
if (!params->enable_dynamic_fifo)
|
if (!params->enable_dynamic_fifo)
|
||||||
return;
|
return;
|
||||||
|
@ -539,12 +539,12 @@ static void dwc2_config_fifos(struct dwc2_hsotg *hsotg)
|
||||||
/* Periodic Tx FIFO */
|
/* Periodic Tx FIFO */
|
||||||
dev_dbg(hsotg->dev, "initial hptxfsiz=%08x\n",
|
dev_dbg(hsotg->dev, "initial hptxfsiz=%08x\n",
|
||||||
readl(hsotg->regs + HPTXFSIZ));
|
readl(hsotg->regs + HPTXFSIZ));
|
||||||
ptxfsiz = params->host_perio_tx_fifo_size <<
|
hptxfsiz = params->host_perio_tx_fifo_size <<
|
||||||
FIFOSIZE_DEPTH_SHIFT & FIFOSIZE_DEPTH_MASK;
|
FIFOSIZE_DEPTH_SHIFT & FIFOSIZE_DEPTH_MASK;
|
||||||
ptxfsiz |= (params->host_rx_fifo_size +
|
hptxfsiz |= (params->host_rx_fifo_size +
|
||||||
params->host_nperio_tx_fifo_size) <<
|
params->host_nperio_tx_fifo_size) <<
|
||||||
FIFOSIZE_STARTADDR_SHIFT & FIFOSIZE_STARTADDR_MASK;
|
FIFOSIZE_STARTADDR_SHIFT & FIFOSIZE_STARTADDR_MASK;
|
||||||
writel(ptxfsiz, hsotg->regs + HPTXFSIZ);
|
writel(hptxfsiz, hsotg->regs + HPTXFSIZ);
|
||||||
dev_dbg(hsotg->dev, "new hptxfsiz=%08x\n",
|
dev_dbg(hsotg->dev, "new hptxfsiz=%08x\n",
|
||||||
readl(hsotg->regs + HPTXFSIZ));
|
readl(hsotg->regs + HPTXFSIZ));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue