hc
2023-11-06 9df731a176aab8e03b984b681b1bea01ccff6644
u-boot/cmd/memtester/ddr_tester_common.c
similarity index 92%rename from u-boot/cmd/memtester/ddr_tester_common.crename to u-boot/cmd/ddr_tool/ddr_tool_common.c
....@@ -5,7 +5,7 @@
55
66 #include <common.h>
77 #include <power/regulator.h>
8
-#include "ddr_tester_common.h"
8
+#include "ddr_tool_common.h"
99
1010 DECLARE_GLOBAL_DATA_PTR;
1111
....@@ -84,6 +84,13 @@
8484 for (i = 0; i < max_bank; i++) {
8585 start_adr[i] = gd->bd->bi_dram[i].start;
8686 length[i] = gd->bd->bi_dram[i].size;
87
+#if defined(CONFIG_ROCKCHIP_RV1126)
88
+ /* On RV1126, writing data to 0x00600000 will cause a crash. */
89
+ if (start_adr[i] == 0 && length[i] > 0x00700000) {
90
+ start_adr[i] = 0x00700000;
91
+ length[i] -= 0x00700000;
92
+ }
93
+#endif
8794 }
8895
8996 length[max_bank - 1] = (gd->start_addr_sp - RESERVED_SP_SIZE -