All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] xilinx: common: Several minor fixups
@ 2020-10-22 10:32 Michal Simek
  2020-10-22 10:32 ` [PATCH 01/10] arm64: zynqmp: Fix zynqmp mini qspi max frequency Michal Simek
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

Hi,

I am sending some patches to fix minor stuff. There are several things as
setting up proper variables, enabling commands.
This series is based on my latest patches I have sent.

Thanks,
Michal


Michal Simek (7):
  xilinx: common: Protect board_late_init_xilinx()
  xilinx: Enable FRU command for all ARM based platforms
  xilinx: zynq: Change types from u32 to uint32_t
  xilinx: zynq: Enable AES command
  xilinx: Enable SF_TEST command for all ARM based platforms
  xilinx: Remove additional newline in config files
  xilinx: Merge together BOOT_SCRIPT_OFFSET between MB and ARM

Siva Durga Prasad Paladugu (1):
  arm64: versal: Set initrd_high to as high as possible

T Karthik Reddy (2):
  arm64: zynqmp: Fix zynqmp mini qspi max frequency
  xilinx: Add DDR base address to bootscript address

 arch/arm/dts/zynqmp-mini-qspi.dts       |  2 +-
 arch/microblaze/Kconfig                 |  1 +
 board/xilinx/Kconfig                    |  6 +++---
 board/xilinx/common/board.c             | 11 +++++++++++
 board/xilinx/microblaze-generic/Kconfig |  5 -----
 board/xilinx/versal/board.c             |  4 ++++
 configs/xilinx_versal_virt_defconfig    |  2 ++
 configs/xilinx_zynq_virt_defconfig      |  3 +++
 configs/xilinx_zynqmp_virt_defconfig    |  2 ++
 include/configs/xilinx_versal.h         |  1 -
 include/configs/xilinx_versal_mini.h    |  1 -
 include/configs/xilinx_zynqmp_mini.h    |  1 -
 include/u-boot/rsa-mod-exp.h            |  2 +-
 lib/rsa/rsa-mod-exp.c                   |  2 +-
 14 files changed, 29 insertions(+), 14 deletions(-)

-- 
2.28.0

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

* [PATCH 01/10] arm64: zynqmp: Fix zynqmp mini qspi max frequency
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 10:32 ` [PATCH 02/10] xilinx: common: Protect board_late_init_xilinx() Michal Simek
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

From: T Karthik Reddy <t.karthik.reddy@xilinx.com>

For zynqmp qspi, frequencies up to 40MHz will work irrespective
of feedback clock enabled or disabled. If we want higher than
40Mhz the feedback clock should be enabled.

With spi-max-frequency 108MHz it is not working when the feedback
clock is disabled. Change it to 40MHz so that it works irrespective
of feedback clock enabled or disabled.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Acked-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/arm/dts/zynqmp-mini-qspi.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/dts/zynqmp-mini-qspi.dts b/arch/arm/dts/zynqmp-mini-qspi.dts
index a76e6404661e..9b4320fe6e20 100644
--- a/arch/arm/dts/zynqmp-mini-qspi.dts
+++ b/arch/arm/dts/zynqmp-mini-qspi.dts
@@ -70,7 +70,7 @@
 		reg = <0x0>;
 		spi-tx-bus-width = <1>;
 		spi-rx-bus-width = <4>;
-		spi-max-frequency = <108000000>;
+		spi-max-frequency = <40000000>;
 	};
 };
 
-- 
2.28.0

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

* [PATCH 02/10] xilinx: common: Protect board_late_init_xilinx()
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
  2020-10-22 10:32 ` [PATCH 01/10] arm64: zynqmp: Fix zynqmp mini qspi max frequency Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 10:32 ` [PATCH 03/10] xilinx: Add DDR base address to bootscript address Michal Simek
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

Do not call board_late_init_xilinx() when BOARD_LATE_INIT is not enabled.

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

 board/xilinx/common/board.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 74e81c18bd5a..821ee836dd84 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -352,6 +352,7 @@ void *board_fdt_blob_setup(void)
 }
 #endif
 
+#if defined(CONFIG_BOARD_LATE_INIT)
 static int env_set_by_index(const char *name, int index, char *data)
 {
 	char var[32];
@@ -414,3 +415,4 @@ int board_late_init_xilinx(void)
 
 	return 0;
 }
+#endif
-- 
2.28.0

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

* [PATCH 03/10] xilinx: Add DDR base address to bootscript address
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
  2020-10-22 10:32 ` [PATCH 01/10] arm64: zynqmp: Fix zynqmp mini qspi max frequency Michal Simek
  2020-10-22 10:32 ` [PATCH 02/10] xilinx: common: Protect board_late_init_xilinx() Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 10:32 ` [PATCH 04/10] xilinx: Enable FRU command for all ARM based platforms Michal Simek
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

From: T Karthik Reddy <t.karthik.reddy@xilinx.com>

Add ram base address to scriptaddr env variable to make boot
script address to be a valid address when ddr base address changes.

This works properly if the first memory region is the region where uboot
runs. Also the solution was taken in respect of a lot of jtag script
putting u-boot script to certain address. For standard cases
bd->bi_dram[0].start is 0 all the time. Only for systems with DDR placed
out of this location it does calculation.

This is not the best solution and should be done differently in future but
enough for now till we don't have full solution ready yet.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 board/xilinx/common/board.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 821ee836dd84..857a66a50407 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -371,6 +371,15 @@ int board_late_init_xilinx(void)
 	int i, id, macid = 0;
 	struct xilinx_board_description *desc;
 	phys_size_t bootm_size = gd->ram_size;
+	struct bd_info *bd = gd->bd;
+
+	if (bd->bi_dram[0].start) {
+		ulong scriptaddr;
+
+		scriptaddr = env_get_hex("scriptaddr", 0);
+		ret |= env_set_hex("scriptaddr",
+				   bd->bi_dram[0].start + scriptaddr);
+	}
 
 	if (CONFIG_IS_ENABLED(ARCH_ZYNQ))
 		bootm_size = min(bootm_size, (phys_size_t)(SZ_512M + SZ_256M));
-- 
2.28.0

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

* [PATCH 04/10] xilinx: Enable FRU command for all ARM based platforms
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
                   ` (2 preceding siblings ...)
  2020-10-22 10:32 ` [PATCH 03/10] xilinx: Add DDR base address to bootscript address Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 10:32 ` [PATCH 05/10] xilinx: zynq: Change types from u32 to uint32_t Michal Simek
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

Enable it by default for board detection.

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

 configs/xilinx_versal_virt_defconfig | 1 +
 configs/xilinx_zynq_virt_defconfig   | 1 +
 configs/xilinx_zynqmp_virt_defconfig | 1 +
 3 files changed, 3 insertions(+)

diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig
index b6ca566ed8cd..34ff8ddde0c1 100644
--- a/configs/xilinx_versal_virt_defconfig
+++ b/configs/xilinx_versal_virt_defconfig
@@ -4,6 +4,7 @@ CONFIG_ARCH_VERSAL=y
 CONFIG_SYS_TEXT_BASE=0x8000000
 CONFIG_SYS_MALLOC_F_LEN=0x100000
 CONFIG_DM_GPIO=y
+CONFIG_CMD_FRU=y
 CONFIG_DEFINE_TCM_OCM_MMAP=y
 CONFIG_COUNTER_FREQUENCY=100000000
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index df3da763c500..439a4fe6e539 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
 CONFIG_DM_GPIO=y
 CONFIG_SPL_STACK_R_ADDR=0x200000
 CONFIG_SPL=y
+CONFIG_CMD_FRU=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_CUSTOM_LDSCRIPT=y
diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig
index 01b2f18a057a..8937658a25d5 100644
--- a/configs/xilinx_zynqmp_virt_defconfig
+++ b/configs/xilinx_zynqmp_virt_defconfig
@@ -9,6 +9,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_ZYNQ_MAC_IN_EEPROM=y
 CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0x20
+CONFIG_CMD_FRU=y
 CONFIG_ZYNQMP_USB=y
 CONFIG_DEFAULT_DEVICE_TREE="zynqmp-zcu100-revC"
 CONFIG_AHCI=y
-- 
2.28.0

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

* [PATCH 05/10] xilinx: zynq: Change types from u32 to uint32_t
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
                   ` (3 preceding siblings ...)
  2020-10-22 10:32 ` [PATCH 04/10] xilinx: Enable FRU command for all ARM based platforms Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 10:32 ` [PATCH 06/10] xilinx: zynq: Enable AES command Michal Simek
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

Change parameter type to avoid compilation error:
In file included from ./tools/../lib/rsa/rsa-verify.c:23:0,
                 from tools/lib/rsa/rsa-verify.c:1:
include/u-boot/rsa-mod-exp.h:69:18: error: unknown type name ?u32?; did you mean ?__u32??
 int zynq_pow_mod(u32 *keyptr, u32 *inout);
                  ^~~
                  __u32
include/u-boot/rsa-mod-exp.h:69:31: error: unknown type name ?u32?; did you mean ?__u32??
 int zynq_pow_mod(u32 *keyptr, u32 *inout);
                               ^~~
                               __u32

Fixes: 37e3a36a5475 ("xilinx: zynq: Add support to secure images")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 include/u-boot/rsa-mod-exp.h | 2 +-
 lib/rsa/rsa-mod-exp.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/u-boot/rsa-mod-exp.h b/include/u-boot/rsa-mod-exp.h
index 1da8af1bb83d..7b7c2915a94b 100644
--- a/include/u-boot/rsa-mod-exp.h
+++ b/include/u-boot/rsa-mod-exp.h
@@ -66,7 +66,7 @@ int rsa_mod_exp(struct udevice *dev, const uint8_t *sig, uint32_t sig_len,
 		struct key_prop *node, uint8_t *out);
 
 #if defined(CONFIG_CMD_ZYNQ_RSA)
-int zynq_pow_mod(u32 *keyptr, u32 *inout);
+int zynq_pow_mod(uint32_t *keyptr, uint32_t *inout);
 #endif
 
 /**
diff --git a/lib/rsa/rsa-mod-exp.c b/lib/rsa/rsa-mod-exp.c
index 78c688d14c33..74f9eb16cc26 100644
--- a/lib/rsa/rsa-mod-exp.c
+++ b/lib/rsa/rsa-mod-exp.c
@@ -321,7 +321,7 @@ int rsa_mod_exp_sw(const uint8_t *sig, uint32_t sig_len,
  *        pow_mod calculation required for zynq is bit different from
  *        pw_mod above here, hence defined zynq specific routine.
  */
-int zynq_pow_mod(u32 *keyptr, u32 *inout)
+int zynq_pow_mod(uint32_t *keyptr, uint32_t *inout)
 {
 	u32 *result, *ptr;
 	uint i;
-- 
2.28.0

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

* [PATCH 06/10] xilinx: zynq: Enable AES command
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
                   ` (4 preceding siblings ...)
  2020-10-22 10:32 ` [PATCH 05/10] xilinx: zynq: Change types from u32 to uint32_t Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 10:32 ` [PATCH 07/10] xilinx: Enable SF_TEST command for all ARM based platforms Michal Simek
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

Enable AES command to be able to use it directly.

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

 configs/xilinx_zynq_virt_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index 439a4fe6e539..09820d76a61a 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -7,6 +7,7 @@ CONFIG_DM_GPIO=y
 CONFIG_SPL_STACK_R_ADDR=0x200000
 CONFIG_SPL=y
 CONFIG_CMD_FRU=y
+CONFIG_CMD_ZYNQ_AES=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_CUSTOM_LDSCRIPT=y
-- 
2.28.0

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

* [PATCH 07/10] xilinx: Enable SF_TEST command for all ARM based platforms
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
                   ` (5 preceding siblings ...)
  2020-10-22 10:32 ` [PATCH 06/10] xilinx: zynq: Enable AES command Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 10:32 ` [PATCH 08/10] xilinx: Remove additional newline in config files Michal Simek
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

Enable this command by default.

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

 configs/xilinx_versal_virt_defconfig | 1 +
 configs/xilinx_zynq_virt_defconfig   | 1 +
 configs/xilinx_zynqmp_virt_defconfig | 1 +
 3 files changed, 3 insertions(+)

diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig
index 34ff8ddde0c1..40a8cfd5ccc7 100644
--- a/configs/xilinx_versal_virt_defconfig
+++ b/configs/xilinx_versal_virt_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_MTD=y
+CONFIG_CMD_SF_TEST=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_TFTPPUT=y
 CONFIG_CMD_CACHE=y
diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index 09820d76a61a..da84c01b0a1a 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -42,6 +42,7 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_MTD=y
 CONFIG_CMD_NAND_LOCK_UNLOCK=y
+CONFIG_CMD_SF_TEST=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_TFTPPUT=y
diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig
index 8937658a25d5..0c816de707ac 100644
--- a/configs/xilinx_zynqmp_virt_defconfig
+++ b/configs/xilinx_zynqmp_virt_defconfig
@@ -49,6 +49,7 @@ CONFIG_CMD_MTD=y
 CONFIG_CMD_NAND_LOCK_UNLOCK=y
 CONFIG_CMD_POWEROFF=y
 CONFIG_CMD_SDRAM=y
+CONFIG_CMD_SF_TEST=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_MASS_STORAGE=y
-- 
2.28.0

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

* [PATCH 08/10] xilinx: Remove additional newline in config files
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
                   ` (6 preceding siblings ...)
  2020-10-22 10:32 ` [PATCH 07/10] xilinx: Enable SF_TEST command for all ARM based platforms Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 10:32 ` [PATCH 09/10] xilinx: Merge together BOOT_SCRIPT_OFFSET between MB and ARM Michal Simek
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

Trivial fix.

Fixes: e519f03a1846 ("cmd: mem: Remove CONFIG_SYS_MEMTEST_SCRATCH mapping")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 include/configs/xilinx_versal.h      | 1 -
 include/configs/xilinx_versal_mini.h | 1 -
 include/configs/xilinx_zynqmp_mini.h | 1 -
 3 files changed, 3 deletions(-)

diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
index 8b416327b57c..f1d2594f3b32 100644
--- a/include/configs/xilinx_versal.h
+++ b/include/configs/xilinx_versal.h
@@ -18,7 +18,6 @@
 #define GICD_BASE	0xF9000000
 #define GICR_BASE	0xF9080000
 
-
 #define CONFIG_SYS_INIT_SP_ADDR		CONFIG_SYS_TEXT_BASE
 
 /* Generic Timer Definitions - setup in EL3. Setup by ATF for other cases */
diff --git a/include/configs/xilinx_versal_mini.h b/include/configs/xilinx_versal_mini.h
index 0b201a2b4d69..00c971881985 100644
--- a/include/configs/xilinx_versal_mini.h
+++ b/include/configs/xilinx_versal_mini.h
@@ -10,7 +10,6 @@
 #ifndef __CONFIG_VERSAL_MINI_H
 #define __CONFIG_VERSAL_MINI_H
 
-
 #define CONFIG_EXTRA_ENV_SETTINGS
 
 #include <configs/xilinx_versal.h>
diff --git a/include/configs/xilinx_zynqmp_mini.h b/include/configs/xilinx_zynqmp_mini.h
index 3f57423b7898..ef9c768e48eb 100644
--- a/include/configs/xilinx_zynqmp_mini.h
+++ b/include/configs/xilinx_zynqmp_mini.h
@@ -10,7 +10,6 @@
 #ifndef __CONFIG_ZYNQMP_MINI_H
 #define __CONFIG_ZYNQMP_MINI_H
 
-
 #define CONFIG_EXTRA_ENV_SETTINGS
 
 #include <configs/xilinx_zynqmp.h>
-- 
2.28.0

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

* [PATCH 09/10] xilinx: Merge together BOOT_SCRIPT_OFFSET between MB and ARM
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
                   ` (7 preceding siblings ...)
  2020-10-22 10:32 ` [PATCH 08/10] xilinx: Remove additional newline in config files Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 10:32 ` [PATCH 10/10] arm64: versal: Set initrd_high to as high as possible Michal Simek
  2020-10-27  7:27 ` [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

There is no reason not to use commong Kconfig by Microblaze too.

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

 arch/microblaze/Kconfig                 | 1 +
 board/xilinx/Kconfig                    | 6 +++---
 board/xilinx/microblaze-generic/Kconfig | 5 -----
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 2755cce884c5..99a17bccb388 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -23,6 +23,7 @@ config TARGET_MICROBLAZE_GENERIC
 
 endchoice
 
+source "board/xilinx/Kconfig"
 source "board/xilinx/microblaze-generic/Kconfig"
 
 endmenu
diff --git a/board/xilinx/Kconfig b/board/xilinx/Kconfig
index 51f6d2bac8ad..64507b5d8438 100644
--- a/board/xilinx/Kconfig
+++ b/board/xilinx/Kconfig
@@ -50,12 +50,12 @@ config XILINX_OF_BOARD_DTB_ADDR
 
 config BOOT_SCRIPT_OFFSET
 	hex "Boot script offset"
-	depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
-	default 0xFC0000 if ARCH_ZYNQ
+	depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || MICROBLAZE
+	default 0xFC0000 if ARCH_ZYNQ || MICROBLAZE
 	default 0x3E80000 if ARCH_ZYNQMP
 	default 0x7F80000 if ARCH_VERSAL
 	help
-	   Specifies distro boot script offset in NAND/NOR flash.
+	   Specifies distro boot script offset in NAND/QSPI/NOR flash.
 
 config ZYNQ_MAC_IN_EEPROM
 	bool "Reading MAC address from EEPROM"
diff --git a/board/xilinx/microblaze-generic/Kconfig b/board/xilinx/microblaze-generic/Kconfig
index 7a97211a1ecd..f2fa0f72b13f 100644
--- a/board/xilinx/microblaze-generic/Kconfig
+++ b/board/xilinx/microblaze-generic/Kconfig
@@ -38,9 +38,4 @@ config XILINX_MICROBLAZE0_HW_VER
 	string "Core version number"
 	default "7.10.d"
 
-config BOOT_SCRIPT_OFFSET
-        hex "Boot script offset"
-        default 0xFC0000
-        help
-           Specifies distro boot script offset in NAND/QSPI flash.
 endif
-- 
2.28.0

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

* [PATCH 10/10] arm64: versal: Set initrd_high to as high as possible
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
                   ` (8 preceding siblings ...)
  2020-10-22 10:32 ` [PATCH 09/10] xilinx: Merge together BOOT_SCRIPT_OFFSET between MB and ARM Michal Simek
@ 2020-10-22 10:32 ` Michal Simek
  2020-10-22 17:45   ` Tom Rini
  2020-10-27  7:27 ` [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
  10 siblings, 1 reply; 15+ messages in thread
From: Michal Simek @ 2020-10-22 10:32 UTC (permalink / raw)
  To: u-boot

From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

This patch is setting up the initrd_high to as high as possible by leaving
max stack size for u-boot so that bigger rootfs can also be loaded by
u-boot for booting kernel.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 board/xilinx/versal/board.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 912c1143a8ad..09229e0a75a4 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -217,6 +217,10 @@ 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();
 }
 
-- 
2.28.0

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

* [PATCH 10/10] arm64: versal: Set initrd_high to as high as possible
  2020-10-22 10:32 ` [PATCH 10/10] arm64: versal: Set initrd_high to as high as possible Michal Simek
@ 2020-10-22 17:45   ` Tom Rini
  2020-10-23  5:43     ` Michal Simek
  0 siblings, 1 reply; 15+ messages in thread
From: Tom Rini @ 2020-10-22 17:45 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 22, 2020 at 12:32:22PM +0200, Michal Simek wrote:

> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> 
> This patch is setting up the initrd_high to as high as possible by leaving
> max stack size for u-boot so that bigger rootfs can also be loaded by
> u-boot for booting kernel.
> 
> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
>  board/xilinx/versal/board.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
> index 912c1143a8ad..09229e0a75a4 100644
> --- a/board/xilinx/versal/board.c
> +++ b/board/xilinx/versal/board.c
> @@ -217,6 +217,10 @@ 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();
>  }

My concern here (and also microblaze-generic, after some grepping) is
that wouldn't it be best to set bootm_size and let fdt and initrd be
relocated as needed?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201022/85822e0d/attachment.sig>

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

* [PATCH 10/10] arm64: versal: Set initrd_high to as high as possible
  2020-10-22 17:45   ` Tom Rini
@ 2020-10-23  5:43     ` Michal Simek
  2020-10-27  7:29       ` Michal Simek
  0 siblings, 1 reply; 15+ messages in thread
From: Michal Simek @ 2020-10-23  5:43 UTC (permalink / raw)
  To: u-boot



On 22. 10. 20 19:45, Tom Rini wrote:
> On Thu, Oct 22, 2020 at 12:32:22PM +0200, Michal Simek wrote:
>
>> From: Siva Durga Prasad Paladugu
>> <siva.durga.paladugu@xilinx.com>
>>
>> This patch is setting up the initrd_high to as high as possible
>> by leaving max stack size for u-boot so that bigger rootfs can
>> also be loaded by u-boot for booting kernel.
>>
>> Signed-off-by: Siva Durga Prasad Paladugu
>> <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek
>> <michal.simek@xilinx.com> ---
>>
>> board/xilinx/versal/board.c | 4 ++++ 1 file changed, 4
>> insertions(+)
>>
>> diff --git a/board/xilinx/versal/board.c
>> b/board/xilinx/versal/board.c index 912c1143a8ad..09229e0a75a4
>> 100644 --- a/board/xilinx/versal/board.c +++
>> b/board/xilinx/versal/board.c @@ -217,6 +217,10 @@ 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(); }
>
> My concern here (and also microblaze-generic, after some grepping)
> is that wouldn't it be best to set bootm_size and let fdt and
> initrd be relocated as needed?

You are right and I have already done it in this way but forget to
remove this patch from my queue. Will drop this patch.

Thanks,
Michal

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

* [PATCH 00/10] xilinx: common: Several minor fixups
  2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
                   ` (9 preceding siblings ...)
  2020-10-22 10:32 ` [PATCH 10/10] arm64: versal: Set initrd_high to as high as possible Michal Simek
@ 2020-10-27  7:27 ` Michal Simek
  10 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-27  7:27 UTC (permalink / raw)
  To: u-boot

?t 22. 10. 2020 v 12:32 odes?latel Michal Simek
<michal.simek@xilinx.com> napsal:
>
> Hi,
>
> I am sending some patches to fix minor stuff. There are several things as
> setting up proper variables, enabling commands.
> This series is based on my latest patches I have sent.
>
> Thanks,
> Michal
>
>
> Michal Simek (7):
>   xilinx: common: Protect board_late_init_xilinx()
>   xilinx: Enable FRU command for all ARM based platforms
>   xilinx: zynq: Change types from u32 to uint32_t
>   xilinx: zynq: Enable AES command
>   xilinx: Enable SF_TEST command for all ARM based platforms
>   xilinx: Remove additional newline in config files
>   xilinx: Merge together BOOT_SCRIPT_OFFSET between MB and ARM
>
> Siva Durga Prasad Paladugu (1):
>   arm64: versal: Set initrd_high to as high as possible
>
> T Karthik Reddy (2):
>   arm64: zynqmp: Fix zynqmp mini qspi max frequency
>   xilinx: Add DDR base address to bootscript address
>
>  arch/arm/dts/zynqmp-mini-qspi.dts       |  2 +-
>  arch/microblaze/Kconfig                 |  1 +
>  board/xilinx/Kconfig                    |  6 +++---
>  board/xilinx/common/board.c             | 11 +++++++++++
>  board/xilinx/microblaze-generic/Kconfig |  5 -----
>  board/xilinx/versal/board.c             |  4 ++++
>  configs/xilinx_versal_virt_defconfig    |  2 ++
>  configs/xilinx_zynq_virt_defconfig      |  3 +++
>  configs/xilinx_zynqmp_virt_defconfig    |  2 ++
>  include/configs/xilinx_versal.h         |  1 -
>  include/configs/xilinx_versal_mini.h    |  1 -
>  include/configs/xilinx_zynqmp_mini.h    |  1 -
>  include/u-boot/rsa-mod-exp.h            |  2 +-
>  lib/rsa/rsa-mod-exp.c                   |  2 +-
>  14 files changed, 29 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] 15+ messages in thread

* [PATCH 10/10] arm64: versal: Set initrd_high to as high as possible
  2020-10-23  5:43     ` Michal Simek
@ 2020-10-27  7:29       ` Michal Simek
  0 siblings, 0 replies; 15+ messages in thread
From: Michal Simek @ 2020-10-27  7:29 UTC (permalink / raw)
  To: u-boot

p? 23. 10. 2020 v 7:44 odes?latel Michal Simek <michal.simek@xilinx.com> napsal:
>
>
>
> On 22. 10. 20 19:45, Tom Rini wrote:
> > On Thu, Oct 22, 2020 at 12:32:22PM +0200, Michal Simek wrote:
> >
> >> From: Siva Durga Prasad Paladugu
> >> <siva.durga.paladugu@xilinx.com>
> >>
> >> This patch is setting up the initrd_high to as high as possible
> >> by leaving max stack size for u-boot so that bigger rootfs can
> >> also be loaded by u-boot for booting kernel.
> >>
> >> Signed-off-by: Siva Durga Prasad Paladugu
> >> <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek
> >> <michal.simek@xilinx.com> ---
> >>
> >> board/xilinx/versal/board.c | 4 ++++ 1 file changed, 4
> >> insertions(+)
> >>
> >> diff --git a/board/xilinx/versal/board.c
> >> b/board/xilinx/versal/board.c index 912c1143a8ad..09229e0a75a4
> >> 100644 --- a/board/xilinx/versal/board.c +++
> >> b/board/xilinx/versal/board.c @@ -217,6 +217,10 @@ 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(); }
> >
> > My concern here (and also microblaze-generic, after some grepping)
> > is that wouldn't it be best to set bootm_size and let fdt and
> > initrd be relocated as needed?
>
> You are right and I have already done it in this way but forget to
> remove this patch from my queue. Will drop this patch.
>
> Thanks,
> Michal

This patch has been dropped from the series.
1-9 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] 15+ messages in thread

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

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 10:32 [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek
2020-10-22 10:32 ` [PATCH 01/10] arm64: zynqmp: Fix zynqmp mini qspi max frequency Michal Simek
2020-10-22 10:32 ` [PATCH 02/10] xilinx: common: Protect board_late_init_xilinx() Michal Simek
2020-10-22 10:32 ` [PATCH 03/10] xilinx: Add DDR base address to bootscript address Michal Simek
2020-10-22 10:32 ` [PATCH 04/10] xilinx: Enable FRU command for all ARM based platforms Michal Simek
2020-10-22 10:32 ` [PATCH 05/10] xilinx: zynq: Change types from u32 to uint32_t Michal Simek
2020-10-22 10:32 ` [PATCH 06/10] xilinx: zynq: Enable AES command Michal Simek
2020-10-22 10:32 ` [PATCH 07/10] xilinx: Enable SF_TEST command for all ARM based platforms Michal Simek
2020-10-22 10:32 ` [PATCH 08/10] xilinx: Remove additional newline in config files Michal Simek
2020-10-22 10:32 ` [PATCH 09/10] xilinx: Merge together BOOT_SCRIPT_OFFSET between MB and ARM Michal Simek
2020-10-22 10:32 ` [PATCH 10/10] arm64: versal: Set initrd_high to as high as possible Michal Simek
2020-10-22 17:45   ` Tom Rini
2020-10-23  5:43     ` Michal Simek
2020-10-27  7:29       ` Michal Simek
2020-10-27  7:27 ` [PATCH 00/10] xilinx: common: Several minor fixups Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.