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 23181C6FD1F for ; Mon, 13 Mar 2023 00:28:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8BE2D86062; Mon, 13 Mar 2023 01:28:13 +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="nGVm/eyF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8765F860F3; Mon, 13 Mar 2023 01:28:11 +0100 (CET) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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 BDF6885BA5 for ; Mon, 13 Mar 2023 01:28:08 +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-x533.google.com with SMTP id r15so15053254edq.11 for ; Sun, 12 Mar 2023 17:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678667288; 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=nGVm/eyFtGiWWMl5R3CwraBTYpYFcyINaQhvPDOwujIwW++foTXunIehKvv9Kl+UyF /4BBsWNC5sWScb7t2WcazPuMVZib0e0FugGvrUgSlqeYoMOgXfVIweNtXXvKsACHamGi kxrzR0wQGghkkBnH36o634l1V1nD7SJdjQvSLPrQMvqg0qwhq8mTNGYwtFVacAJ8y+At QBiIdLxI773BK2H+OPOWeMff+ZXFN5ZpbTF5o6j1A3a8EBdr/YgiGxWIHTlX97d8jCRb sInBrJy6Dn7rRSfoIg+0HqR0rh7aTZpG3n/DvdxGxIUUkjOVWTylsA1KL4M33cW+cw0k Qzig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678667288; 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=o8SbDKyiGbWl2mCbgo7spIIIYlZDfobXtmKoy2g/Z/2tDnPmGK5RJ7GD9AV8GJQo+s pE40p9NClc0oNGKkeq5V6Op23ogLoh1quYpJTKjopuBkpHg9u68o+i+9MnrdT2LAsu1p p1OGi09P6fYzFqGBVyCkDEfem0MdAzc8urXy6GuH5PJXfRhRbfG5ZZC6HpQkjcUWvdQT uHyBRZ7u0KWjZKZOGY3Q6rgcEeWkw8GiDwkc9z8lYPg+ogjt8nYgEc+IlG9RlW9TqQmE 96+AaghWe4xV9zjJmI2ioCSNJk64LtTfy4K9Qd8c8oSsLqUYyhefNqkw72SpQGzX7CgM KSqQ== X-Gm-Message-State: AO0yUKUotIwrFvOeLiT3UsIQL17UBvFvAWgY0PtYVuqe8aPSxXP0glSz et5W6Mm56VFLyC+Ha5Fsohc= X-Google-Smtp-Source: AK7set96cyvPOn2XhKRpSHxNKGOYsjhpOGqmfwwvP2tL1Bz++KFXbCOrB5Wd2yMdX6D2eWqv3cSK7A== X-Received: by 2002:a17:907:cb83:b0:8af:3382:e578 with SMTP id un3-20020a170907cb8300b008af3382e578mr8482687ejc.4.1678667288147; Sun, 12 Mar 2023 17:28:08 -0700 (PDT) Received: from [192.168.2.2] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id xb9-20020a170907070900b0092b5384d6desm84531ejb.153.2023.03.12.17.28.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Mar 2023 17:28:07 -0700 (PDT) Message-ID: <4245b177-ba2d-3905-2c6c-edaba78dcd08@gmail.com> Date: Mon, 13 Mar 2023 01:28:06 +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 v8 01/24] 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: Content-Language: en-US In-Reply-To: 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