]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xilinx: Move initrd_high setup to common location
authorMichal Simek <michal.simek@xilinx.com>
Wed, 8 Apr 2020 08:51:36 +0000 (10:51 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 27 Apr 2020 11:57:18 +0000 (13:57 +0200)
Moving to common location initrd_high is also setup for Zynq which hasn't
done in run time code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/common/board.c
board/xilinx/versal/board.c
board/xilinx/zynqmp/zynqmp.c
include/configs/zynq-common.h

index 7c191e53fb71f402eeb9a3e5c1ac90f5ca5a4204..294a59df77dac3187dcbc06f1fd065bd03446717 100644 (file)
@@ -8,6 +8,7 @@
 #include <asm/sections.h>
 #include <dm/uclass.h>
 #include <i2c.h>
+#include <linux/sizes.h>
 #include "board.h"
 
 int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
@@ -75,7 +76,13 @@ void *board_fdt_blob_setup(void)
 
 int board_late_init_xilinx(void)
 {
+       ulong initrd_hi;
+
        env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
 
+       initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE;
+       initrd_hi = round_down(initrd_hi, SZ_16M);
+       env_set_addr("initrd_high", (void *)initrd_hi);
+
        return 0;
 }
index 908ea87163f894ed4d126d976b1184965c28f8f9..2900dfb44e931b2f3599c9295a7c74df8e5f8f53 100644 (file)
@@ -16,7 +16,6 @@
 #include <dm/device.h>
 #include <dm/uclass.h>
 #include <versalpl.h>
-#include <linux/sizes.h>
 #include "../common/board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -94,7 +93,6 @@ int board_late_init(void)
        const char *mode;
        char *new_targets;
        char *env_targets;
-       ulong initrd_hi;
 
        if (!(gd->flags & GD_FLG_ENV_DEFAULT)) {
                debug("Saved variables - Skipping\n");
@@ -201,10 +199,6 @@ int board_late_init(void)
 
        env_set("boot_targets", new_targets);
 
-       initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE;
-       initrd_hi = round_down(initrd_hi, SZ_16M);
-       env_set_addr("initrd_high", (void *)initrd_hi);
-
        return board_late_init_xilinx();
 }
 
index b2172356ad0ae5fe79593f5d91ed1f3389578ea1..66a43974e68d00abb9d2bf91e49d1c6fd68fb950 100644 (file)
@@ -26,7 +26,6 @@
 #include <zynqmppl.h>
 #include <zynqmp_firmware.h>
 #include <g_dnl.h>
-#include <linux/sizes.h>
 #include "../common/board.h"
 
 #include "pm_cfg_obj.h"
@@ -565,7 +564,6 @@ int board_late_init(void)
        char *new_targets;
        char *env_targets;
        int ret;
-       ulong initrd_hi;
 
 #if defined(CONFIG_USB_ETHER) && !defined(CONFIG_USB_GADGET_DOWNLOAD)
        usb_ether_init();
@@ -692,10 +690,6 @@ int board_late_init(void)
 
        env_set("boot_targets", new_targets);
 
-       initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE;
-       initrd_hi = round_down(initrd_hi, SZ_16M);
-       env_set_addr("initrd_high", (void *)initrd_hi);
-
        reset_reason();
 
        return board_late_init_xilinx();
index 1eaf65b0a2a105ef8a63dc227365946395e6099c..4ccc31e37655b22ff525786503f4a09e1a5e1d4c 100644 (file)
 #ifndef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "fdt_high=0x20000000\0"         \
-       "initrd_high=0x20000000\0"      \
        "scriptaddr=0x20000\0"  \
        "script_size_f=0x40000\0"       \
        "fdt_addr_r=0x1f00000\0"        \