
7 Apr
2020
7 Apr
'20
7:38 a.m.
On Fri, 2020-04-03 at 13:46 +0200, Marek Vasut wrote:
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.
OK, will add it, thanks
return ret;
- }
[...]
The rest looks good, thanks.