mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-21 22:21:36 +00:00
x86: cpu: Remove unnecessary #ifdefs
Drop some #ifdefs that are not needed or can be converted to compile-time checks. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
20b049e885
commit
8bccbc5ac0
2 changed files with 26 additions and 29 deletions
|
@ -67,10 +67,8 @@ static const char *const x86_vendor_name[] = {
|
||||||
|
|
||||||
int __weak x86_cleanup_before_linux(void)
|
int __weak x86_cleanup_before_linux(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_BOOTSTAGE_STASH
|
|
||||||
bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH_ADDR,
|
bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH_ADDR,
|
||||||
CONFIG_BOOTSTAGE_STASH_SIZE);
|
CONFIG_BOOTSTAGE_STASH_SIZE);
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -201,18 +199,19 @@ int last_stage_init(void)
|
||||||
|
|
||||||
write_tables();
|
write_tables();
|
||||||
|
|
||||||
#ifdef CONFIG_GENERATE_ACPI_TABLE
|
if (IS_ENABLED(CONFIG_GENERATE_ACPI_TABLE)) {
|
||||||
fadt = acpi_find_fadt();
|
fadt = acpi_find_fadt();
|
||||||
|
|
||||||
/* Don't touch ACPI hardware on HW reduced platforms */
|
/* Don't touch ACPI hardware on HW reduced platforms */
|
||||||
if (fadt && !(fadt->flags & ACPI_FADT_HW_REDUCED_ACPI)) {
|
if (fadt && !(fadt->flags & ACPI_FADT_HW_REDUCED_ACPI)) {
|
||||||
/*
|
/*
|
||||||
* Other than waiting for OSPM to request us to switch to ACPI
|
* Other than waiting for OSPM to request us to switch
|
||||||
* mode, do it by ourselves, since SMI will not be triggered.
|
* to ACPI * mode, do it by ourselves, since SMI will
|
||||||
*/
|
* not be triggered.
|
||||||
enter_acpi_mode(fadt->pm1a_cnt_blk);
|
*/
|
||||||
|
enter_acpi_mode(fadt->pm1a_cnt_blk);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -220,19 +219,20 @@ int last_stage_init(void)
|
||||||
|
|
||||||
static int x86_init_cpus(void)
|
static int x86_init_cpus(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SMP
|
if (IS_ENABLED(CONFIG_SMP)) {
|
||||||
debug("Init additional CPUs\n");
|
debug("Init additional CPUs\n");
|
||||||
x86_mp_init();
|
x86_mp_init();
|
||||||
#else
|
} else {
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This causes the cpu-x86 driver to be probed.
|
* This causes the cpu-x86 driver to be probed.
|
||||||
* We don't check return value here as we want to allow boards
|
* We don't check return value here as we want to allow boards
|
||||||
* which have not been converted to use cpu uclass driver to boot.
|
* which have not been converted to use cpu uclass driver to
|
||||||
*/
|
* boot.
|
||||||
uclass_first_device(UCLASS_CPU, &dev);
|
*/
|
||||||
#endif
|
uclass_first_device(UCLASS_CPU, &dev);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -276,9 +276,8 @@ int reserve_arch(void)
|
||||||
if (IS_ENABLED(CONFIG_ENABLE_MRC_CACHE))
|
if (IS_ENABLED(CONFIG_ENABLE_MRC_CACHE))
|
||||||
mrccache_reserve();
|
mrccache_reserve();
|
||||||
|
|
||||||
#ifdef CONFIG_SEABIOS
|
if (IS_ENABLED(CONFIG_SEABIOS))
|
||||||
high_table_reserve();
|
high_table_reserve();
|
||||||
#endif
|
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)) {
|
if (IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)) {
|
||||||
acpi_s3_reserve();
|
acpi_s3_reserve();
|
||||||
|
|
|
@ -631,7 +631,6 @@ int cpu_jump_to_64bit_uboot(ulong target)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
int x86_mp_init(void)
|
int x86_mp_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -644,4 +643,3 @@ int x86_mp_init(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue