diff options
| author | Ovidiu Panait <[email protected]> | 2022-09-13 21:31:27 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-10-06 21:05:17 -0400 |
| commit | 85e68ae001d4449f02e6ce99b91e160bd94eb69c (patch) | |
| tree | edfc934541e40565808150d9ede901070d987325 /arch | |
| parent | 181cbd4017305142eb26df0aa065b8bb95921f83 (diff) | |
common/board_f: move CONFIG_MACH_TYPE logic to arch/arm/lib/bdinfo.c
asm/mach_type.h header and CONFIG_MACH_TYPE macro are arm-specific, so move
related bdinfo logic to arch_setup_bdinfo() in arch/arm/lib/bdinfo.c.
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Ovidiu Panait <[email protected]>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/lib/bdinfo.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c index b22ee07b859..826e09e72c0 100644 --- a/arch/arm/lib/bdinfo.c +++ b/arch/arm/lib/bdinfo.c @@ -9,9 +9,21 @@ #include <common.h> #include <init.h> #include <asm/global_data.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR; +int arch_setup_bdinfo(void) +{ +#ifdef CONFIG_MACH_TYPE + struct bd_info *bd = gd->bd; + + bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ +#endif + + return 0; +} + void arch_print_bdinfo(void) { struct bd_info *bd = gd->bd; |
