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 85B78C64EC4 for ; Tue, 28 Feb 2023 21:18:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7AA3085C2D; Tue, 28 Feb 2023 22:18:20 +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="JAdhShtR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4E0A785BF3; Tue, 28 Feb 2023 22:18:17 +0100 (CET) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 02C4885C2F for ; Tue, 28 Feb 2023 22:18:06 +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-x52f.google.com with SMTP id ec43so45670924edb.8 for ; Tue, 28 Feb 2023 13:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677619084; 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=je2XLdGSVHF77e+XxaahJdU5PEwZYYwpNeuQDjboRB8=; b=JAdhShtRdJeE7A5Yv9bBeJ+RMxJIXkCz2xeC8MxGXVxJ6L/5+bY9m2RCIu2i0GhP/K TaWwRUwLYeOnrw6Jz0FeN3+kC6l5pfQLjfoKONX5YOGR5bdtb2OIiVRmUEJmElEege97 4+c3o5fAwQqZJ/yO8LUBKEI5qIlpLnsQhBM0XFpNibio+ajyhxRiKH93AvZQJX5OXDBo SNlO27awtgO4viTkQqhDzq14FM4bboADdg3dGlvHVKdRH9qRBfeyGoa0AIMw7w8iwj3x fZnerbTivEPcArCSSgzuC6FLADp7WFKJgNMf0KfwaHqVO796Qcbq5Em6794RDgIXQfII wFxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677619084; 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=je2XLdGSVHF77e+XxaahJdU5PEwZYYwpNeuQDjboRB8=; b=FUwMHx99SrfxL0lItYOVfRg5VbgHF/OTDpetDnPAMDh01/p+gX5Z/xSoDwlVYUIbhR 5lO6vlxxZFo5VQBD0JZewOZnqsAUhS5O/fkbtbqQXNefcpRo8f12F/N6RMWLP4GlhzTc IMGeE15pbPadan4pHpAefvQ+Frb/UkCks5IFWfNdV4POJLjz0ShfsX1K/pCMtEFKeDFu yX0JDi3KAmYcSqepsXhATcrWzwXGJCbHAGcur7cVG01SFzEL4U8Pr3mDTO7XpzgX82St xXLxd1gwalghzwrV925xsqxgjfofErufkCTjdPIRD5aduSWTuqVvMfVlpin4Vu1vh/52 7mfA== X-Gm-Message-State: AO0yUKXsoE8cYWx1q1AqikcNmtuOu/KOuyhsuxsyx+d8yxi/7WcIACI2 o87h17ILdkwe594TMuEfgb0= X-Google-Smtp-Source: AK7set+rPAd3soygECKizcya2qBarQGF4Jm+/WsGuKNezs36q2XOYo8g7scL2ot4yrcnEyVn258b3w== X-Received: by 2002:a17:907:2043:b0:8af:4120:63a8 with SMTP id pg3-20020a170907204300b008af412063a8mr4563911ejb.68.1677619084506; Tue, 28 Feb 2023 13:18:04 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id qx11-20020a170906fccb00b008e9c79ff14csm4974751ejb.96.2023.02.28.13.18.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Feb 2023 13:18:04 -0800 (PST) Message-ID: <374fceb5-a0bc-2751-70d1-b66965a58c4f@gmail.com> Date: Tue, 28 Feb 2023 22:18:03 +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 v5 08/21] rockchip: timer: dw-apb-timer: convert dev_read_addr output to phys_addr_t 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.6 at phobos.denx.de X-Virus-Status: Clean 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 --- 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