From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6CDA7C6FD1F for ; Fri, 10 Mar 2023 16:40:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6EE1F85D93; Fri, 10 Mar 2023 17:40:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="dUa6vCzm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4C4D885F18; Fri, 10 Mar 2023 17:40:31 +0100 (CET) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B8BD783CB4 for ; Fri, 10 Mar 2023 17:40:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jbx6244@gmail.com Received: by mail-ed1-x52b.google.com with SMTP id u9so22918721edd.2 for ; Fri, 10 Mar 2023 08:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678466428; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=NsfiwpItmyzHeJY5/4An5YgJffCfoeBIuz/5xv5XigM=; b=dUa6vCzmNl5/DWhqmLlAAB671bAXvmzG0QCft1VbWfp+qSsg6/dXiS7W4+x5SbvQPu 2Nd0N4Z3al6fzlG99IMhVhDbf2SpIdIJ4vEtFB35QYRfeA8qxlAaFsPWq4d7ou2ctDTj OcsOr7rZGYEW+cmhZ8VKzJcePwC6X/nr5dqU5Lsr4tggX+CShwdQeArz0nYserFG6qIJ CzD2DDOuV9PLFVGTSc9REGZ+d/SkXS0/QSCiES149Kq1abRegZSHHOt/L5t+aM5Ruf5B Z7QAwjFAiAhoOkyZ9+vSli82n/fEBN0fJf3VktihdUPkdzP/al1bjtw6g0WczSzMxqVO Ha+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678466428; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NsfiwpItmyzHeJY5/4An5YgJffCfoeBIuz/5xv5XigM=; b=3tSi0CETSHrS6oV5kE0QUZfix928GXOelTpe7evGyHTLyk5Axz/Gp3lkwyBgMpRn7P 7FCFb1zG7Q0DNkP4Llv8ch7+c4pJjfbyhv0vnAW0aGofhHMTJqbtHEDW8Ob57aZDZzkY Zu5oj8rFUd30+lmcuA1hxmRBU4CtwQWkftgvMh0pTtFGz3F0A8dsEYigfKvXtVZD1JLV LrD6yvB+NE+WWyEsTOX+3KaYd1OgkFTT/OQ+Xi4AIPB/U+OKEyA/StISBNmqZSvxPrW6 bBgM2dIMF8+dp2JgGmy3RWCb0j+bvLE27L0GyV+o8NHurFWSmz7t/5CZG7MDqmhSP/EH 7vng== X-Gm-Message-State: AO0yUKWTxPMrHpovUaQlia9pYNJ3gtL9Aq3CM236JSKfQAtRebYxnxB1 42zFzoexvtrtr+jdSStZsxFQJorJ0Qw= X-Google-Smtp-Source: AK7set+LXgZcrqwe+qN0qLjiqeiwZwQAEoNb5XOaXo3J2rgd2XjyZkFbzKfi2lyuWRbkQX2+chPCeA== X-Received: by 2002:a50:ec8a:0:b0:4ae:eab6:a07b with SMTP id e10-20020a50ec8a000000b004aeeab6a07bmr3137480edr.16.1678466428327; Fri, 10 Mar 2023 08:40:28 -0800 (PST) Received: from [192.168.2.2] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id b33-20020a509f24000000b004bc607d433bsm213686edf.62.2023.03.10.08.40.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Mar 2023 08:40:27 -0800 (PST) Message-ID: <85aefa75-693d-4968-1f39-5a04db60f27d@gmail.com> Date: Fri, 10 Mar 2023 17:40:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 From: Johan Jonker Subject: [PATCH v7 01/23] mtd: nand: raw: rockchip_nfc: use dev_read_addr_ptr To: dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com Cc: u-boot@lists.denx.de, yifeng.zhao@rock-chips.com References: <4caa17bc-6d32-5b07-68f3-f5ced40bfcbb@gmail.com> Content-Language: en-US In-Reply-To: <4caa17bc-6d32-5b07-68f3-f5ced40bfcbb@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean The fdt_addr_t and phys_addr_t size have been decoupled. A 32bit CPU can expext 64-bit data from the device tree parser, so use dev_read_addr_ptr in the rockchip_nfc.c file. Signed-off-by: Johan Jonker Reviewed-by: Michael Trimarchi --- Changed V6: use -EINVAL on return --- drivers/mtd/nand/raw/rockchip_nfc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/raw/rockchip_nfc.c b/drivers/mtd/nand/raw/rockchip_nfc.c index d016d255..9f424a25 100644 --- a/drivers/mtd/nand/raw/rockchip_nfc.c +++ b/drivers/mtd/nand/raw/rockchip_nfc.c @@ -1180,9 +1180,9 @@ static int rk_nfc_probe(struct udevice *dev) nfc->cfg = (void *)dev_get_driver_data(dev); nfc->dev = dev; - nfc->regs = (void *)dev_read_addr(dev); - if (IS_ERR(nfc->regs)) { - ret = PTR_ERR(nfc->regs); + nfc->regs = dev_read_addr_ptr(dev); + if (!nfc->regs) { + ret = -EINVAL; goto release_nfc; } -- 2.20.1