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 C3C2FC64EC7 for ; Tue, 28 Feb 2023 21:22:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7C23285C51; Tue, 28 Feb 2023 22:22: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=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="nvF7Lrhp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 36EC985C52; Tue, 28 Feb 2023 22:22:25 +0100 (CET) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 E626E85C3A for ; Tue, 28 Feb 2023 22:22:22 +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-x52d.google.com with SMTP id o12so45687953edb.9 for ; Tue, 28 Feb 2023 13:22:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677619342; 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=Ryv/1/oIj8QPxESj/LgC4u7GgNUDRFT1rxPAORm0jhc=; b=nvF7Lrhp9U2y1gSBxOBBe0p+ZtdsvdY2EyoqeWLewQ5GI0VGAteXgBDhXZWKtgu97X dlo5FbTFbVV4ar3Vtrr+pzZZ4x+D88tbHm5u48c9+hCKgcJ3TL5lvBnBKeKg6Zf8eUfj 7hPytFRoEFbekImGmc7kqbr765pSHOfmfUMeRSHKNdJZBCtAlfDzRupKbIJ5QZpEiJ9I hzEDspQTuKp3foC3iFbhzkPAy+d1TSPgRkjQdXK4J3qoCh8CrJJ2QEtlI7qzZa0bJbQW 2t2Lq96xCABP/6jSGn3uvazMPXa5qui0bjW+NKOEm1vHyus65A96Sa9GpgHhZVLpWZuF ZD+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677619342; 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=Ryv/1/oIj8QPxESj/LgC4u7GgNUDRFT1rxPAORm0jhc=; b=kP8CLCOE1JV5WMvqVT21ZNXQIW1cT2UHqSww9BeWGzu41pQZ0vS10UHvE6Fa1s34/G tJ9jxqMRviL/c+PP19RS1pZdddR/sRwfIuph2xlhKKIU2NhgbphGycK/5MPlbldMuMHD 8r6TIt7PJPMMR0rcawoMJkM6EHkIlhTRWo5QKLfH6iO09AscqjPH5vess18mBHAycLNg 7qrdtypvQelUPkkOWKuJQFsacehLN5+DwPKr1iDzc1BY//2jARuZj7g7f2Gnm3O/uHNW MSlOOo4tAITTGw3jjvjm5Nm0QNXSp8hg8gJffTUNcK89nJBFKFhE4XEpd/qeFvKtgXxw 7y2Q== X-Gm-Message-State: AO0yUKUprnlG9ZcDDD6YFXXi1G9YKwbQLQtaym82obPmBKEqARrZoJGj u0xsBr5RcXMFGMR6pjoW4AajpOhDMN0= X-Google-Smtp-Source: AK7set9uYT0uUSin3b9aWbzy22k4uq0LDBPQcbGg/HF/zzvp394Cg3gokhNLABGZNX6bnxwplsfE2A== X-Received: by 2002:a17:907:2ce2:b0:874:e17e:2526 with SMTP id hz2-20020a1709072ce200b00874e17e2526mr5360324ejc.72.1677619342527; Tue, 28 Feb 2023 13:22:22 -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 lt20-20020a170906fa9400b008e97fdd6c7csm4895469ejb.129.2023.02.28.13.22.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Feb 2023 13:22:22 -0800 (PST) Message-ID: <0d1d56bc-d069-cbba-be43-5422e04ee5d5@gmail.com> Date: Tue, 28 Feb 2023 22:22:21 +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 20/21] arm: stm32mp: spl: fix function with fdt_addr_t input 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 fix ofnode_get_addr_size function with fdt_addr_t input to be able to handle both sizes for stm32mp SoC in spl.c file. Signed-off-by: Johan Jonker --- arch/arm/mach-stm32mp/spl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c index 19d9fe04..6b26641b 100644 --- a/arch/arm/mach-stm32mp/spl.c +++ b/arch/arm/mach-stm32mp/spl.c @@ -112,7 +112,7 @@ uint32_t stm32mp_get_dram_size(void) static int optee_get_reserved_memory(uint32_t *start, uint32_t *size) { - phys_size_t fdt_mem_size; + fdt_addr_t fdt_mem_size; fdt_addr_t fdt_start; ofnode node; @@ -121,8 +121,8 @@ static int optee_get_reserved_memory(uint32_t *start, uint32_t *size) return 0; fdt_start = ofnode_get_addr_size(node, "reg", &fdt_mem_size); - *start = fdt_start; - *size = fdt_mem_size; + *start = (uint32_t)fdt_start; + *size = (uint32_t)fdt_mem_size; return (fdt_start < 0) ? fdt_start : 0; } -- 2.20.1