diff mbox

[U-Boot,1/4] usb: dwc2: Pass private data into dwc_otg_core_init()

Message ID 1461763446-6763-1-git-send-email-marex@denx.de
State Accepted
Commit 559019894b8db38a2cf3f74bed78be505d4f9a27
Delegated to: Marek Vasut
Headers show

Commit Message

Marek Vasut April 27, 2016, 1:24 p.m. UTC
Pass the whole bulk of private data instead of just the regs,
since the private data will soon contain important configuration
flags.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Dinh Nguyen <dinguyen@kernel.org>
---
 drivers/usb/host/dwc2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Stefan Roese April 28, 2016, 6:16 a.m. UTC | #1
On 27.04.2016 15:24, Marek Vasut wrote:
> Pass the whole bulk of private data instead of just the regs,
> since the private data will soon contain important configuration
> flags.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Dinh Nguyen <dinguyen@kernel.org>

Tested-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
diff mbox

Patch

diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index b2f4bc6..637b6c0 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -252,8 +252,9 @@  static void dwc_otg_core_host_init(struct dwc2_core_regs *regs)
  *
  * @param regs Programming view of the DWC_otg controller
  */
-static void dwc_otg_core_init(struct dwc2_core_regs *regs)
+static void dwc_otg_core_init(struct dwc2_priv *priv)
 {
+	struct dwc2_core_regs *regs = priv->regs;
 	uint32_t ahbcfg = 0;
 	uint32_t usbcfg = 0;
 	uint8_t brst_sz = CONFIG_DWC2_DMA_BURST_SIZE;
@@ -1056,7 +1057,7 @@  static int dwc2_init_common(struct dwc2_priv *priv)
 		return -ENODEV;
 	}
 
-	dwc_otg_core_init(regs);
+	dwc_otg_core_init(priv);
 	dwc_otg_core_host_init(regs);
 
 	clrsetbits_le32(&regs->hprt0, DWC2_HPRT0_PRTENA |