nmhw21: provide bootloader version in device tree
This commit is contained in:
parent
baa5e4fcea
commit
ccb5de587f
|
|
@ -36,6 +36,7 @@
|
|||
#include <watchdog.h>
|
||||
#include <libfdt.h>
|
||||
#include <miiphy.h>
|
||||
#include <version.h>
|
||||
|
||||
#include "../common/bdparser.h"
|
||||
#include "../common/board_descriptor.h"
|
||||
|
|
@ -1200,6 +1201,17 @@ int board_fit_config_name_match(const char *name)
|
|||
|
||||
#if defined(CONFIG_OF_BOARD_SETUP) && !defined(CONFIG_SPL_BUILD)
|
||||
|
||||
static void ft_bootloader_version(void *blob)
|
||||
{
|
||||
int node_offset;
|
||||
static const char version_string[] = U_BOOT_VERSION_STRING;
|
||||
|
||||
node_offset = fdt_path_offset(blob, "/");
|
||||
if (node_offset != -1) {
|
||||
fdt_setprop_string(blob, node_offset, "nm,bootloader,version", version_string);
|
||||
}
|
||||
}
|
||||
|
||||
static void ft_hw_info(void *blob)
|
||||
{
|
||||
int node_offset;
|
||||
|
|
@ -1335,6 +1347,7 @@ static void ft_eth(void *blob)
|
|||
|
||||
int ft_board_setup(void *blob, bd_t *bd)
|
||||
{
|
||||
ft_bootloader_version(blob);
|
||||
ft_hw_info(blob);
|
||||
ft_user_interface(blob);
|
||||
ft_user_module(blob);
|
||||
|
|
|
|||
Loading…
Reference in New Issue