public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 0/2] microblaze: Reuse xilinx common setup
@ 2020-10-23  7:42 Michal Simek
  2020-10-23  7:42 ` [PATCH 1/2] microblaze: Wire generic xilinx board_late_init_xilinx() Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michal Simek @ 2020-10-23  7:42 UTC (permalink / raw)
  To: u-boot

Hi,

these small series is only synchronizing generic configuration with Xilinx
ARM SoCs and also getting rid of initrd_high/fdt_high variables setting.
bootm_low/bootm_size are used instead.

Thanks,
Michal


Michal Simek (2):
  microblaze: Wire generic xilinx board_late_init_xilinx()
  microblaze: Enable board_late_init()

 board/xilinx/common/board.c                       |  4 ++--
 .../microblaze-generic/microblaze-generic.c       | 15 +++------------
 configs/microblaze-generic_defconfig              |  1 +
 3 files changed, 6 insertions(+), 14 deletions(-)

-- 
2.28.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] microblaze: Wire generic xilinx board_late_init_xilinx()
  2020-10-23  7:42 [PATCH 0/2] microblaze: Reuse xilinx common setup Michal Simek
@ 2020-10-23  7:42 ` Michal Simek
  2020-10-23  7:42 ` [PATCH 2/2] microblaze: Enable board_late_init() Michal Simek
  2020-10-27  7:27 ` [PATCH 0/2] microblaze: Reuse xilinx common setup Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2020-10-23  7:42 UTC (permalink / raw)
  To: u-boot

Call generic board_late_init_xilinx() to be aligned with the rest of xilinx
platforms. Also getting rid of initrd_high/fdt_high and use
bootm_low/boot_size instead.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 board/xilinx/common/board.c                       |  4 ++--
 .../microblaze-generic/microblaze-generic.c       | 15 +++------------
 2 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 857a66a50407..bcdd3ae4f14a 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -373,7 +373,7 @@ int board_late_init_xilinx(void)
 	phys_size_t bootm_size = gd->ram_size;
 	struct bd_info *bd = gd->bd;
 
-	if (bd->bi_dram[0].start) {
+	if (!CONFIG_IS_ENABLED(MICROBLAZE) && bd->bi_dram[0].start) {
 		ulong scriptaddr;
 
 		scriptaddr = env_get_hex("scriptaddr", 0);
@@ -381,7 +381,7 @@ int board_late_init_xilinx(void)
 				   bd->bi_dram[0].start + scriptaddr);
 	}
 
-	if (CONFIG_IS_ENABLED(ARCH_ZYNQ))
+	if (CONFIG_IS_ENABLED(ARCH_ZYNQ) || CONFIG_IS_ENABLED(MICROBLAZE))
 		bootm_size = min(bootm_size, (phys_size_t)(SZ_512M + SZ_256M));
 
 	ret |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index c1ae8fbfe742..e5909997690a 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -18,6 +18,7 @@
 #include <dm/lists.h>
 #include <fdtdec.h>
 #include <linux/sizes.h>
+#include "../common/board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -36,7 +37,7 @@ int dram_init(void)
 
 int board_late_init(void)
 {
-	ulong max_size, lowmem_size;
+	ulong max_size;
 	u32 status = 0;
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYSRESET_MICROBLAZE)
@@ -56,14 +57,6 @@ int board_late_init(void)
 	max_size = gd->start_addr_sp - CONFIG_STACK_SIZE;
 	max_size = round_down(max_size, SZ_16M);
 
-	/* Linux default LOWMEM_SIZE is 0x30000000 = 768MB */
-	lowmem_size = gd->ram_base + 768 * 1024 * 1024;
-
-	status |= env_set_addr("initrd_high", (void *)min_t(ulong, max_size,
-				lowmem_size));
-	status |= env_set_addr("fdt_high", (void *)min_t(ulong, max_size,
-				lowmem_size));
-
 	status |= env_set_hex("scriptaddr", max_size + SZ_2M);
 
 	status |= env_set_hex("pxefile_addr_r", max_size + SZ_1M);
@@ -75,10 +68,8 @@ int board_late_init(void)
 	status |= env_set_hex("ramdisk_addr_r",
 			       gd->ram_base + SZ_32M + SZ_4M + SZ_2M);
 
-	status |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
-
 	if (status)
 		printf("%s: Saving run time variables FAILED\n", __func__);
 
-	return 0;
+	return board_late_init_xilinx();
 }
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] microblaze: Enable board_late_init()
  2020-10-23  7:42 [PATCH 0/2] microblaze: Reuse xilinx common setup Michal Simek
  2020-10-23  7:42 ` [PATCH 1/2] microblaze: Wire generic xilinx board_late_init_xilinx() Michal Simek
@ 2020-10-23  7:42 ` Michal Simek
  2020-10-27  7:27 ` [PATCH 0/2] microblaze: Reuse xilinx common setup Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2020-10-23  7:42 UTC (permalink / raw)
  To: u-boot

In board_late_init() several variables are setup to match the current
configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 configs/microblaze-generic_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig
index 7cf736954b4c..08c88856dcd9 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -22,6 +22,7 @@ CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="echo U-BOOT for ${hostname};setenv preboot;echo"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_DISPLAY_BOARDINFO=y
+CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_NOR_SUPPORT=y
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 0/2] microblaze: Reuse xilinx common setup
  2020-10-23  7:42 [PATCH 0/2] microblaze: Reuse xilinx common setup Michal Simek
  2020-10-23  7:42 ` [PATCH 1/2] microblaze: Wire generic xilinx board_late_init_xilinx() Michal Simek
  2020-10-23  7:42 ` [PATCH 2/2] microblaze: Enable board_late_init() Michal Simek
@ 2020-10-27  7:27 ` Michal Simek
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2020-10-27  7:27 UTC (permalink / raw)
  To: u-boot

p? 23. 10. 2020 v 9:42 odes?latel Michal Simek <michal.simek@xilinx.com> napsal:
>
> Hi,
>
> these small series is only synchronizing generic configuration with Xilinx
> ARM SoCs and also getting rid of initrd_high/fdt_high variables setting.
> bootm_low/bootm_size are used instead.
>
> Thanks,
> Michal
>
>
> Michal Simek (2):
>   microblaze: Wire generic xilinx board_late_init_xilinx()
>   microblaze: Enable board_late_init()
>
>  board/xilinx/common/board.c                       |  4 ++--
>  .../microblaze-generic/microblaze-generic.c       | 15 +++------------
>  configs/microblaze-generic_defconfig              |  1 +
>  3 files changed, 6 insertions(+), 14 deletions(-)
>
> --
> 2.28.0
>

Applied.
M


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-27  7:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-23  7:42 [PATCH 0/2] microblaze: Reuse xilinx common setup Michal Simek
2020-10-23  7:42 ` [PATCH 1/2] microblaze: Wire generic xilinx board_late_init_xilinx() Michal Simek
2020-10-23  7:42 ` [PATCH 2/2] microblaze: Enable board_late_init() Michal Simek
2020-10-27  7:27 ` [PATCH 0/2] microblaze: Reuse xilinx common setup Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox