mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-29 09:41:36 +02:00
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 <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
This commit is contained in:
parent
181cbd4017
commit
85e68ae001
@ -9,9 +9,21 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
#include <asm/global_data.h>
|
#include <asm/global_data.h>
|
||||||
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
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)
|
void arch_print_bdinfo(void)
|
||||||
{
|
{
|
||||||
struct bd_info *bd = gd->bd;
|
struct bd_info *bd = gd->bd;
|
||||||
|
@ -46,9 +46,6 @@
|
|||||||
#include <video.h>
|
#include <video.h>
|
||||||
#include <watchdog.h>
|
#include <watchdog.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#ifdef CONFIG_MACH_TYPE
|
|
||||||
#include <asm/mach-types.h>
|
|
||||||
#endif
|
|
||||||
#if defined(CONFIG_MP) && defined(CONFIG_PPC)
|
#if defined(CONFIG_MP) && defined(CONFIG_PPC)
|
||||||
#include <asm/mp.h>
|
#include <asm/mp.h>
|
||||||
#endif
|
#endif
|
||||||
@ -624,10 +621,6 @@ int setup_bdinfo(void)
|
|||||||
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE; /* size of SRAM */
|
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE; /* size of SRAM */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_MACH_TYPE
|
|
||||||
bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return arch_setup_bdinfo();
|
return arch_setup_bdinfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user