[PATCH v2 1/1] drivers: usb: host: Add BRCM xHCI driver

Marek Vasut marex at denx.de
Tue Apr 7 11:03:25 CEST 2020


On 4/7/20 8:29 AM, Rayagonda Kokatanur wrote:
[...]
> +static int xhci_brcm_probe(struct udevice *dev)
> +{
> +	struct xhci_hccr *hcd;
> +	struct xhci_hcor *hcor;
> +	struct brcm_xhci_platdata *plat = dev_get_platdata(dev);
> +	uintptr_t hc_base;
> +	int len, ret = 0;

Reverse xmas tree please.

[...]

> +static int xhci_brcm_deregister(struct udevice *dev)
> +{
> +	struct brcm_xhci_platdata *plat = dev_get_platdata(dev);
> +	uintptr_t hc_base;
> +
> +	hc_base = (uintptr_t)dev_read_addr(dev);

You should cache the hc_base in driver private data instead of always
reading it out of the DT.

The rest looks good, thanks.


More information about the U-Boot mailing list