Skip to contentSkip to conversation

arm: Tidy up early init

PATCH Superseded Simon Glass 2 participants 16 messages Aug 28, 2015 – Sep 4, 2015

Subsystems (5)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover arm: Tidy up early init

This series collects the previous RFT patches I sent out.

https://patchwork.ozlabs.org/patch/508167/
https://patchwork.ozlabs.org/patch/508168/

It turns out that I originally sent a version of these in April:

https://patchwork.ozlabs.org/patch/461687/
https://patchwork.ozlabs.org/patch/461690/

so this series mirrors that one and includes the Zynq patches from that series.

I hope these can sneak in to this release so that I don't forget them again!

I have tested this on a few ARM platforms: Zynq Zybo, Beaglebone Black, pcduino3 (sunxi), Jetson-TK1 (tegra).

Changes in v2:
- Put this into common/init/ and just Makefiles accordingly
- Add comments as to why this is needed, deal with arch-specific memset()

Simon Glass (8):
Move board_init_f_mem() into a common location board_init_f_mem(): Don't require memset() board_init_f_mem(): Don't create an unused early malloc() area
arm: Switch aarch64 to using generic global_data setup
arm: Switch 32-bit ARM to using generic global_data setup
microblaze: Add a TODO to call board_init_f_mem()
zynq: Move SPL console init out of board_init_f() Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"

 arch/arm/lib/crt0.S                | 28 +++---------------
 arch/arm/lib/crt0_64.S             | 15 ++--------
 arch/arm/mach-zynq/spl.c           |  2 +-
 arch/microblaze/cpu/start.S        |  2 ++
 common/Makefile                    |  1 +
 common/board_f.c                   | 29 ------------------
 common/init/Makefile               |  7 +++++
 common/init/board_init.c           | 60 ++++++++++++++++++++++++++++++++++++++
 configs/zynq_microzed_defconfig    |  1 -
 configs/zynq_zc702_defconfig       |  1 -
 configs/zynq_zc706_defconfig       |  1 -
 configs/zynq_zc70x_defconfig       |  1 -
 configs/zynq_zc770_xm010_defconfig |  1 -
 configs/zynq_zc770_xm011_defconfig |  1 -
 configs/zynq_zc770_xm012_defconfig |  1 -
 configs/zynq_zc770_xm013_defconfig |  1 -
 configs/zynq_zed_defconfig         |  1 -
 configs/zynq_zybo_defconfig        |  1 -
 scripts/Makefile.spl               |  1 +
 19 files changed, 79 insertions(+), 76 deletions(-)
 create mode 100644 common/init/Makefile
 create mode 100644 common/init/board_init.c
Signature · 1 line
2.5.0.457.gab17608
#1 lore raw

PATCH v2 1/8 Move board_init_f_mem() into a common location

This function will be used by both SPL and U-Boot proper. So move it into a common place. Also change the #ifdef so that the early malloc() area is not set up in SPL if CONFIG_SYS_SPL_MALLOC_START is defined. In that case it would never actually be used, and just chews up stack space.

---

Changes in v2:
- Put this into common/init/ and just Makefiles accordingly

 common/Makefile          |  1 +
 common/board_f.c         | 29 -----------------------------
 common/init/Makefile     |  7 +++++++
 common/init/board_init.c | 41 +++++++++++++++++++++++++++++++++++++++++
 scripts/Makefile.spl     |  1 +
 5 files changed, 50 insertions(+), 29 deletions(-)
 create mode 100644 common/init/Makefile
 create mode 100644 common/init/board_init.c
common/Makefile +1 -0
index dc82433..35b47a9 100644
@@ -7,6 +7,7 @@
 
 # core
 ifndef CONFIG_SPL_BUILD
+obj-y += init/
 obj-y += main.o
 obj-y += exports.o
 obj-y += hash.o
common/board_f.c +0 -29
index fe75656..85ae7a9 100644
@@ -1026,32 +1026,3 @@ void board_init_f_r(void)
 	hang();
 }
 #endif /* CONFIG_X86 */
-
-/* Unfortunately x86 can't compile this code as gd cannot be assigned */
-#ifndef CONFIG_X86
-__weak void arch_setup_gd(struct global_data *gd_ptr)
-{
-	gd = gd_ptr;
-}
-#endif /* !CONFIG_X86 */
-
-ulong board_init_f_mem(ulong top)
-{
-	struct global_data *gd_ptr;
-
-	/* Leave space for the stack we are running with now */
-	top -= 0x40;
-
-	top -= sizeof(struct global_data);
-	top = ALIGN(top, 16);
-	gd_ptr = (struct global_data *)top;
-	memset(gd_ptr, '\0', sizeof(*gd));
-	arch_setup_gd(gd_ptr);
-
-#ifdef CONFIG_SYS_MALLOC_F_LEN
-	top -= CONFIG_SYS_MALLOC_F_LEN;
-	gd->malloc_base = top;
-#endif
-
-	return top;
-}
common/init/Makefile new file +7 -0
new file mode 100644
index 0000000..4902635
@@ -0,0 +1,7 @@
+#
+# Copyright (c) 2015 Google, Inc
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += board_init.o
common/init/board_init.c new file +41 -0

41 lines not on this page · raw message

scripts/Makefile.spl +1 -0
index 58442f1..2df93c8 100644
@@ -52,6 +52,7 @@ libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/)
 libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
 
 libs-$(CONFIG_SPL_FRAMEWORK) += common/spl/
+libs-y += common/init/
 libs-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/
 libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/
 libs-y += drivers/
Signature · 1 line
2.5.0.457.gab17608
#2 lore raw

PATCH v2 2/8 board_init_f_mem(): Don't require memset()

In reply to Simon Glass

Unfortunately memset() is not always available, so provide a substitute when needed.

---

Changes in v2:
- Add comments as to why this is needed, deal with arch-specific memset()

 common/init/board_init.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
common/init/board_init.c +18 -0
index e7ebca7..b6a1a17 100644
@@ -11,6 +11,16 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+/*
+ * It isn't trivial to figure out whether memcpy() exists. The arch-specific
+ * memcpy() is not normally available in SPL due to code size.
+ */
+#if !defined(CONFIG_SPL_BUILD) || \
+		(defined(CONFIG_SPL_LIBGENERIC_SUPPORT) && \
+		!defined(CONFIG_USE_ARCH_MEMSET))
+#define USE_MEMCPY
+#endif
+
 /* Unfortunately x86 can't compile this code as gd cannot be assigned */
 #ifndef CONFIG_X86
 __weak void arch_setup_gd(struct global_data *gd_ptr)
@@ -22,6 +32,9 @@ __weak void arch_setup_gd(struct global_data *gd_ptr)
 ulong board_init_f_mem(ulong top)
 {
 	struct global_data *gd_ptr;
+#ifndef USE_MEMCPY
+	int *ptr, *end;
+#endif
 
 	/* Leave space for the stack we are running with now */
 	top -= 0x40;
@@ -29,7 +42,12 @@ ulong board_init_f_mem(ulong top)
 	top -= sizeof(struct global_data);
 	top = ALIGN(top, 16);
 	gd_ptr = (struct global_data *)top;
+#ifdef USE_MEMCPY
 	memset(gd_ptr, '\0', sizeof(*gd));
+#else
+	for (ptr = (int *)gd_ptr, end = (int *)(gd_ptr + 1); ptr < end; )
+		*ptr++ = 0;
+#endif
 	arch_setup_gd(gd_ptr);
 
 #if defined(CONFIG_SYS_MALLOC_F)
Signature · 1 line
2.5.0.457.gab17608
#3 lore raw

PATCH v2 3/8 board_init_f_mem(): Don't create an unused early malloc() area

In reply to Simon Glass

Change the #ifdef so that the early malloc() area is not set up in SPL if CONFIG_SYS_SPL_MALLOC_START is defined. In that case it would never actually be used, and just chews up stack space.

---

Changes in v2: None

 common/init/board_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
common/init/board_init.c +2 -1
index b6a1a17..65391a5 100644
@@ -50,7 +50,8 @@ ulong board_init_f_mem(ulong top)
 #endif
 	arch_setup_gd(gd_ptr);
 
-#if defined(CONFIG_SYS_MALLOC_F)
+#if defined(CONFIG_SYS_MALLOC_F) && \
+	(!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SYS_SPL_MALLOC_START))
 	top -= CONFIG_SYS_MALLOC_F_LEN;
 	gd->malloc_base = top;
 #endif
Signature · 1 line
2.5.0.457.gab17608
#4 lore raw

PATCH v2 4/8 arm: Switch aarch64 to using generic global_data setup

In reply to Simon Glass

There is quite a bit of assembler code that can be removed if we use the generic global_data setup. Less arch-specific code makes it easier to add new features and maintain the start-up code.

Drop the unneeded code and adjust the hooks in board_f.c to cope.

Tested on LS2085ARDB and LS2085AQDS (armv8 SoC).

---

Changes in v2: None

 arch/arm/lib/crt0_64.S | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
arch/arm/lib/crt0_64.S +3 -12
index 98a906e..31fc3b4 100644
@@ -66,19 +66,10 @@ ENTRY(_main)
 #else
 	ldr	x0, =(CONFIG_SYS_INIT_SP_ADDR)
 #endif
-	sub	x18, x0, #GD_SIZE	/* allocate one GD above SP */
-	bic	x18, x18, #0x7		/* 8-byte alignment for GD */
-zero_gd:
-	sub	x0, x0, #0x8
-	str	xzr, [x0]
-	cmp	x0, x18
-	b.gt	zero_gd
-#if defined(CONFIG_SYS_MALLOC_F_LEN)
-	ldr	x0, =CONFIG_SYS_MALLOC_F_LEN
-	sub	x0, x18, x0
-	str	x0, [x18, #GD_MALLOC_BASE]
-#endif
 	bic	sp, x0, #0xf	/* 16-byte alignment for ABI compliance */
+	bl	board_init_f_mem
+	mov	sp, x0
+
 	mov	x0, #0
 	bl	board_init_f
 
Signature · 1 line
2.5.0.457.gab17608
#5 lore raw

PATCH v2 5/8 arm: Switch 32-bit ARM to using generic global_data setup

In reply to Simon Glass

There is quite a bit of assembler code that can be removed if we use the generic global_data setup. Less arch-specific code makes it easier to add new features and maintain the start-up code.

Drop the unneeded code and adjust the hooks in board_f.c to cope.

---

Changes in v2: None

 arch/arm/lib/crt0.S | 28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)
arch/arm/lib/crt0.S +4 -24
index afd4f10..fc1252d 100644
@@ -76,31 +76,11 @@ ENTRY(_main)
 #else
 	bic	sp, sp, #7	/* 8-byte alignment for ABI compliance */
 #endif
-	mov	r2, sp
-	sub	sp, sp, #GD_SIZE	/* allocate one GD above SP */
-#if defined(CONFIG_CPU_V7M)	/* v7M forbids using SP as BIC destination */
-	mov	r3, sp
-	bic	r3, r3, #7
-	mov	sp, r3
-#else
-	bic	sp, sp, #7	/* 8-byte alignment for ABI compliance */
-#endif
-	mov	r9, sp		/* GD is above SP */
-	mov	r1, sp
+	mov	r0, sp
+	bl	board_init_f_mem
+	mov	sp, r0
+
 	mov	r0, #0
-clr_gd:
-	cmp	r1, r2			/* while not at end of GD */
-#if defined(CONFIG_CPU_V7M)
-	itt	lo
-#endif
-	strlo	r0, [r1]		/* clear 32-bit GD word */
-	addlo	r1, r1, #4		/* move to next */
-	blo	clr_gd
-#if defined(CONFIG_SYS_MALLOC_F_LEN)
-	sub	sp, sp, #CONFIG_SYS_MALLOC_F_LEN
-	str	sp, [r9, #GD_MALLOC_BASE]
-#endif
-	/* mov r0, #0 not needed due to above code */
 	bl	board_init_f
 
 #if ! defined(CONFIG_SPL_BUILD)
Signature · 1 line
2.5.0.457.gab17608
#6 lore raw

PATCH v2 6/8 microblaze: Add a TODO to call board_init_f_mem()

In reply to Simon Glass

This C function should be used to do the early memory layout and init. This is beyond my powers, so just add a TODO for the maintainer.

---

Changes in v2: None

 arch/microblaze/cpu/start.S | 2 ++
 1 file changed, 2 insertions(+)
arch/microblaze/cpu/start.S +2 -0
index 953d3a1..14f46a8 100644
@@ -25,6 +25,7 @@ _start:
 
 	addi	r8, r0, __end
 	mts	rslr, r8
+	/* TODO: Redo this code to call board_init_f_mem() */
 #if defined(CONFIG_SPL_BUILD)
 	addi	r1, r0, CONFIG_SPL_STACK_ADDR
 	mts	rshr, r1
@@ -141,6 +142,7 @@ _start:
 	ori	r12, r12, 0x1a0
 	mts	rmsr, r12
 
+	/* TODO: Redo this code to call board_init_f_mem() */
 clear_bss:
 	/* clear BSS segments */
 	addi	r5, r0, __bss_start
Signature · 1 line
2.5.0.457.gab17608
maintainer
#7 lore raw

PATCH v2 6/8 microblaze: Add a TODO to call board_init_f_mem()

Quoted 25 lines · Simon Glass

This C function should be used to do the early memory layout and init. This is beyond my powers, so just add a TODO for the maintainer.

---

Changes in v2: None

 arch/microblaze/cpu/start.S | 2 ++
 1 file changed, 2 insertions(+)
arch/microblaze/cpu/start.S +1 -0
index 953d3a1..14f46a8 100644
@@ -25,6 +25,7 @@ _start:
 
 	addi	r8, r0, __end
 	mts	rslr, r8
+	/* TODO: Redo this code to call board_init_f_mem() */
 #if defined(CONFIG_SPL_BUILD)
 	addi	r1, r0, CONFIG_SPL_STACK_ADDR
 	mts	rshr, r1

arch/microblaze/cpu/start.S _start: · line 148

Quoted 7 lines
arch/microblaze/cpu/start.S +1 -0
@@ -141,6 +142,7 @@ _start:
 	ori	r12, r12, 0x1a0
 	mts	rmsr, r12
 
+	/* TODO: Redo this code to call board_init_f_mem() */
 clear_bss:
 	/* clear BSS segments */
 	addi	r5, r0, __bss_start

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150901/ae689067/attachment.sig>
#8 lore raw

PATCH v2 7/8 zynq: Move SPL console init out of board_init_f()

In reply to Simon Glass

We should not init the console this early and there is no need to. If we want to do early init it can be done in spl_board_init(). Move the preloader_console_init() call from board_init_f() to board_init_r().

---

Changes in v2: None

 arch/arm/mach-zynq/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-zynq/spl.c +1 -1
index e7df6d3..7bdac3b 100644
@@ -20,7 +20,6 @@ void board_init_f(ulong dummy)
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
-	preloader_console_init();
 	arch_cpu_init();
 	board_init_r(NULL, 0);
 }
@@ -28,6 +27,7 @@ void board_init_f(ulong dummy)
 #ifdef CONFIG_SPL_BOARD_INIT
 void spl_board_init(void)
 {
+	preloader_console_init();
 	board_init();
 }
 #endif
Signature · 1 line
2.5.0.457.gab17608
maintainer
#9 lore raw

PATCH v2 7/8 zynq: Move SPL console init out of board_init_f()

Quoted 27 lines · Simon Glass

We should not init the console this early and there is no need to. If we want to do early init it can be done in spl_board_init(). Move the preloader_console_init() call from board_init_f() to board_init_r().

---

Changes in v2: None

 arch/arm/mach-zynq/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-zynq/spl.c +0 -1
index e7df6d3..7bdac3b 100644
@@ -20,7 +20,6 @@ void board_init_f(ulong dummy)
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
-	preloader_console_init();
 	arch_cpu_init();
 	board_init_r(NULL, 0);
 }

arch/arm/mach-zynq/spl.c void board_init_f(ulong dummy) · line 33

Quoted 7 lines
arch/arm/mach-zynq/spl.c +1 -0
@@ -28,6 +27,7 @@ void board_init_f(ulong dummy)
 #ifdef CONFIG_SPL_BOARD_INIT
 void spl_board_init(void)
 {
+	preloader_console_init();
 	board_init();
 }
 #endif

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150901/1ec9b138/attachment.sig>
#10 lore raw

PATCH v2 8/8 Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"

In reply to Simon Glass

This reverts commit 321f86e18d6aae9f7b7ba3ef1eb0cec769481874.

The original bug has been fixed.

Tested-on: Zedboard and ZC706 board

---

Changes in v2: None

 configs/zynq_microzed_defconfig    | 1 -
 configs/zynq_zc702_defconfig       | 1 -
 configs/zynq_zc706_defconfig       | 1 -
 configs/zynq_zc70x_defconfig       | 1 -
 configs/zynq_zc770_xm010_defconfig | 1 -
 configs/zynq_zc770_xm011_defconfig | 1 -
 configs/zynq_zc770_xm012_defconfig | 1 -
 configs/zynq_zc770_xm013_defconfig | 1 -
 configs/zynq_zed_defconfig         | 1 -
 configs/zynq_zybo_defconfig        | 1 -
 10 files changed, 10 deletions(-)
configs/zynq_microzed_defconfig +0 -1
index 3e141a8..e9c3209 100644
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_MICROZED=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-microzed"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc702_defconfig +0 -1
index f94bdde..0abb7a8 100644
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc702"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc706_defconfig +0 -1
index 49efc6b..d67f507 100644
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC706=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc70x_defconfig +0 -1
index 633c521..37c249f 100644
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC70X=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc702"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc770_xm010_defconfig +0 -1
index c608029..0e826bb 100644
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC770=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm010"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc770_xm011_defconfig +0 -1
index 123e461..46d043b 100644
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC770=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm011"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc770_xm012_defconfig +0 -1
index 3da5168..34d479f 100644
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC770=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm012"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zc770_xm013_defconfig +0 -1
index 015ec79..c59599f 100644
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZC770=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm013"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zed_defconfig +0 -1
index ce414b7..886b4a5 100644
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZED=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zed"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
configs/zynq_zybo_defconfig +0 -1
index defcac9..77b9409 100644
@@ -2,7 +2,6 @@ CONFIG_ARM=y
 CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_ZYBO=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zybo"
-# CONFIG_SYS_MALLOC_F is not set
 CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
Signature · 1 line
2.5.0.457.gab17608
maintainer
#11 lore raw

PATCH v2 8/8 Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"

Quoted 11 lines · Simon Glass

This reverts commit 321f86e18d6aae9f7b7ba3ef1eb0cec769481874.

The original bug has been fixed.

Tested-on: Zedboard and ZC706 board

---

Changes in v2: None

Quoted 11 lines
 configs/zynq_microzed_defconfig    | 1 -
 configs/zynq_zc702_defconfig       | 1 -
 configs/zynq_zc706_defconfig       | 1 -
 configs/zynq_zc70x_defconfig       | 1 -
 configs/zynq_zc770_xm010_defconfig | 1 -
 configs/zynq_zc770_xm011_defconfig | 1 -
 configs/zynq_zc770_xm012_defconfig | 1 -
 configs/zynq_zc770_xm013_defconfig | 1 -
 configs/zynq_zed_defconfig         | 1 -
 configs/zynq_zybo_defconfig        | 1 -
 10 files changed, 10 deletions(-)

Tested-on: zc702

Thanks,
Michal

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150901/6f3c677d/attachment.sig>

maintainer
#12 lore raw

v2 cover arm: Tidy up early init

In reply to Simon Glass

Hi Simon,

Quoted 47 lines · Simon Glass

This series collects the previous RFT patches I sent out.

https://patchwork.ozlabs.org/patch/508167/
https://patchwork.ozlabs.org/patch/508168/

It turns out that I originally sent a version of these in April:

https://patchwork.ozlabs.org/patch/461687/
https://patchwork.ozlabs.org/patch/461690/

so this series mirrors that one and includes the Zynq patches from that series.

I hope these can sneak in to this release so that I don't forget them again!

I have tested this on a few ARM platforms: Zynq Zybo, Beaglebone Black, pcduino3 (sunxi), Jetson-TK1 (tegra).

Changes in v2:
- Put this into common/init/ and just Makefiles accordingly
- Add comments as to why this is needed, deal with arch-specific memset()

Simon Glass (8):
Move board_init_f_mem() into a common location board_init_f_mem(): Don't require memset() board_init_f_mem(): Don't create an unused early malloc() area
arm: Switch aarch64 to using generic global_data setup
arm: Switch 32-bit ARM to using generic global_data setup
microblaze: Add a TODO to call board_init_f_mem()
zynq: Move SPL console init out of board_init_f() Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"

 arch/arm/lib/crt0.S                | 28 +++---------------
 arch/arm/lib/crt0_64.S             | 15 ++--------
 arch/arm/mach-zynq/spl.c           |  2 +-
 arch/microblaze/cpu/start.S        |  2 ++
 common/Makefile                    |  1 +
 common/board_f.c                   | 29 ------------------
 common/init/Makefile               |  7 +++++
 common/init/board_init.c           | 60 ++++++++++++++++++++++++++++++++++++++
 configs/zynq_microzed_defconfig    |  1 -
 configs/zynq_zc702_defconfig       |  1 -
 configs/zynq_zc706_defconfig       |  1 -
 configs/zynq_zc70x_defconfig       |  1 -
 configs/zynq_zc770_xm010_defconfig |  1 -
 configs/zynq_zc770_xm011_defconfig |  1 -
Quoted 9 lines
 configs/zynq_zc770_xm012_defconfig |  1 -
 configs/zynq_zc770_xm013_defconfig |  1 -
 configs/zynq_zed_defconfig         |  1 -
 configs/zynq_zybo_defconfig        |  1 -
 scripts/Makefile.spl               |  1 +
 19 files changed, 79 insertions(+), 76 deletions(-)
 create mode 100644 common/init/Makefile
 create mode 100644 common/init/board_init.c

I am getting compilation warning about USE_MEMCPY which should be resolved too.

[u-boot]$ ./tools/buildman/buildman -b xnext/serial2 zynq_zc702 -sSed boards.cfg is up to date. Nothing to do.
Summary of 9 commits for 1 boards (1 thread, 8 jobs per thread) 01: Merge branch 'master' of http://git.denx.de/u-boot-sunxi
02: Move board_init_f_mem() into a common location
03: board_init_f_mem(): Don't require memset()

       arm:  +   zynq_zc702

+ #define USE_MEMCPY
+ ^
+In file included from ../include/common.h:1064:0,
+ from ../common/init/board_init.c:10:
+../include/malloc.h:355:0: note: this is the location of the previous definition
+ #define USE_MEMCPY 1
w+../common/init/board_init.c:21:0: warning: "USE_MEMCPY" redefined [enabled by default]
04: board_init_f_mem(): Don't create an unused early malloc() area 05: arm: Switch aarch64 to using generic global_data setup 06: arm: Switch 32-bit ARM to using generic global_data setup

       arm: (for 1/1 boards)  all +28.0  spl/u-boot-spl:all +28.0
spl/u-boot-spl:text +28.0  text +28.0
            zynq_zc702     :  all +28  spl/u-boot-spl:all +28
spl/u-boot-spl:text +28  text +28
07: microblaze: Add a TODO to call board_init_f_mem()
08: zynq: Move SPL console init out of board_init_f()
       arm: (for 1/1 boards)  spl/u-boot-spl:all +8.0
spl/u-boot-spl:text +8.0
            zynq_zc702     :  spl/u-boot-spl:all +8  spl/u-boot-spl:text +8
09: Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"
       arm: (for 1/1 boards)  all +257.0  rodata +37.0
spl/u-boot-spl:all +180.0  spl/u-boot-spl:text +180.0  text +220.0
            zynq_zc702     :  all +257  rodata +37  spl/u-boot-spl:all

+180 spl/u-boot-spl:text +180 text +220

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150901/e6613021/attachment.sig>
#13 lore raw

v2 cover arm: Tidy up early init

Hi Mchal,

Quoted 96 lines · Michal Simek

Hi Simon,

Quoted 47 lines · Simon Glass

This series collects the previous RFT patches I sent out.

https://patchwork.ozlabs.org/patch/508167/
https://patchwork.ozlabs.org/patch/508168/

It turns out that I originally sent a version of these in April:

https://patchwork.ozlabs.org/patch/461687/
https://patchwork.ozlabs.org/patch/461690/

so this series mirrors that one and includes the Zynq patches from that series.

I hope these can sneak in to this release so that I don't forget them again!

I have tested this on a few ARM platforms: Zynq Zybo, Beaglebone Black, pcduino3 (sunxi), Jetson-TK1 (tegra).

Changes in v2:
- Put this into common/init/ and just Makefiles accordingly
- Add comments as to why this is needed, deal with arch-specific memset()

Simon Glass (8):
Move board_init_f_mem() into a common location board_init_f_mem(): Don't require memset() board_init_f_mem(): Don't create an unused early malloc() area
arm: Switch aarch64 to using generic global_data setup
arm: Switch 32-bit ARM to using generic global_data setup
microblaze: Add a TODO to call board_init_f_mem()
zynq: Move SPL console init out of board_init_f() Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"

 arch/arm/lib/crt0.S                | 28 +++---------------
 arch/arm/lib/crt0_64.S             | 15 ++--------
 arch/arm/mach-zynq/spl.c           |  2 +-
 arch/microblaze/cpu/start.S        |  2 ++
 common/Makefile                    |  1 +
 common/board_f.c                   | 29 ------------------
 common/init/Makefile               |  7 +++++
 common/init/board_init.c           | 60 ++++++++++++++++++++++++++++++++++++++
 configs/zynq_microzed_defconfig    |  1 -
 configs/zynq_zc702_defconfig       |  1 -
 configs/zynq_zc706_defconfig       |  1 -
 configs/zynq_zc70x_defconfig       |  1 -
 configs/zynq_zc770_xm010_defconfig |  1 -
 configs/zynq_zc770_xm011_defconfig |  1 -
Quoted 9 lines
 configs/zynq_zc770_xm012_defconfig |  1 -
 configs/zynq_zc770_xm013_defconfig |  1 -
 configs/zynq_zed_defconfig         |  1 -
 configs/zynq_zybo_defconfig        |  1 -
 scripts/Makefile.spl               |  1 +
 19 files changed, 79 insertions(+), 76 deletions(-)
 create mode 100644 common/init/Makefile
 create mode 100644 common/init/board_init.c

I am getting compilation warning about USE_MEMCPY which should be resolved too.

[u-boot]$ ./tools/buildman/buildman -b xnext/serial2 zynq_zc702 -sSed boards.cfg is up to date. Nothing to do.
Summary of 9 commits for 1 boards (1 thread, 8 jobs per thread) 01: Merge branch 'master' of http://git.denx.de/u-boot-sunxi
02: Move board_init_f_mem() into a common location
03: board_init_f_mem(): Don't require memset()

       arm:  +   zynq_zc702

+ #define USE_MEMCPY
+ ^

(quoted diff) +3 -0
+In file included from ../include/common.h:1064:0,
+                 from ../common/init/board_init.c:10:
+../include/malloc.h:355:0: note: this is the location of the previous

definition
+ #define USE_MEMCPY 1 w+../common/init/board_init.c:21:0: warning: "USE_MEMCPY" redefined [enabled by default]
04: board_init_f_mem(): Don't create an unused early malloc() area 05: arm: Switch aarch64 to using generic global_data setup 06: arm: Switch 32-bit ARM to using generic global_data setup

       arm: (for 1/1 boards)  all +28.0  spl/u-boot-spl:all +28.0
spl/u-boot-spl:text +28.0  text +28.0
            zynq_zc702     :  all +28  spl/u-boot-spl:all +28
spl/u-boot-spl:text +28  text +28
07: microblaze: Add a TODO to call board_init_f_mem()
08: zynq: Move SPL console init out of board_init_f()
       arm: (for 1/1 boards)  spl/u-boot-spl:all +8.0
spl/u-boot-spl:text +8.0
            zynq_zc702     :  spl/u-boot-spl:all +8  spl/u-boot-spl:text +8
09: Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"
       arm: (for 1/1 boards)  all +257.0  rodata +37.0
spl/u-boot-spl:all +180.0  spl/u-boot-spl:text +180.0  text +220.0
            zynq_zc702     :  all +257  rodata +37  spl/u-boot-spl:all
Quoted 1 line

+180 spl/u-boot-spl:text +180 text +220

Yes, unfortunately I found that later and also I found a conflict with the malloc change also:

http://patchwork.ozlabs.org/patch/512147/

Once we figure out zynqmp I can resend it.

Regards,
Simon

maintainer
#14 lore raw

v2 cover arm: Tidy up early init

Hi Simon,

Quoted 101 lines · Simon Glass

Hi Mchal,

Quoted 96 lines · Michal Simek

Hi Simon,

Quoted 47 lines · Simon Glass

This series collects the previous RFT patches I sent out.

https://patchwork.ozlabs.org/patch/508167/
https://patchwork.ozlabs.org/patch/508168/

It turns out that I originally sent a version of these in April:

https://patchwork.ozlabs.org/patch/461687/
https://patchwork.ozlabs.org/patch/461690/

so this series mirrors that one and includes the Zynq patches from that series.

I hope these can sneak in to this release so that I don't forget them again!

I have tested this on a few ARM platforms: Zynq Zybo, Beaglebone Black, pcduino3 (sunxi), Jetson-TK1 (tegra).

Changes in v2:
- Put this into common/init/ and just Makefiles accordingly
- Add comments as to why this is needed, deal with arch-specific memset()

Simon Glass (8):
Move board_init_f_mem() into a common location board_init_f_mem(): Don't require memset() board_init_f_mem(): Don't create an unused early malloc() area
arm: Switch aarch64 to using generic global_data setup
arm: Switch 32-bit ARM to using generic global_data setup
microblaze: Add a TODO to call board_init_f_mem()
zynq: Move SPL console init out of board_init_f() Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"

 arch/arm/lib/crt0.S                | 28 +++---------------
 arch/arm/lib/crt0_64.S             | 15 ++--------
 arch/arm/mach-zynq/spl.c           |  2 +-
 arch/microblaze/cpu/start.S        |  2 ++
 common/Makefile                    |  1 +
 common/board_f.c                   | 29 ------------------
 common/init/Makefile               |  7 +++++
 common/init/board_init.c           | 60 ++++++++++++++++++++++++++++++++++++++
 configs/zynq_microzed_defconfig    |  1 -
 configs/zynq_zc702_defconfig       |  1 -
 configs/zynq_zc706_defconfig       |  1 -
 configs/zynq_zc70x_defconfig       |  1 -
 configs/zynq_zc770_xm010_defconfig |  1 -
 configs/zynq_zc770_xm011_defconfig |  1 -
Quoted 9 lines
 configs/zynq_zc770_xm012_defconfig |  1 -
 configs/zynq_zc770_xm013_defconfig |  1 -
 configs/zynq_zed_defconfig         |  1 -
 configs/zynq_zybo_defconfig        |  1 -
 scripts/Makefile.spl               |  1 +
 19 files changed, 79 insertions(+), 76 deletions(-)
 create mode 100644 common/init/Makefile
 create mode 100644 common/init/board_init.c

I am getting compilation warning about USE_MEMCPY which should be resolved too.

[u-boot]$ ./tools/buildman/buildman -b xnext/serial2 zynq_zc702 -sSed boards.cfg is up to date. Nothing to do.
Summary of 9 commits for 1 boards (1 thread, 8 jobs per thread) 01: Merge branch 'master' of http://git.denx.de/u-boot-sunxi
02: Move board_init_f_mem() into a common location
03: board_init_f_mem(): Don't require memset()

       arm:  +   zynq_zc702

+ #define USE_MEMCPY
+ ^

(quoted diff) +3 -0
+In file included from ../include/common.h:1064:0,
+                 from ../common/init/board_init.c:10:
+../include/malloc.h:355:0: note: this is the location of the previous

definition
+ #define USE_MEMCPY 1 w+../common/init/board_init.c:21:0: warning: "USE_MEMCPY" redefined [enabled by default]
04: board_init_f_mem(): Don't create an unused early malloc() area 05: arm: Switch aarch64 to using generic global_data setup 06: arm: Switch 32-bit ARM to using generic global_data setup

       arm: (for 1/1 boards)  all +28.0  spl/u-boot-spl:all +28.0
spl/u-boot-spl:text +28.0  text +28.0
            zynq_zc702     :  all +28  spl/u-boot-spl:all +28
spl/u-boot-spl:text +28  text +28
07: microblaze: Add a TODO to call board_init_f_mem()
08: zynq: Move SPL console init out of board_init_f()
       arm: (for 1/1 boards)  spl/u-boot-spl:all +8.0
spl/u-boot-spl:text +8.0
            zynq_zc702     :  spl/u-boot-spl:all +8  spl/u-boot-spl:text +8
09: Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"
       arm: (for 1/1 boards)  all +257.0  rodata +37.0
spl/u-boot-spl:all +180.0  spl/u-boot-spl:text +180.0  text +220.0
            zynq_zc702     :  all +257  rodata +37  spl/u-boot-spl:all
Quoted 1 line

+180 spl/u-boot-spl:text +180 text +220

Quoted 6 lines

Yes, unfortunately I found that later and also I found a conflict with the malloc change also:

http://patchwork.ozlabs.org/patch/512147/

Once we figure out zynqmp I can resend it.

Here is the branch with ZynqMP changes for DM.

http://git.denx.de/?p=u-boot/u-boot-microblaze.git;a=shortlog;h=refs/heads/serial-dm

I have added comments to commits.
The most problematic part for ZynqMP is that you have reverted "fdt: Fix fdtdec_get_addr_size() for 64-bit"
(sha1: 5b34436035fc862b5e8d0d2c3eab74ba36f1a7f4) which is able to handle address-cells = 2, size-cells = 1 case which ZynqMP is using.

Anyway you should be able to run u-boot on qemu.
Here is the log I am getting.

[qemu]$ ./aarch64-softmmu/qemu-system-aarch64 -M xlnx-ep108 -display none -kernel /mnt/disk/u-boot/u-boot.elf -m 8000000 -nographic -serial mon:stdio
qemu-system-aarch64: WARNING: RAM size 7a120000000 above max supported, reduced to 80000000

U-Boot 2015.10-rc2-00326-g13bbf74f7d63 (Sep 03 2015 - 13:11:47 +0200) Xilinx ZynqMP

I2C:   ready
DRAM:  1 GiB

Enabling Caches...
EL Level: EL1
MMC: zynq_sdhci: 0
Using default environment

In:    serial at ff000000
Out:   serial at ff000000
Err:   serial at ff000000

Invalid Boot Mode:0x0
SCSI: AHCI 0000.0000 1 slots 1 ports ? Gbps 0x0 impl SATA mode flags:
scanning bus for devices...
Found 0 device(s).
Net: Gem.ff0b0000
Warning: Gem.ff0b0000 (eth0) using random MAC address - 8e:46:f3:b5:70:eb

Hit any key to stop autoboot: 0
ZynqMP> QEMU: Terminated
[qemu]$

Please let me know if you need any input on this.

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150903/520caf24/attachment.sig>
#15 lore raw

v2 cover arm: Tidy up early init

Hi Michal,

Quoted 152 lines · Michal Simek

Hi Simon,

Quoted 101 lines · Simon Glass

Hi Mchal,

Quoted 96 lines · Michal Simek

Hi Simon,

Quoted 47 lines · Simon Glass

This series collects the previous RFT patches I sent out.

https://patchwork.ozlabs.org/patch/508167/
https://patchwork.ozlabs.org/patch/508168/

It turns out that I originally sent a version of these in April:

https://patchwork.ozlabs.org/patch/461687/
https://patchwork.ozlabs.org/patch/461690/

so this series mirrors that one and includes the Zynq patches from that series.

I hope these can sneak in to this release so that I don't forget them again!

I have tested this on a few ARM platforms: Zynq Zybo, Beaglebone Black, pcduino3 (sunxi), Jetson-TK1 (tegra).

Changes in v2:
- Put this into common/init/ and just Makefiles accordingly
- Add comments as to why this is needed, deal with arch-specific memset()

Simon Glass (8):
Move board_init_f_mem() into a common location board_init_f_mem(): Don't require memset() board_init_f_mem(): Don't create an unused early malloc() area
arm: Switch aarch64 to using generic global_data setup
arm: Switch 32-bit ARM to using generic global_data setup
microblaze: Add a TODO to call board_init_f_mem()
zynq: Move SPL console init out of board_init_f() Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"

 arch/arm/lib/crt0.S                | 28 +++---------------
 arch/arm/lib/crt0_64.S             | 15 ++--------
 arch/arm/mach-zynq/spl.c           |  2 +-
 arch/microblaze/cpu/start.S        |  2 ++
 common/Makefile                    |  1 +
 common/board_f.c                   | 29 ------------------
 common/init/Makefile               |  7 +++++
 common/init/board_init.c           | 60 ++++++++++++++++++++++++++++++++++++++
 configs/zynq_microzed_defconfig    |  1 -
 configs/zynq_zc702_defconfig       |  1 -
 configs/zynq_zc706_defconfig       |  1 -
 configs/zynq_zc70x_defconfig       |  1 -
 configs/zynq_zc770_xm010_defconfig |  1 -
 configs/zynq_zc770_xm011_defconfig |  1 -
Quoted 9 lines
 configs/zynq_zc770_xm012_defconfig |  1 -
 configs/zynq_zc770_xm013_defconfig |  1 -
 configs/zynq_zed_defconfig         |  1 -
 configs/zynq_zybo_defconfig        |  1 -
 scripts/Makefile.spl               |  1 +
 19 files changed, 79 insertions(+), 76 deletions(-)
 create mode 100644 common/init/Makefile
 create mode 100644 common/init/board_init.c

I am getting compilation warning about USE_MEMCPY which should be resolved too.

[u-boot]$ ./tools/buildman/buildman -b xnext/serial2 zynq_zc702 -sSed boards.cfg is up to date. Nothing to do.
Summary of 9 commits for 1 boards (1 thread, 8 jobs per thread) 01: Merge branch 'master' of http://git.denx.de/u-boot-sunxi
02: Move board_init_f_mem() into a common location
03: board_init_f_mem(): Don't require memset()

       arm:  +   zynq_zc702

+ #define USE_MEMCPY
+ ^

(quoted diff) +3 -0
+In file included from ../include/common.h:1064:0,
+                 from ../common/init/board_init.c:10:
+../include/malloc.h:355:0: note: this is the location of the previous

definition
+ #define USE_MEMCPY 1 w+../common/init/board_init.c:21:0: warning: "USE_MEMCPY" redefined [enabled by default]
04: board_init_f_mem(): Don't create an unused early malloc() area 05: arm: Switch aarch64 to using generic global_data setup 06: arm: Switch 32-bit ARM to using generic global_data setup

       arm: (for 1/1 boards)  all +28.0  spl/u-boot-spl:all +28.0
spl/u-boot-spl:text +28.0  text +28.0
            zynq_zc702     :  all +28  spl/u-boot-spl:all +28
spl/u-boot-spl:text +28  text +28
07: microblaze: Add a TODO to call board_init_f_mem()
08: zynq: Move SPL console init out of board_init_f()
       arm: (for 1/1 boards)  spl/u-boot-spl:all +8.0
spl/u-boot-spl:text +8.0
            zynq_zc702     :  spl/u-boot-spl:all +8  spl/u-boot-spl:text +8
09: Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot"
       arm: (for 1/1 boards)  all +257.0  rodata +37.0
spl/u-boot-spl:all +180.0  spl/u-boot-spl:text +180.0  text +220.0
            zynq_zc702     :  all +257  rodata +37  spl/u-boot-spl:all
Quoted 1 line

+180 spl/u-boot-spl:text +180 text +220

Quoted 6 lines

Yes, unfortunately I found that later and also I found a conflict with the malloc change also:

http://patchwork.ozlabs.org/patch/512147/

Once we figure out zynqmp I can resend it.

Here is the branch with ZynqMP changes for DM.

http://git.denx.de/?p=u-boot/u-boot-microblaze.git;a=shortlog;h=refs/heads/serial-dm

I have added comments to commits.
The most problematic part for ZynqMP is that you have reverted "fdt: Fix fdtdec_get_addr_size() for 64-bit"
(sha1: 5b34436035fc862b5e8d0d2c3eab74ba36f1a7f4) which is able to handle address-cells = 2, size-cells = 1 case which ZynqMP is using.

Anyway you should be able to run u-boot on qemu.
Here is the log I am getting.

[qemu]$ ./aarch64-softmmu/qemu-system-aarch64 -M xlnx-ep108 -display none -kernel /mnt/disk/u-boot/u-boot.elf -m 8000000 -nographic -serial mon:stdio
qemu-system-aarch64: WARNING: RAM size 7a120000000 above max supported, reduced to 80000000

U-Boot 2015.10-rc2-00326-g13bbf74f7d63 (Sep 03 2015 - 13:11:47 +0200) Xilinx ZynqMP

I2C:   ready
DRAM:  1 GiB
Enabling Caches...
EL Level:       EL1
MMC:   zynq_sdhci: 0

Using default environment

In:    serial at ff000000
Out:   serial at ff000000
Err:   serial at ff000000

Invalid Boot Mode:0x0
SCSI: AHCI 0000.0000 1 slots 1 ports ? Gbps 0x0 impl SATA mode flags:
scanning bus for devices...
Found 0 device(s).
Net: Gem.ff0b0000
Warning: Gem.ff0b0000 (eth0) using random MAC address - 8e:46:f3:b5:70:eb

Quoted 6 lines

Hit any key to stop autoboot: 0
ZynqMP> QEMU: Terminated
[qemu]$

Please let me know if you need any input on this.

I followed up on the other thread.

But for the memalign issue I've come up with two new patches:

http://patchwork.ozlabs.org/patch/513690/
http://patchwork.ozlabs.org/patch/513779/

Regards,
Simon