mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-15 19:56:58 +02:00
arm: socfpga: Export board ID as U-Boot environment
Board ID is exported as environment variable for use to boot Linux with FIT configuration. Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
This commit is contained in:
parent
6ec6b75e9a
commit
8c172a423c
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <asm/arch/board.h>
|
||||
#include <asm/arch/clock_manager.h>
|
||||
#include <asm/arch/mailbox_s10.h>
|
||||
#include <asm/arch/misc.h>
|
||||
|
11
arch/arm/mach-socfpga/include/mach/board.h
Normal file
11
arch/arm/mach-socfpga/include/mach/board.h
Normal file
@ -0,0 +1,11 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2025 Altera Corporation <www.altera.com>
|
||||
*/
|
||||
|
||||
#ifndef BOARD_H_
|
||||
#define BOARD_H_
|
||||
|
||||
u8 socfpga_get_board_id(void);
|
||||
|
||||
#endif /* _BOARD_H_ */
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <altera.h>
|
||||
#include <asm/arch/board.h>
|
||||
#include <asm/arch/mailbox_s10.h>
|
||||
#include <asm/arch/misc.h>
|
||||
#include <asm/arch/reset_manager.h>
|
||||
@ -57,10 +58,15 @@ int print_cpuinfo(void)
|
||||
int arch_misc_init(void)
|
||||
{
|
||||
char qspi_string[13];
|
||||
unsigned long id;
|
||||
|
||||
sprintf(qspi_string, "<0x%08x>", cm_get_qspi_controller_clk_hz());
|
||||
env_set("qspi_clock", qspi_string);
|
||||
|
||||
/* Export board_id as environment variable */
|
||||
id = socfpga_get_board_id();
|
||||
env_set_ulong("board_id", id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user