From 655f17ff7d8631ca9344a4bff5918243e5bfed37 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 14:16:55 -0600 Subject: bdinfo: Export some basic printing functions At present the functions to print a number and a frequency are static. We want to move some of the code in here to an arch-specific file. For consistency that code should use these same functions. So export them with an appropriate name. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- include/init.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/init.h') diff --git a/include/init.h b/include/init.h index b5a167b6edb..af4deed566d 100644 --- a/include/init.h +++ b/include/init.h @@ -261,6 +261,12 @@ void relocate_code(ulong start_addr_sp, struct global_data *new_gd, __attribute__ ((noreturn)); #endif +/* Print a numeric value (for use in arch_print_bdinfo()) */ +void bdinfo_print_num(const char *name, ulong value); + +/* Print a clock speed in MHz */ +void bdinfo_print_mhz(const char *name, unsigned long hz); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ -- cgit v1.2.3 From 59b0d7d839f135bc44d3459784337a657149f8b3 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 14:16:56 -0600 Subject: bdinfo: arm: Move ARM-specific info into its own file We don't really want to have ARM-specific code in a generic file. Create a new arch-specific function to hold it, and move it into that. Make the function weak so that any arch can implement it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- include/init.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/init.h') diff --git a/include/init.h b/include/init.h index af4deed566d..e727031514c 100644 --- a/include/init.h +++ b/include/init.h @@ -267,6 +267,9 @@ void bdinfo_print_num(const char *name, ulong value); /* Print a clock speed in MHz */ void bdinfo_print_mhz(const char *name, unsigned long hz); +/* Show arch-specific information for the 'bd' command */ +void arch_print_bdinfo(void); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ -- cgit v1.2.3