Skip to content
Snippets Groups Projects
Commit a182e69d authored by Stephen Warren's avatar Stephen Warren Committed by Tom Warren
Browse files

ARM: tegra: allow passing cboot DTB to the kernel


Some users may wish to pass the cboot-supplied DTB to the booted kernel
rather than having U-Boot load the DTB itself. To allow this, expose the
address of the cboot-supplied DTB in environment variable $fdt_addr. At
least when using extlinux.conf, if the user doesn't explicitly specify
which DTB to pass to the kernel, U-Boot passes the DTB referred to by
this variable.

Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarTom Warren <twarren@nvidia.com>
parent 87f5f541
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,19 @@ ...@@ -11,6 +11,19 @@
extern unsigned long nvtboot_boot_x0; extern unsigned long nvtboot_boot_x0;
static int set_fdt_addr(void)
{
int ret;
ret = setenv_hex("fdt_addr", nvtboot_boot_x0);
if (ret) {
printf("Failed to set fdt_addr to point at DTB: %d\n", ret);
return ret;
}
return 0;
}
/* /*
* Attempt to use /chosen/nvidia,ether-mac in the nvtboot DTB to U-Boot's * Attempt to use /chosen/nvidia,ether-mac in the nvtboot DTB to U-Boot's
* ethaddr environment variable if possible. * ethaddr environment variable if possible.
...@@ -47,6 +60,11 @@ static int set_ethaddr_from_nvtboot(void) ...@@ -47,6 +60,11 @@ static int set_ethaddr_from_nvtboot(void)
int tegra_soc_board_init_late(void) int tegra_soc_board_init_late(void)
{ {
/*
* Ignore errors here; the value may not be used depending on
* extlinux.conf or boot script content.
*/
set_fdt_addr();
/* Ignore errors here; not all cases care about Ethernet addresses */ /* Ignore errors here; not all cases care about Ethernet addresses */
set_ethaddr_from_nvtboot(); set_ethaddr_from_nvtboot();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment