Files
u-boot/arch/microblaze/lib/bdinfo.c
Simon Glass 0f640f96c8 Make the bdinfo printing-functions more generic
The bdinfo command makes use of quite a few functions which show a label
followed by a value, on a single line.

This sort of thing is generally useful outside of bdinfo, so move it to
a generic place. Use 'l' (for label) as the prefix.

The margin is still hard-coded to 12, which seems a reasonable limit for
a label.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-09 23:26:02 +02:00

27 lines
559 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2022, Ovidiu Panait <ovpanait@gmail.com>
*/
#include <display_options.h>
#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) {
lprint_size("icache", ci->icache_size);
lprint_size("icache line", ci->icache_line_length);
}
if (ci->dcache_size) {
lprint_size("dcache", ci->dcache_size);
lprint_size("dcache line", ci->dcache_line_length);
}
}