From patchwork Tue Aug 4 05:14:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 247424 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp47629ilo; Mon, 3 Aug 2020 22:15:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkOBkQnKJN6j2Gn2zrUgVHYGcRhcNl9rCDLAZuiVHNoNbJ91z2GxUrG2XmA3A+ZYLPthHY X-Received: by 2002:a17:906:68da:: with SMTP id y26mr19320613ejr.250.1596518143032; Mon, 03 Aug 2020 22:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596518143; cv=none; d=google.com; s=arc-20160816; b=jT3Uku1pm7b8mCQ4yinjTOkDM5hyh+GibY56BRU5Wgb58sPFsPYCVa2H2rDBED3gOD YwZ8/Bl5sb8cprZgL8rZQvg2aITMeiuj1yuIqpMZftRUZsatrvegvkaRo1ORc4wN2ciB tv+P690j6daflcoWHWYGZrra/p1X+LzTy6iLdBH9D8bx8Xy9ElxMara6zrhMp4EnhY7m 0brR0esxQLMrSt8krQoQTDaSw6vDcHu/Kh6HKK2m+Hy5khkuXHbntW1Ywip2dbet6UFq z+DLFkUCi/1ZPMcPzF6UdAHOujqDkcewUfFGJ67lvQ/X9MlZXAJF4GC0tkhWX8NS25hZ 1Slg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter; bh=XKj3Z0oPtP0ozPsw/T5aQD+JQFSoBuxuSQrDV42dlOI=; b=klSuo3+g26TsVWh4NAf/NQvjo8BCO3omBLc1dAFAr9ja1H5P0MSK4c9nqxR7hUO2oy m3FVbBNX+asBltxHAllE05tbrtL0FmwP9R+Su0y05vyk29AvWZwqg1pwCa+RB4BE6Vzm CcDLx6ET9o037HOx+7/0JKTshSMjMesOAq23ypHim8xmGfljuVeQtF+DwC9jtI+8wGF6 TtNIXnZqqkViHdxQKk7WJG3NOvEaqynghUpioRyHsrHba8McvjFGFqz8xs0ef8m3Mkem CaLDABMOQwtJE47WZCrYt05mectAxOz8j7Y4YvNJtR9BSmdpuMh98289KKhL3AWGeNEY XXvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ER+LiwDj; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 15si11238465ejw.370.2020.08.03.22.15.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 22:15:43 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ER+LiwDj; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 023D481F2D; Tue, 4 Aug 2020 07:15:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="ER+LiwDj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3463E81F2D; Tue, 4 Aug 2020 07:15:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 462A681F2D for ; Tue, 4 Aug 2020 07:15:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=yamada.masahiro@socionext.com Received: from oscar.flets-west.jp (softbank126025067101.bbtec.net [126.25.67.101]) (authenticated) by conuserg-08.nifty.com with ESMTP id 0745EjuR000567; Tue, 4 Aug 2020 14:14:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com 0745EjuR000567 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1596518086; bh=XKj3Z0oPtP0ozPsw/T5aQD+JQFSoBuxuSQrDV42dlOI=; h=From:To:Cc:Subject:Date:From; b=ER+LiwDjlhAMJ0828wGSo8xbHlXesRqtmwwpgFvb2MH7R0aP/lIZDSLRyjNjwxzJy dM5PAVq3o6uZLFSz43jOgS4vjGXhBrHnoqs5d6/OB1rBjplIzB3YPC7k328ZcQ2ThF v8NPYGMsBAwTGE7oTOTsdkf8jfaIEx+PSh8jdJoqBkGpeECl0WfNw6/+WDw/0qQ6/P CgeAfZg5cLyXru95G6KElYiu9dbsv+L7u4pTvle+mSMlXaB90hHXkLPZwvJaXZWSc6 fGpK1w8fTQxD539d/IwG/16/7UIcCmU82/+bVGJ9/tnD5pDembKSX3bq4xTpNl1ppU p8hm8+O3geHlA== X-Nifty-SrcIP: [126.25.67.101] From: Masahiro Yamada To: u-boot@lists.denx.de Cc: Masahiro Yamada , =?utf-8?q?Andreas_Bie?= =?utf-8?b?w59tYW5u?= , Eugen Hristev , James Byrne , Simon Glass , Walter Lozano Subject: [PATCH 1/3] gpio: at91: use dev_read_addr() to get base address Date: Tue, 4 Aug 2020 14:14:41 +0900 Message-Id: <20200804051443.1074096-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean It is strange to use devfdt_get_addr_ptr(), then cast the pointer back to uint32 because you could use devfdt_get_addr() without casting. Convert it to dev_read_addr(), which is capable to CONFIG_OF_LIVE. Signed-off-by: Masahiro Yamada --- drivers/gpio/at91_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 Reviewed-by: Simon Glass diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 4a8b2e6ff6..ef7984374b 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -606,7 +606,7 @@ static int at91_gpio_probe(struct udevice *dev) clk_free(&clk); #if CONFIG_IS_ENABLED(OF_CONTROL) - plat->base_addr = (uint32_t)devfdt_get_addr_ptr(dev); + plat->base_addr = dev_read_addr(dev); #endif plat->bank_name = at91_get_bank_name(plat->base_addr); port->regs = (struct at91_port *)plat->base_addr;