Skip to contentSkip to conversation

riscv: binman: fix the load field format

PATCH Superseded Randolph 2 participants 2 messages Nov 16, 2023 RISC-V

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Randolph

author
#0 lore raw

PATCH v2 1/1 riscv: binman: fix the load field format

Using /bits/64 prefix for 64bits address

---
 arch/riscv/dts/binman.dtsi | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
arch/riscv/dts/binman.dtsi +4 -10
index 6b4eb8dc7b..777b1309d0 100644
@@ -5,9 +5,6 @@
 
 #include <config.h>
 
-#define U64_TO_U32_H(addr)		(((addr) >> 32) & 0xffffffff)
-#define U64_TO_U32_L(addr)		((addr) & 0xffffffff)
-
 / {
 	binman: binman {
 		multiple-images;
@@ -36,8 +33,7 @@
 					os = "U-Boot";
 					arch = "riscv";
 					compression = "none";
-					load = <U64_TO_U32_H(CONFIG_TEXT_BASE)
-						U64_TO_U32_L(CONFIG_TEXT_BASE)>;
+					load = /bits/64 <CONFIG_TEXT_BASE>;
 
 					uboot_blob: blob-ext {
 						filename = "u-boot-nodtb.bin";
@@ -50,7 +46,7 @@
 					os = "Linux";
 					arch = "riscv";
 					compression = "none";
-					load = <CONFIG_TEXT_BASE>;
+					load = /bits/64 <CONFIG_TEXT_BASE>;
 
 					linux_blob: blob-ext {
 						filename = "Image";
@@ -64,10 +60,8 @@
 					os = "opensbi";
 					arch = "riscv";
 					compression = "none";
-					load = <U64_TO_U32_H(CONFIG_SPL_OPENSBI_LOAD_ADDR)
-						U64_TO_U32_L(CONFIG_SPL_OPENSBI_LOAD_ADDR)>;
-					entry = <U64_TO_U32_H(CONFIG_SPL_OPENSBI_LOAD_ADDR)
-						U64_TO_U32_L(CONFIG_SPL_OPENSBI_LOAD_ADDR)>;
+					load = /bits/64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
+					entry = /bits/64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
 
 					opensbi_blob: opensbi {
 						filename = "fw_dynamic.bin";
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Randolph

Using /bits/64 prefix for 64bits address

---
 arch/riscv/dts/binman.dtsi | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

It is normally written '/bits/ 64' i.e. with a space.

Quoted 49 lines
arch/riscv/dts/binman.dtsi +4 -11
index 6b4eb8dc7b..777b1309d0 100644
@@ -5,9 +5,6 @@
 
 #include <config.h>
 
-#define U64_TO_U32_H(addr)             (((addr) >> 32) & 0xffffffff)
-#define U64_TO_U32_L(addr)             ((addr) & 0xffffffff)
-
 / {
        binman: binman {
                multiple-images;
@@ -36,8 +33,7 @@
                                        os = "U-Boot";
                                        arch = "riscv";
                                        compression = "none";
-                                       load = <U64_TO_U32_H(CONFIG_TEXT_BASE)
-                                               U64_TO_U32_L(CONFIG_TEXT_BASE)>;
+                                       load = /bits/64 <CONFIG_TEXT_BASE>;
 
                                        uboot_blob: blob-ext {
                                                filename = "u-boot-nodtb.bin";
@@ -50,7 +46,7 @@
                                        os = "Linux";
                                        arch = "riscv";
                                        compression = "none";
-                                       load = <CONFIG_TEXT_BASE>;
+                                       load = /bits/64 <CONFIG_TEXT_BASE>;
 
                                        linux_blob: blob-ext {
                                                filename = "Image";
@@ -64,10 +60,8 @@
                                        os = "opensbi";
                                        arch = "riscv";
                                        compression = "none";
-                                       load = <U64_TO_U32_H(CONFIG_SPL_OPENSBI_LOAD_ADDR)
-                                               U64_TO_U32_L(CONFIG_SPL_OPENSBI_LOAD_ADDR)>;
-                                       entry = <U64_TO_U32_H(CONFIG_SPL_OPENSBI_LOAD_ADDR)
-                                               U64_TO_U32_L(CONFIG_SPL_OPENSBI_LOAD_ADDR)>;
+                                       load = /bits/64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
+                                       entry = /bits/64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>;
 
                                        opensbi_blob: opensbi {
                                                filename = "fw_dynamic.bin";
--

2.34.1