From: Chen-Yu Tsai Date: Tue, 12 Dec 2017 15:24:21 +0800 Subject: [U-Boot] [PATCH] musb: sunxi: Use base address from device tree Message-ID: <20171212072421.8867-1-wens@csie.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Now that the musb sunxi glue driver is completely device model / device tree driven, we should use the base address from the device tree, instead of hard-coding it in the source code. Fixes: 3a61b080acee ("musb: sunxi: switch to the device model") Signed-off-by: Chen-Yu Tsai --- drivers/usb/musb-new/sunxi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 7ee44ea91900..ae6a54118cd1 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -318,7 +318,7 @@ static int musb_usb_probe(struct udevice *dev) #ifdef CONFIG_USB_MUSB_HOST host->host = musb_init_controller(&musb_plat, NULL, - (void *)SUNXI_USB0_BASE); + dev_read_addr_ptr(dev)); if (!host->host) return -EIO; @@ -326,7 +326,7 @@ static int musb_usb_probe(struct udevice *dev) if (!ret) printf("Allwinner mUSB OTG (Host)\n"); #else - ret = musb_register(&musb_plat, NULL, (void *)SUNXI_USB0_BASE); + ret = musb_register(&musb_plat, NULL, dev_read_addr_ptr(dev)); if (!ret) printf("Allwinner mUSB OTG (Peripheral)\n"); #endif -- 2.15.0