From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Jacques Hiblot Date: Fri, 3 May 2019 11:38:04 +0200 Subject: [U-Boot] [PATCH v1 12/18] usb: dwc3: Add dwc3_of_parse() to get quirks information from DT In-Reply-To: <6d9cd4ec-224d-a258-c69e-fc9ea7a19422@gmail.com> References: <20190405125554.18070-1-jjhiblot@ti.com> <20190405125554.18070-13-jjhiblot@ti.com> <6d9cd4ec-224d-a258-c69e-fc9ea7a19422@gmail.com> Message-ID: <8fb2a36d-b6bc-05e1-1c75-f2a39d3b8c92@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 29/04/2019 11:58, Marek Vasut wrote: > On 4/5/19 2:55 PM, Jean-Jacques Hiblot wrote: >> Add a new function that read quirk and configuration information from the >> DT. The goal is to allow platforms using their own version of DWC3 driver >> to migrate to the generic DWC3 driver. >> The function is adapted from the linux dwc3 driver. > >From which commit in Linux ? dwc3_get_properties()has been introduced in commit c5ac6116db35d, and then several commits have added properties as needs arose, like b5a65c406367 ("usb: dwc3: add P3 in U2 SS inactive quirk") JJ >> Signed-off-by: Jean-Jacques Hiblot >> --- > [...] > >> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c >> index 3d008496f3..158d726623 100644 >> --- a/drivers/usb/dwc3/dwc3-generic.c >> +++ b/drivers/usb/dwc3/dwc3-generic.c >> @@ -48,8 +48,12 @@ static int dwc3_generic_probe(struct udevice *dev, >> struct dwc3_generic_plat *plat = dev_get_platdata(dev); >> struct dwc3 *dwc3 = &priv->dwc3; >> >> + dwc3->dev = dev; >> dwc3->maximum_speed = plat->maximum_speed; >> dwc3->dr_mode = plat->dr_mode; >> +#if CONFIG_IS_ENABLED(OF_CONTROL) >> + dwc3_of_parse(dwc3); >> +#endif >> >> rc = dwc3_setup_phy(dev, &priv->phys, &priv->num_phys); >> if (rc) >> @@ -57,7 +61,7 @@ static int dwc3_generic_probe(struct udevice *dev, >> >> priv->base = map_physmem(plat->base, DWC3_OTG_REGS_END, MAP_NOCACHE); >> dwc3->regs = priv->base + DWC3_GLOBALS_REGS_START; >> - dwc3->dev = dev; >> + >> > Drop the extra newline > >> rc = dwc3_init(dwc3); >> if (rc) { >> >