[PATCH v4 10/13] xhci: mediatek: Add support for MTK xHCI host controller

Marek Vasut marex at denx.de
Fri Apr 3 13:46:13 CEST 2020


On 4/3/20 5:33 AM, Chunfeng Yun wrote:
[...]
> +static int xhci_mtk_ofdata_get(struct mtk_xhci *mtk)
> +{
> +	struct udevice *dev = mtk->dev;
> +	int ret = 0;
> +
> +	mtk->hcd = devfdt_remap_addr_name(dev, "mac");
> +	if (!mtk->hcd) {
> +		dev_err(dev, "Failed to get xHCI base address\n");
> +		return -ENXIO;
> +	}
> +
> +	mtk->ippc = devfdt_remap_addr_name(dev, "ippc");
> +	if (!mtk->ippc) {
> +		dev_err(dev, "Failed to get IPPC base address\n");
> +		return -ENXIO;
> +	}
> +
> +	dev_info(dev, "hcd: 0x%p, ippc: 0x%p\n", mtk->hcd, mtk->ippc);
> +
> +	ret = clk_get_bulk(dev, &mtk->clks);
> +	if (ret) {
> +		dev_err(dev, "Failed to get clocks\n");

Nitpick -- print the return value you got, it makes things easier to
debug if it's in the error output. Same for the other places which
report such errors in this driver.

> +		return ret;
> +	}

[...]

The rest looks good, thanks.


More information about the U-Boot mailing list