From patchwork Tue Dec 12 07:24:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 847392 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3ywrth1hH1z9s81 for ; Tue, 12 Dec 2017 18:24:44 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id DA245C21C4C; Tue, 12 Dec 2017 07:24:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E8603C21C4C; Tue, 12 Dec 2017 07:24:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D6022C21C71; Tue, 12 Dec 2017 07:24:31 +0000 (UTC) Received: from wens.csie.org (mirror2.csie.ntu.edu.tw [140.112.30.76]) by lists.denx.de (Postfix) with ESMTPS id BCDF6C21C4C for ; Tue, 12 Dec 2017 07:24:30 +0000 (UTC) Received: by wens.csie.org (Postfix, from userid 1000) id 3978060119; Tue, 12 Dec 2017 15:24:25 +0800 (CST) From: Chen-Yu Tsai To: u-boot@lists.denx.de Date: Tue, 12 Dec 2017 15:24:21 +0800 Message-Id: <20171212072421.8867-1-wens@csie.org> X-Mailer: git-send-email 2.15.0 Cc: Marek Vasut , Maxime Ripard Subject: [U-Boot] [PATCH] musb: sunxi: Use base address from device tree X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Acked-by: Maxime Ripard Reviewed-by: Simon Glass --- 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