mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-29 09:45:52 +00:00
x86: coreboot: Avoid a declaration after a label
Declare the global_data pointer at the top of the file, to avoid an error: arch/x86/include/asm/global_data.h:143:35: error: a label can only be part of a statement and a declaration is not a statement board/coreboot/coreboot/coreboot.c:60:2: note: in expansion of macro ‘DECLARE_GLOBAL_DATA_PTR’ Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
48bf738e36
commit
0879de0e8b
1 changed files with 7 additions and 7 deletions
|
@ -10,6 +10,8 @@
|
||||||
#include <asm/cb_sysinfo.h>
|
#include <asm/cb_sysinfo.h>
|
||||||
#include <asm/global_data.h>
|
#include <asm/global_data.h>
|
||||||
|
|
||||||
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
int board_early_init_r(void)
|
int board_early_init_r(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -54,14 +56,12 @@ int show_board_info(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
#ifdef CONFIG_OF_CONTROL
|
if (IS_ENABLED(CONFIG_OF_CONTROL)) {
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
|
||||||
|
|
||||||
model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
|
if (model)
|
||||||
|
printf("Model: %s\n", model);
|
||||||
if (model)
|
}
|
||||||
printf("Model: %s\n", model);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return checkboard();
|
return checkboard();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue