aboutsummaryrefslogtreecommitdiff
path: root/arch/microblaze
diff options
context:
space:
mode:
authorOvidiu Panait <ovpanait@gmail.com>2022-08-29 20:02:05 +0300
committerMichal Simek <michal.simek@amd.com>2022-09-13 11:32:48 +0200
commitf459986e86458a9980a3d0f4de1d4a44a549c00c (patch)
treefb20e65377a5c9a0d681c493675425c0b3ee12aa /arch/microblaze
parentae90d16ac78a2d7bd0327f71c26b46b5182315d3 (diff)
downloadu-boot-f459986e86458a9980a3d0f4de1d4a44a549c00c.zip
u-boot-f459986e86458a9980a3d0f4de1d4a44a549c00c.tar.gz
u-boot-f459986e86458a9980a3d0f4de1d4a44a549c00c.tar.bz2
microblaze: add arch_print_bdinfo() implementation
Allow bdinfo command to print icache/dcache information: U-Boot-mONStR> bdinfo boot_params = 0x00000000 DRAM bank = 0x00000000 -> start = 0x04000000 -> size = 0x04000000 flashstart = 0x00000000 flashsize = 0x00000000 flashoffset = 0x00000000 baudrate = 9600 bps relocaddr = 0x07f76000 reloc off = 0x02f76000 Build = 32-bit current eth = unknown ethaddr = (not set) IP addr = <NULL> fdt_blob = 0x07fec7e0 new_fdt = 0x00000000 fdt_size = 0x00000000 lmb_dump_all: memory.cnt = 0x1 memory[0] [0x4000000-0x7ffffff], 0x04000000 bytes flags: 0 reserved.cnt = 0x1 reserved[0] [0x7e94b8c-0x7ffffff], 0x0016b474 bytes flags: 0 devicetree = embed icache = 32 KiB icache line = 4 Bytes dcache = 32 KiB dcache line = 4 Bytes Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Link: https://lore.kernel.org/r/20220829170205.1274484-4-ovpanait@gmail.com Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/lib/Makefile1
-rw-r--r--arch/microblaze/lib/bdinfo.c24
2 files changed, 25 insertions, 0 deletions
diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile
index 05f447a..dfd8135 100644
--- a/arch/microblaze/lib/Makefile
+++ b/arch/microblaze/lib/Makefile
@@ -4,4 +4,5 @@
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
obj-$(CONFIG_CMD_BOOTM) += bootm.o
+obj-$(CONFIG_CMD_BDI) += bdinfo.o
obj-y += muldi3.o
diff --git a/arch/microblaze/lib/bdinfo.c b/arch/microblaze/lib/bdinfo.c
new file mode 100644
index 0000000..41b7a21
--- /dev/null
+++ b/arch/microblaze/lib/bdinfo.c
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2022, Ovidiu Panait <ovpanait@gmail.com>
+ */
+#include <init.h>
+#include <asm/cpuinfo.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void arch_print_bdinfo(void)
+{
+ struct microblaze_cpuinfo *ci = gd_cpuinfo();
+
+ if (ci->icache_size) {
+ bdinfo_print_size("icache", ci->icache_size);
+ bdinfo_print_size("icache line", ci->icache_line_length);
+ }
+
+ if (ci->dcache_size) {
+ bdinfo_print_size("dcache", ci->dcache_size);
+ bdinfo_print_size("dcache line", ci->dcache_line_length);
+ }
+}