mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
usb: dwc2: gadget: config GAHBCFG from core parameter
The ahbcfg of dwc2_core_params can be used to overwrite the default value of the GAHBCFG register. But the current code don't use this parameter for dwc2 gadget, and always set the burst length of GAHBCFG to INCR4. This patch sets the the burst length of GAHBCFG to INCR4 only if ahbcfg is -1, otherwise, overwrite the GAHBCFG with the ahbcfg value. Change-Id: I78ed8f797a4b94b34f610789ee3bd61bcc8ed985 Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
parent
93b078afc2
commit
ddfb482c0b
|
|
@ -2563,15 +2563,16 @@ void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *hsotg,
|
|||
|
||||
dwc2_writel(intmsk, hsotg->regs + GINTMSK);
|
||||
|
||||
if (using_dma(hsotg))
|
||||
dwc2_writel(GAHBCFG_GLBL_INTR_EN | GAHBCFG_DMA_EN |
|
||||
(GAHBCFG_HBSTLEN_INCR4 << GAHBCFG_HBSTLEN_SHIFT),
|
||||
if (using_dma(hsotg)) {
|
||||
val = hsotg->core_params->ahbcfg & ~GAHBCFG_CTRL_MASK;
|
||||
dwc2_writel(GAHBCFG_GLBL_INTR_EN | GAHBCFG_DMA_EN | val,
|
||||
hsotg->regs + GAHBCFG);
|
||||
else
|
||||
} else {
|
||||
dwc2_writel(((hsotg->dedicated_fifos) ?
|
||||
(GAHBCFG_NP_TXF_EMP_LVL |
|
||||
GAHBCFG_P_TXF_EMP_LVL) : 0) |
|
||||
GAHBCFG_GLBL_INTR_EN, hsotg->regs + GAHBCFG);
|
||||
}
|
||||
|
||||
/*
|
||||
* If INTknTXFEmpMsk is enabled, it's important to disable ep interrupts
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user