[PATCH 04/10] usb: dwc3-generic: Add STih407 support

Marek Vasut marex at denx.de
Tue Jan 14 15:53:34 CET 2025


On 1/14/25 3:45 PM, Patrice Chotard wrote:

> +	/* glue init */
> +	reg = readl(glue_base + CLKRST_CTRL);
> +
> +	reg |= AUX_CLK_EN | EXT_CFG_RESET_N | XHCI_REVISION;
> +	reg &= ~SW_PIPEW_RESET_N;
> +
> +	writel(reg, glue_base + CLKRST_CTRL);
> +
> +	/* configure mux for vbus, powerpresent and bvalid signals */
> +	reg = readl(glue_base + USB2_VBUS_MNGMNT_SEL1);
> +
> +	reg |= SEL_OVERRIDE_VBUSVALID(USB2_VBUS_UTMIOTG) |
> +	       SEL_OVERRIDE_POWERPRESENT(USB2_VBUS_UTMIOTG) |
> +	       SEL_OVERRIDE_BVALID(USB2_VBUS_UTMIOTG);
> +
> +	writel(reg, glue_base + USB2_VBUS_MNGMNT_SEL1);
setbits_le32() , please fix globally.

Also, I am wondering if we're not overstuffing the dwc3-generic.c with 
too many disparate glue code shreds, and whether it isn't just about 
time to split the glue code parts out of it, into separate .c files. 
Thoughts ?


More information about the U-Boot mailing list