nbhw18: load dtb file defined in bd

This commit is contained in:
Marcel Reichmuth 2018-04-23 16:40:06 +02:00
parent 623372a337
commit e7738a5f25
1 changed files with 18 additions and 0 deletions

View File

@ -589,6 +589,22 @@ static void set_phy_fast_blink_mode(int phy_addr)
set_phy_page(miidev, phy_addr, 0);
}
#if !defined(CONFIG_SPL_BUILD)
static void set_devicetree_name(void)
{
char devicetreename[64];
/* add hardware versions to environment */
if (bd_get_devicetree(devicetreename, sizeof(devicetreename)) != 0) {
printf("Devicetree name not found, use legacy name\n");
strcpy(devicetreename, "am335x-nbhw16.dtb");
}
env_set("fdt_image", devicetreename);
}
#endif
int board_late_init(void)
{
#if !defined(CONFIG_SPL_BUILD)
@ -611,6 +627,8 @@ int board_late_init(void)
check_reset_button();
set_devicetree_name();
set_mac_addresses(3);
/* Take phy out of reset after FPGA was loaded */