Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 729DEC4707F for ; Thu, 27 May 2021 13:33:16 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 43D2061059 for ; Thu, 27 May 2021 13:33:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43D2061059 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DDCC582E3F; Thu, 27 May 2021 15:33:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 630DE82052; Thu, 27 May 2021 15:33:10 +0200 (CEST) Received: from lizzard.sbs.de (lizzard.sbs.de [194.138.37.39]) (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 BE0BB82052 for ; Thu, 27 May 2021 15:33:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 14RDX3EF028022 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 May 2021 15:33:03 +0200 Received: from [167.87.36.150] ([167.87.36.150]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 14RDTPsf010954; Thu, 27 May 2021 15:29:26 +0200 Subject: Re: [PATCH] pinctrl: single: Fix address size reading From: Jan Kiszka To: U-Boot Mailing List Cc: Lokesh Vutla , Dario Binacchi , Pratyush Yadav , Simon Glass References: <261c64bd-ffbf-8b63-a36f-7ae021ac7de3@siemens.com> Message-ID: <04d9566b-e9a4-31fa-1578-3898ef21e652@siemens.com> Date: Thu, 27 May 2021 15:29:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <261c64bd-ffbf-8b63-a36f-7ae021ac7de3@siemens.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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.4 at phobos.denx.de X-Virus-Status: Clean On 27.05.21 15:19, Jan Kiszka wrote: > From: Jan Kiszka > > dev_read_addr_size() is inconsistent in too many ways. In particular, > it does not retrieve the correct address/size cell number from the DT. > dev_read_addr_size_index() does the right thing, so use that for now. > > This fixes reading the address size e.g. on boards with the 64-bit > AM65x where some pinctrl nodes only use 32-bit addresses and sizes. > > Signed-off-by: Jan Kiszka > --- > drivers/pinctrl/pinctrl-single.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c > index ebb7602dde..2769b7a7fd 100644 > --- a/drivers/pinctrl/pinctrl-single.c > +++ b/drivers/pinctrl/pinctrl-single.c > @@ -509,7 +509,7 @@ static int single_of_to_plat(struct udevice *dev) > return -EINVAL; > } > > - addr = dev_read_addr_size(dev, "reg", &size); > + addr = dev_read_addr_size_index(dev, 0, &size); > if (addr == FDT_ADDR_T_NONE) { > dev_err(dev, "failed to get base register size\n"); > return -EINVAL; > Oops, obsolete, 1e7879045f is doing that already. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux