Skip to contentSkip to conversation

ARM: zynq: Remove memory division by 2 for ECC case

PATCH New Michal Simek 3 participants 11 messages Jan 14, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/9 ARM: zynq: Remove memory division by 2 for ECC case

For ECC case u-boot divided memory by 2 because one u-boot could be used for both cases when ECC is off or on.
Remove this division and make sure that dts file contain the correct memory size when ECC is enabled.

---

 arch/arm/mach-zynq/ddrc.c | 2 --
 1 file changed, 2 deletions(-)
arch/arm/mach-zynq/ddrc.c +0 -2
index 5b20accbcb17..d74f8dbbc45d 100644
@@ -42,8 +42,6 @@ void zynq_ddrc_init(void)
 		 */
 		/* cppcheck-suppress nullPointer */
 		memset((void *)0, 0, 1 * 1024 * 1024);
-
-		gd->ram_size /= 2;
 	} else {
 		puts("ECC disabled ");
 	}
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/9 ARM: zynq: Do not select options if SPL is not enabled

Zynq setups some default options for SPL but not all targets are enabling SPL.

---

 arch/arm/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/Kconfig +3 -3
index 9bd6cf1d807d..8c6c35bb0f43 100644
@@ -551,15 +551,15 @@ config ARCH_ZYNQ
 	select CPU_V7
 	select SUPPORT_SPL
 	select OF_CONTROL
-	select SPL_OF_CONTROL
+	select SPL_OF_CONTROL if SPL
 	select DM
 	select DM_ETH
-	select SPL_DM
+	select SPL_DM if SPL
 	select DM_MMC
 	select DM_SPI
 	select DM_SERIAL
 	select DM_SPI_FLASH
-	select SPL_SEPARATE_BSS
+	select SPL_SEPARATE_BSS if SPL
 
 config ARCH_ZYNQMP
 	bool "Support Xilinx ZynqMP Platform"
Signature · 1 line
1.9.1
#2 lore raw

PATCH 3/9 ARM: zynq: Define sys prompt for all Zynq boards

In reply to Michal Simek

From: Siva Durga Prasad Paladugu <[email protected]>

Define CONFIG_SYS_PROMPT for all Zynq boards

It was removed by:
"kconfig: add config option for shell prompt"
(sha1: 181bd9dc61d2da88b78f1c1138a685dae39354d6)

---

 configs/zynq_microzed_defconfig    | 1 +
 configs/zynq_picozed_defconfig     | 1 +
 configs/zynq_zc702_defconfig       | 1 +
 configs/zynq_zc706_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 insertions(+)
configs/zynq_microzed_defconfig +1 -0
index e577c931735e..221c5a88d1bc 100644
@@ -6,6 +6,7 @@ CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
+CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
configs/zynq_picozed_defconfig +1 -0
index 7d52d8e941b7..302d17f96885 100644
@@ -3,6 +3,7 @@ CONFIG_ARCH_ZYNQ=y
 CONFIG_TARGET_ZYNQ_PICOZED=y
 CONFIG_DEFAULT_DEVICE_TREE="zynq-picozed"
 CONFIG_SPL=y
+CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
configs/zynq_zc702_defconfig +1 -0
index 9d1b40d76ef6..0ae6c1b13017 100644
@@ -5,6 +5,7 @@ CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
+CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
configs/zynq_zc706_defconfig +1 -0
index bba91dfdfa78..7ce067a0e4b1 100644
@@ -6,6 +6,7 @@ CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
+CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
configs/zynq_zc770_xm010_defconfig +1 -0
index 96f0a794a382..4519abcae738 100644
@@ -7,6 +7,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM010"
+CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
configs/zynq_zc770_xm011_defconfig +1 -0
index b0c535e88e19..371241f0e08b 100644
@@ -7,6 +7,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM011"
+CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
configs/zynq_zc770_xm012_defconfig +1 -0
index 7fb03eb0491b..e08220b69449 100644
@@ -7,6 +7,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM012"
+CONFIG_SYS_PROMPT="Zynq> "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
configs/zynq_zc770_xm013_defconfig +1 -0
index 67665127b5ba..c906af9cb9a8 100644
@@ -7,6 +7,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM013"
+CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
configs/zynq_zed_defconfig +1 -0
index 058bb05ba658..074c6430e3ce 100644
@@ -6,6 +6,7 @@ CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
+CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
configs/zynq_zybo_defconfig +1 -0
index 231483e3dbd3..b51a6779a1db 100644
@@ -6,6 +6,7 @@ CONFIG_SPL=y
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_FIT_SIGNATURE=y
+CONFIG_SYS_PROMPT="Zynq> "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
Signature · 1 line
1.9.1
#3 lore raw

PATCH 4/9 ARM: zynq: Enable SPI_FLASH for zc770 xm013 platform

In reply to Michal Simek

From: Michal Simek <[email protected]>

Enable SPI flash.

---

 configs/zynq_zc770_xm013_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/zynq_zc770_xm013_defconfig +1 -0
index c906af9cb9a8..f3401af94b53 100644
@@ -13,4 +13,5 @@ CONFIG_SYS_PROMPT="Zynq> "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPI_FLASH=y
 CONFIG_ZYNQ_GEM=y
Signature · 1 line
1.9.1
#4 lore raw

PATCH 5/9 ARM: zynq: Move FLASH_BAR to Kconfig

In reply to Michal Simek

Clean up config and use Kconfig more.

---

 configs/zynq_zc702_defconfig       | 1 +
 configs/zynq_zc706_defconfig       | 1 +
 configs/zynq_zc770_xm010_defconfig | 1 +
 configs/zynq_zc770_xm013_defconfig | 1 +
 configs/zynq_zed_defconfig         | 1 +
 include/configs/zynq-common.h      | 1 -
 6 files changed, 5 insertions(+), 1 deletion(-)
configs/zynq_zc702_defconfig +1 -0
index 0ae6c1b13017..0ede96f4405b 100644
@@ -12,6 +12,7 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
configs/zynq_zc706_defconfig +1 -0
index 7ce067a0e4b1..4a8c7de7294f 100644
@@ -13,6 +13,7 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
configs/zynq_zc770_xm010_defconfig +1 -0
index 4519abcae738..0b583c3850ab 100644
@@ -14,6 +14,7 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
configs/zynq_zc770_xm013_defconfig +1 -0
index f3401af94b53..b1de8efdec54 100644
@@ -14,4 +14,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
 CONFIG_ZYNQ_GEM=y
configs/zynq_zed_defconfig +1 -0
index 074c6430e3ce..9ba4d0ea5c54 100644
@@ -13,6 +13,7 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
include/configs/zynq-common.h +0 -1
index 0ab60839b6cf..e8c3ef0c3872 100644
@@ -66,7 +66,6 @@
 #ifdef CONFIG_ZYNQ_QSPI
 # define CONFIG_SF_DEFAULT_SPEED	30000000
 # define CONFIG_SPI_FLASH_ISSI
-# define CONFIG_SPI_FLASH_BAR
 # define CONFIG_CMD_SF
 #endif
 
Signature · 1 line
1.9.1
#5 lore raw

PATCH 6/9 ARM: zynq: Clean DTSI coding style

In reply to Michal Simek

From: Michal Simek <[email protected]>

Fix minor indentation problems.

---

 arch/arm/dts/zynq-7000.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/dts/zynq-7000.dtsi +5 -5
index 83be51ae9df6..2d786f0fd15d 100644
@@ -234,7 +234,7 @@
 			interrupt-parent = <&intc>;
 			interrupts = <0 24 4>;
 			reg = <0xe0100000 0x1000>;
-		} ;
+		};
 
 		sdhci1: sdhci at e0101000 {
 			compatible = "arasan,sdhci-8.9a";
@@ -244,7 +244,7 @@
 			interrupt-parent = <&intc>;
 			interrupts = <0 47 4>;
 			reg = <0xe0101000 0x1000>;
-		} ;
+		};
 
 		slcr: slcr at f8000000 {
 			#address-cells = <1>;
@@ -326,11 +326,11 @@
 
 		scutimer: timer at f8f00600 {
 			interrupt-parent = <&intc>;
-			interrupts = < 1 13 0x301 >;
+			interrupts = <1 13 0x301>;
 			compatible = "arm,cortex-a9-twd-timer";
-			reg = < 0xf8f00600 0x20 >;
+			reg = <0xf8f00600 0x20>;
 			clocks = <&clkc 4>;
-		} ;
+		};
 
 		usb0: usb at e0002000 {
 			compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
Signature · 1 line
1.9.1
#8 lore raw

PATCH 7/9 ARM: zynq: Fix all remaining zynq platform to use stdout-path

In reply to Michal Simek

Fix console setup for all remaining zynq boards.

---

 arch/arm/dts/zynq-zc770-xm010.dts | 5 ++---
 arch/arm/dts/zynq-zc770-xm011.dts | 5 ++---
 arch/arm/dts/zynq-zc770-xm012.dts | 5 ++---
 arch/arm/dts/zynq-zc770-xm013.dts | 5 ++---
 4 files changed, 8 insertions(+), 12 deletions(-)
arch/arm/dts/zynq-zc770-xm010.dts +2 -3
index 07e2b7a7387d..b6982c0c45da 100644
@@ -21,9 +21,8 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyPS0,115200 root=/dev/ram rw earlyprintk";
-		linux,stdout-path = &uart1;
-		stdout-path = &uart1;
+		bootargs = "root=/dev/ram rw earlyprintk";
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {
arch/arm/dts/zynq-zc770-xm011.dts +2 -3
index 77e3bb0e6310..ae54519630bf 100644
@@ -18,9 +18,8 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyPS0,115200 root=/dev/ram rw earlyprintk";
-		linux,stdout-path = &uart1;
-		stdout-path = &uart1;
+		bootargs = "root=/dev/ram rw earlyprintk";
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {
arch/arm/dts/zynq-zc770-xm012.dts +2 -3
index 3e1769acb51f..3c50b99933fe 100644
@@ -20,9 +20,8 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyPS0,115200 root=/dev/ram rw earlyprintk";
-		linux,stdout-path = &uart1;
-		stdout-path = &uart1;
+		bootargs = "root=/dev/ram rw earlyprintk";
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {
arch/arm/dts/zynq-zc770-xm013.dts +2 -3
index 288e24837479..5077cdbc3e46 100644
@@ -20,9 +20,8 @@
 	};
 
 	chosen {
-		bootargs = "console=ttyPS0,115200 root=/dev/ram rw earlyprintk";
-		linux,stdout-path = &uart0;
-		stdout-path = &uart0;
+		bootargs = "root=/dev/ram rw earlyprintk";
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {
Signature · 1 line
1.9.1
#9 lore raw

PATCH 8/9 ARM: zynq: Fix defconfig for zybo

In reply to Michal Simek

Change possition of SPI_FLASH to by align with savedefconfig.

---

 configs/zynq_zybo_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configs/zynq_zybo_defconfig +2 -2
index b51a6779a1db..83149eb22565 100644
@@ -12,11 +12,11 @@ CONFIG_SYS_PROMPT="Zynq> "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_ZYNQ_GEM=y
 CONFIG_DEBUG_UART=y
 CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
-CONFIG_SPI_FLASH=y
-CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_ZYNQ_QSPI=y
Signature · 1 line
1.9.1
#10 lore raw

PATCH 9/9 ARM: zynq: Move spi node to aligned location

In reply to Michal Simek

From: Michal Simek <[email protected]>

Keep nodes aligned.

---

 arch/arm/dts/zynq-zc770-xm011.dts | 12 ++++++------
 arch/arm/dts/zynq-zc770-xm012.dts | 12 ++++++------
 arch/arm/dts/zynq-zc770-xm013.dts | 30 +++++++++++++++---------------
 3 files changed, 27 insertions(+), 27 deletions(-)
arch/arm/dts/zynq-zc770-xm011.dts +6 -6
index ae54519630bf..4fed2215365c 100644
@@ -33,12 +33,6 @@
 	};
 };
 
-&spi0 {
-	status = "okay";
-	num-cs = <4>;
-	is-decoded-cs = <0>;
-};
-
 &can0 {
 	status = "okay";
 };
@@ -53,6 +47,12 @@
 	};
 };
 
+&spi0 {
+	status = "okay";
+	num-cs = <4>;
+	is-decoded-cs = <0>;
+};
+
 &uart1 {
 	u-boot,dm-pre-reloc;
 	status = "okay";
arch/arm/dts/zynq-zc770-xm012.dts +6 -6
index 3c50b99933fe..8d69f0e0f5ef 100644
@@ -30,12 +30,6 @@
 	};
 };
 
-&spi1 {
-	status = "okay";
-	num-cs = <4>;
-	is-decoded-cs = <0>;
-};
-
 &can1 {
 	status = "okay";
 };
@@ -60,6 +54,12 @@
 	};
 };
 
+&spi1 {
+	status = "okay";
+	num-cs = <4>;
+	is-decoded-cs = <0>;
+};
+
 &uart1 {
 	u-boot,dm-pre-reloc;
 	status = "okay";
arch/arm/dts/zynq-zc770-xm013.dts +15 -15
index 5077cdbc3e46..77fdfcc00947 100644
@@ -30,21 +30,6 @@
 	};
 };
 
-&spi0 {
-	status = "okay";
-	num-cs = <4>;
-	is-decoded-cs = <0>;
-	eeprom: at25 at 0 {
-		at25,byte-len = <8192>;
-		at25,addr-mode = <2>;
-		at25,page-size = <32>;
-
-		compatible = "atmel,at25";
-		reg = <2>;
-		spi-max-frequency = <1000000>;
-	};
-};
-
 &can1 {
 	status = "okay";
 };
@@ -73,6 +58,21 @@
 	};
 };
 
+&spi0 {
+	status = "okay";
+	num-cs = <4>;
+	is-decoded-cs = <0>;
+	eeprom: at25 at 0 {
+		at25,byte-len = <8192>;
+		at25,addr-mode = <2>;
+		at25,page-size = <32>;
+
+		compatible = "atmel,at25";
+		reg = <2>;
+		spi-max-frequency = <1000000>;
+	};
+};
+
 &uart0 {
 	u-boot,dm-pre-reloc;
 	status = "okay";
Signature · 1 line
1.9.1