]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
increase baudrate to max, don't use embedded DT
authorDuje Mihanović <duje.mihanovic@skole.hr>
Tue, 24 Dec 2024 19:01:25 +0000 (20:01 +0100)
committerDuje Mihanović <duje.mihanovic@skole.hr>
Tue, 24 Dec 2024 19:01:25 +0000 (20:01 +0100)
arch/arm/mach-mmp/Makefile
arch/arm/mach-mmp/board.c [new file with mode: 0644]
configs/coreprimevelte_defconfig

index 294e6c518f4dd4dcbadd731fe54dcc37decaabbd..99beaed05c2493b55610f1012383755015c62958 100644 (file)
@@ -1 +1 @@
-obj-y += mmu.o
+obj-y += board.o mmu.o
diff --git a/arch/arm/mach-mmp/board.c b/arch/arm/mach-mmp/board.c
new file mode 100644 (file)
index 0000000..2105944
--- /dev/null
@@ -0,0 +1,34 @@
+#include <init.h>
+#include <fdt_support.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* Stolen from arch/arm/mach-snapdragon/board.c */
+void *board_fdt_blob_setup(int *err)
+{
+       struct fdt_header *fdt;
+       bool internal_valid, external_valid;
+
+       *err = 0;
+       fdt = (struct fdt_header *)get_prev_bl_fdt_addr();
+       external_valid = fdt && !fdt_check_header(fdt);
+       internal_valid = !fdt_check_header(gd->fdt_blob);
+
+       /*
+        * There is no point returning an error here, U-Boot can't do anything useful in this situation.
+        * Bail out while we can still print a useful error message.
+        */
+       if (!internal_valid && !external_valid)
+               panic("Internal FDT is invalid and no external FDT was provided! (fdt=%#llx)\n",
+                     (phys_addr_t)fdt);
+
+       if (internal_valid) {
+               debug("Using built in FDT\n");
+       } else {
+               debug("Using external FDT\n");
+               /* So we can use it before returning */
+               gd->fdt_blob = fdt;
+       }
+
+       return (void *)gd->fdt_blob;
+}
index 8ca5e2b1cd9ce512fd5b5bda494615b53ee77d2b..7c2bdd9a5701ef871ff434675a6851fc4a0c773e 100644 (file)
@@ -20,11 +20,12 @@ CONFIG_LOGF_LINE=y
 CONFIG_LOGF_FUNC=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_OF_CONTROL=y
-CONFIG_OF_EMBED=y
+CONFIG_OF_BOARD=y
 CONFIG_NO_NET=y
 CONFIG_CLK=y
 CONFIG_CPU=y
 CONFIG_CPU_ARMV8=y
+CONFIG_BAUDRATE=921600
 CONFIG_SYS_NS16550=y
 CONFIG_SYS_NS16550_MEM32=y
 CONFIG_MBEDTLS_LIB=y