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: 1340660 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=ER+LiwDj; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BLNJ95pZGz9sR4 for ; Tue, 4 Aug 2020 15:15:53 +1000 (AEST) 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?q?=C3=9Fmann?= , 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 Reviewed-by: Simon Glass --- drivers/gpio/at91_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;