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 BFD46C636CC for ; Thu, 16 Feb 2023 07:42:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A2AA585AEC; Thu, 16 Feb 2023 08:42:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.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 AD98385AFF; Thu, 16 Feb 2023 08:42:34 +0100 (CET) Received: from mail-m11874.qiye.163.com (mail-m11874.qiye.163.com [115.236.118.74]) (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 C8A2085AF2 for ; Thu, 16 Feb 2023 08:42:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [172.16.12.93] (unknown [58.22.7.114]) by mail-m11874.qiye.163.com (Hmail) with ESMTPA id 997183C021D; Thu, 16 Feb 2023 15:42:17 +0800 (CST) Message-ID: <84bbfbf6-276b-0feb-fa02-ec6baf082453@rock-chips.com> Date: Thu, 16 Feb 2023 15:42:16 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v2 05/10] rockchip: timer: dw-apb-timer: convert dev_read_addr output to phys_addr_t Content-Language: en-US To: Johan Jonker , dario.binacchi@amarulasolutions.com, michael@amarulasolutions.com, sjg@chromium.org Cc: philipp.tomsich@vrull.eu, u-boot@lists.denx.de, yifeng.zhao@rock-chips.com References: <241e9e7b-58d6-dfa5-fcb5-5660e6402021@gmail.com> <31504d5d-4884-e60c-85db-4ded476dd071@gmail.com> From: Kever Yang In-Reply-To: <31504d5d-4884-e60c-85db-4ded476dd071@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGU1DHlYdSEIeTE8aHRoeHk1VEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSkpLSEpMVUpLS1VLWQ Y+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PAw6Qxw5Sj0WNhEpMEwSEhwo DhxPCgpVSlVKTUxNTkhISEhDT09IVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlOQ1VJSVVMVUpKT1lXWQgBWUFJTEpINwY+ X-HM-Tid: 0a86592c8f622eb0kusn997183c021d 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.6 at phobos.denx.de X-Virus-Status: Clean On 2023/2/7 22:53, Johan Jonker wrote: > The fdt_addr_t and phys_addr_t size have been decoupled. > A 32bit CPU can expect 64-bit data from the device tree parser, > so convert dev_read_addr output to phys_addr_t in the > dw-apb-timer.c file. > > Signed-off-by: Johan Jonker Reviewed-by: Kever Yang Thanks, - Kever > --- > drivers/timer/dw-apb-timer.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c > index 10f0a9f6..f55a3c54 100644 > --- a/drivers/timer/dw-apb-timer.c > +++ b/drivers/timer/dw-apb-timer.c > @@ -23,7 +23,7 @@ > #define DW_APB_CTRL 0x8 > > struct dw_apb_timer_priv { > - fdt_addr_t regs; > + phys_addr_t regs; > struct reset_ctl_bulk resets; > }; > > @@ -92,7 +92,7 @@ static int dw_apb_timer_of_to_plat(struct udevice *dev) > if (CONFIG_IS_ENABLED(OF_REAL)) { > struct dw_apb_timer_priv *priv = dev_get_priv(dev); > > - priv->regs = dev_read_addr(dev); > + priv->regs = (phys_addr_t)dev_read_addr(dev); > } > > return 0; > -- > 2.20.1 >