Commit e424c15c1f4ef8a084120f111d95da60676ba1cc
Committed by
Tom Rini
1 parent
86cfb6bdec
Exists in
master
and in
53 other branches
x86: Enable generic board support
This enables generic board support so that x86 boards can define CONFIG_SYS_GENERIC_BOARD. Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 4 changed files with 19 additions and 0 deletions Side-by-side Diff
arch/x86/config.mk
... | ... | @@ -36,6 +36,9 @@ |
36 | 36 | PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm |
37 | 37 | PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0 |
38 | 38 | |
39 | +# Support generic board on x86 | |
40 | +__HAVE_ARCH_GENERIC_BOARD := y | |
41 | + | |
39 | 42 | PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden |
40 | 43 | |
41 | 44 | PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions |
arch/x86/include/asm/u-boot.h
... | ... | @@ -39,6 +39,13 @@ |
39 | 39 | #include <config.h> |
40 | 40 | #include <compiler.h> |
41 | 41 | |
42 | +#ifdef CONFIG_SYS_GENERIC_BOARD | |
43 | +/* Use the generic board which requires a unified bd_info */ | |
44 | +#include <asm-generic/u-boot.h> | |
45 | +#else | |
46 | + | |
47 | +#ifndef __ASSEMBLY__ | |
48 | + | |
42 | 49 | typedef struct bd_info { |
43 | 50 | unsigned long bi_memstart; /* start of DRAM memory */ |
44 | 51 | phys_size_t bi_memsize; /* size of DRAM memory in bytes */ |
... | ... | @@ -59,6 +66,10 @@ |
59 | 66 | ulong size; |
60 | 67 | }bi_dram[CONFIG_NR_DRAM_BANKS]; |
61 | 68 | } bd_t; |
69 | + | |
70 | +#endif /* __ASSEMBLY__ */ | |
71 | + | |
72 | +#endif /* !CONFIG_SYS_GENERIC_BOARD */ | |
62 | 73 | |
63 | 74 | /* For image.h:image_check_target_arch() */ |
64 | 75 | #define IH_ARCH_DEFAULT IH_ARCH_I386 |
arch/x86/lib/Makefile
common/board_r.c
... | ... | @@ -507,11 +507,13 @@ |
507 | 507 | #endif |
508 | 508 | |
509 | 509 | /* enable exceptions */ |
510 | +#ifdef CONFIG_ARM | |
510 | 511 | static int initr_enable_interrupts(void) |
511 | 512 | { |
512 | 513 | enable_interrupts(); |
513 | 514 | return 0; |
514 | 515 | } |
516 | +#endif | |
515 | 517 | |
516 | 518 | #ifdef CONFIG_CMD_NET |
517 | 519 | static int initr_ethaddr(void) |