mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
x86: cpu: Use default print_cpuinfo() for all
Most of the copies of the print_cpuinfo() call the default method. Remove all of those in order to have only the default one when no `cpu` command is compiled. This also helps avoiding compiler warning, e.g.: arch/x86/cpu/tangier/tangier.c:23:5: warning: no previous prototype for ‘print_cpuinfo’ [-Wmissing-prototypes] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Simon Glass
parent
abb7780381
commit
c222dda2da
@@ -88,18 +88,6 @@ int checkcpu(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
char processor_name[CPU_MAX_NAME_LEN];
|
||||
const char *name;
|
||||
|
||||
/* Print processor name */
|
||||
name = cpu_get_name(processor_name);
|
||||
printf("CPU: %s\n", name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void board_debug_uart_init(void)
|
||||
{
|
||||
/* com1 / com2 decode range */
|
||||
|
||||
@@ -38,11 +38,6 @@ int arch_cpu_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int checkcpu(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void board_final_init(void)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -163,10 +163,11 @@ char *cpu_get_name(char *name)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
int print_cpuinfo(void) __attribute__((weak, alias("default_print_cpuinfo")));
|
||||
|
||||
int default_print_cpuinfo(void)
|
||||
#if !CONFIG_IS_ENABLED(CPU)
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
post_code(POST_CPU_INFO);
|
||||
|
||||
printf("CPU: %s, vendor %s, device %xh\n",
|
||||
cpu_has_64bit() ? "x86_64" : "x86",
|
||||
cpu_vendor_name(gd->arch.x86_vendor), gd->arch.x86_device);
|
||||
@@ -178,6 +179,7 @@ int default_print_cpuinfo(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_IS_ENABLED(SHOW_BOOT_PROGRESS)
|
||||
void show_boot_progress(int val)
|
||||
|
||||
@@ -182,20 +182,6 @@ int checkcpu(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
char processor_name[CPU_MAX_NAME_LEN];
|
||||
const char *name;
|
||||
|
||||
/* Print processor name */
|
||||
name = cpu_get_name(processor_name);
|
||||
printf("CPU: %s\n", name);
|
||||
|
||||
post_code(POST_CPU_INFO);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void board_debug_uart_init(void)
|
||||
{
|
||||
/* This enables the debug UART */
|
||||
|
||||
@@ -109,12 +109,6 @@ int checkcpu(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
post_code(POST_CPU_INFO);
|
||||
return default_print_cpuinfo();
|
||||
}
|
||||
#endif
|
||||
|
||||
int arch_early_init_r(void)
|
||||
|
||||
@@ -266,12 +266,6 @@ int checkcpu(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
post_code(POST_CPU_INFO);
|
||||
return default_print_cpuinfo();
|
||||
}
|
||||
|
||||
static void quark_pcie_init(void)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
@@ -32,9 +32,4 @@ int checkcpu(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -95,7 +95,6 @@ void x86_enable_caches(void);
|
||||
void x86_disable_caches(void);
|
||||
int x86_init_cache(void);
|
||||
phys_addr_t board_get_usable_ram_top(phys_size_t total_size);
|
||||
int default_print_cpuinfo(void);
|
||||
|
||||
/* Set up a UART which can be used with printch(), printhex8(), etc. */
|
||||
int setup_internal_uart(int enable);
|
||||
|
||||
@@ -26,12 +26,6 @@ int checkcpu(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
post_code(POST_CPU_INFO);
|
||||
return default_print_cpuinfo();
|
||||
}
|
||||
|
||||
int fsp_init_phase_pci(void)
|
||||
{
|
||||
u32 status;
|
||||
|
||||
Reference in New Issue
Block a user