Skip to contentSkip to conversation

add initial support for broadcom NS3 soc

PATCH New Rayagonda Kokatanur 3 participants 54 messages Jun 10, 2020 – Jul 8, 2020

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

v3 cover add initial support for broadcom NS3 soc

This patch series adds initial support for Broadcom Northstar 3 SoC. NS3 is a octo-core 64-bit ARMv8 Cortex-A72 processors targeting a broad range of networking applications.

Changes from v2:
-Address review comments from Simon,
Remove clock dt file inorder to maintain same dt file between uboot and linux.

-Address self review comments,
Rearrange the headers.
Update MAINTAINERS file with dt file change.

Changes from v1:
-Address review comments from Marek Vasut,
Split the series into samller and logical series like core, driver.

-Address review comments from Simon Glass,
Update MAINTAINERS file.

Abhishek Shah (1):
board: ns3: add api to save boot parameters passed from BL31

Bharat Gooty (2):
include/configs: ns3: add env variables for Linux boot include/configs: ns3: add support for flashing images

Bharat Kumar Reddy Gooty (1):
board: ns3: limit U-boot relocation within 16MB memory

Rayagonda Kokatanur (11):
board: ns3: add support for Broadcom Northstar 3
arm: cpu: armv8: add L3 memory flush support
configs: ns3: enable clock subsystem
dt-bindings: memory: ns3: add memory definitions
board: ns3: default reset type to L3
dt-bindings: memory: ns3: update GIC LPI address
board: ns3: program GIC LPI tables
configs: ns3: enable GIC ITS LPI table programing
dt-bindings: memory: ns3: add ddr memory definition
board: ns3: define ddr memory layout
MAINTAINERS: update maintainers for broadcom ns3 platform

 MAINTAINERS                                  |  16 +-
 arch/arm/Kconfig                             |  10 +
 arch/arm/cpu/armv8/Makefile                  |   1 +
 arch/arm/cpu/armv8/bcmns3/Makefile           |   5 +
 arch/arm/cpu/armv8/bcmns3/lowlevel.S         |  99 ++
 arch/arm/dts/Makefile                        |   2 +
 arch/arm/dts/ns3-board.dts                   |  47 +
 arch/arm/dts/ns3.dtsi                        |  34 +
 arch/arm/include/asm/arch-bcmns3/bl33_info.h |  26 +
 board/broadcom/bcmns3/Kconfig                |  15 +
 board/broadcom/bcmns3/Makefile               |   5 +
 board/broadcom/bcmns3/ns3.c                  | 195 ++++
 configs/bcm_ns3_defconfig                    |  25 +
 include/configs/bcm_ns3.h                    | 901 +++++++++++++++++++
 include/dt-bindings/memory/bcm-ns3-mc.h      |  65 ++
 15 files changed, 1445 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/cpu/armv8/bcmns3/Makefile
 create mode 100644 arch/arm/cpu/armv8/bcmns3/lowlevel.S
 create mode 100644 arch/arm/dts/ns3-board.dts
 create mode 100644 arch/arm/dts/ns3.dtsi
 create mode 100644 arch/arm/include/asm/arch-bcmns3/bl33_info.h
 create mode 100644 board/broadcom/bcmns3/Kconfig
 create mode 100644 board/broadcom/bcmns3/Makefile
 create mode 100644 board/broadcom/bcmns3/ns3.c
 create mode 100644 configs/bcm_ns3_defconfig
 create mode 100644 include/configs/bcm_ns3.h
 create mode 100644 include/dt-bindings/memory/bcm-ns3-mc.h
Signature · 1 line
2.17.1
#1 lore raw

PATCH v3 1/15 board: ns3: add support for Broadcom Northstar 3

Add support for Broadcom Northstar 3 SoC.
NS3 is a octo-core 64-bit ARMv8 Cortex-A72 processors targeting a broad range of networking applications.

---
 arch/arm/Kconfig               | 10 ++++++
 arch/arm/dts/Makefile          |  2 ++
 arch/arm/dts/ns3-board.dts     | 24 +++++++++++++
 arch/arm/dts/ns3.dtsi          | 34 ++++++++++++++++++
 board/broadcom/bcmns3/Kconfig  | 15 ++++++++
 board/broadcom/bcmns3/Makefile |  5 +++
 board/broadcom/bcmns3/ns3.c    | 64 ++++++++++++++++++++++++++++++++++
 configs/bcm_ns3_defconfig      | 20 +++++++++++
 include/configs/bcm_ns3.h      | 40 +++++++++++++++++++++
 9 files changed, 214 insertions(+)
 create mode 100644 arch/arm/dts/ns3-board.dts
 create mode 100644 arch/arm/dts/ns3.dtsi
 create mode 100644 board/broadcom/bcmns3/Kconfig
 create mode 100644 board/broadcom/bcmns3/Makefile
 create mode 100644 board/broadcom/bcmns3/ns3.c
 create mode 100644 configs/bcm_ns3_defconfig
 create mode 100644 include/configs/bcm_ns3.h
arch/arm/Kconfig +10 -0
index 21df1c415f..79c8983902 100644
@@ -728,6 +728,15 @@ config TARGET_BCMNS2
 	  ARMv8 Cortex-A57 processors targeting a broad range of networking
 	  applications.
 
+config TARGET_BCMNS3
+	bool "Support Broadcom NS3"
+	select ARM64
+	select BOARD_LATE_INIT
+	help
+	  Support for Broadcom Northstar 3 SoCs. NS3 is a octo-core 64-bit
+	  ARMv8 Cortex-A72 processors targeting a broad range of networking
+	  applications.
+
 config ARCH_EXYNOS
 	bool "Samsung EXYNOS"
 	select DM
@@ -1875,6 +1884,7 @@ source "board/broadcom/bcm968580xref/Kconfig"
 source "board/broadcom/bcmcygnus/Kconfig"
 source "board/broadcom/bcmnsp/Kconfig"
 source "board/broadcom/bcmns2/Kconfig"
+source "board/broadcom/bcmns3/Kconfig"
 source "board/cavium/thunderx/Kconfig"
 source "board/cirrus/edb93xx/Kconfig"
 source "board/eets/pdu001/Kconfig"
arch/arm/dts/Makefile +2 -0
index 9900b44274..6cf63b5d2b 100644
@@ -907,6 +907,8 @@ dtb-$(CONFIG_ARCH_BCM68360) += \
 dtb-$(CONFIG_ARCH_BCM6858) += \
 	bcm968580xref.dtb
 
+dtb-$(CONFIG_TARGET_BCMNS3) += ns3-board.dtb
+
 dtb-$(CONFIG_ARCH_ASPEED) += ast2500-evb.dtb
 
 dtb-$(CONFIG_ARCH_STI) += stih410-b2260.dtb
arch/arm/dts/ns3-board.dts new file +24 -0
new file mode 100644
index 0000000000..54e56879a5
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier:      GPL-2.0+
+/*
+ * Copyright (C) 2020 Broadcom
+ */
+
+/dts-v1/;
+
+#include "ns3.dtsi"
+
+/ {
+	model = "NS3 model";
+
+	aliases {
+		serial0 = &uart1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&uart1 {
+	status = "okay";
+};
arch/arm/dts/ns3.dtsi new file +34 -0
new file mode 100644
index 0000000000..09098aac3a
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier:      GPL-2.0+
+/*
+ * Copyright (C) 2020 Broadcom
+ */
+
+#include "skeleton64.dtsi"
+
+/ {
+	compatible = "brcm,ns3";
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	memory {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x0 0x80000000>,
+			<0x8 0x80000000 0x1 0x80000000>;
+	};
+
+	hsls {
+		compatible = "simple-bus";
+		dma-ranges;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x0 0x68900000 0x17700000>;
+
+		uart1: uart at 110000 {
+			compatible = "snps,dw-apb-uart";
+			reg = <0x00110000 0x1000>;
+			reg-shift = <2>;
+			clock-frequency = <25000000>;
+			status = "disabled";
+		};
+	};
+};
board/broadcom/bcmns3/Kconfig new file +15 -0
new file mode 100644
index 0000000000..8ce21f980d
@@ -0,0 +1,15 @@
+if TARGET_BCMNS3
+
+config SYS_BOARD
+	default "bcmns3"
+
+config SYS_VENDOR
+	default "broadcom"
+
+config SYS_SOC
+	default "bcmns3"
+
+config SYS_CONFIG_NAME
+	default "bcm_ns3"
+
+endif
board/broadcom/bcmns3/Makefile new file +5 -0
new file mode 100644
index 0000000000..3404260148
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2020 Broadcom.
+
+obj-y	:= ns3.o
board/broadcom/bcmns3/ns3.c new file +64 -0

64 lines not on this page · raw message

configs/bcm_ns3_defconfig new file +20 -0
new file mode 100644
index 0000000000..a81541e394
@@ -0,0 +1,20 @@
+CONFIG_ARM=y
+CONFIG_TARGET_BCMNS3=y
+CONFIG_SYS_TEXT_BASE=0xFF000000
+CONFIG_ENV_SIZE=0x80000
+CONFIG_NR_DRAM_BANKS=2
+CONFIG_LOGLEVEL=7
+CONFIG_SILENT_CONSOLE=y
+CONFIG_SILENT_U_BOOT_ONLY=y
+# CONFIG_SILENT_CONSOLE_UPDATE_ON_SET is not set
+CONFIG_SUPPORT_RAW_INITRD=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="u-boot> "
+CONFIG_SYS_XTRACE="n"
+# CONFIG_CMD_SOURCE is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="ns3-board"
+CONFIG_DM=y
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_NS16550=y
include/configs/bcm_ns3.h new file +40 -0
new file mode 100644
index 0000000000..02a736456a
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Broadcom.
+ *
+ */
+
+#ifndef __BCM_NS3_H
+#define __BCM_NS3_H
+
+#include <linux/sizes.h>
+
+#define CONFIG_HOSTNAME			"NS3"
+
+/* Physical Memory Map */
+#define V2M_BASE			0x80000000
+#define PHYS_SDRAM_1			V2M_BASE
+
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define CONFIG_SYS_LOAD_ADDR		(PHYS_SDRAM_1 + 0x80000)
+
+/*
+ * Initial SP before reloaction is placed at end of first DRAM bank,
+ * which is 0x1_0000_0000.
+ * Just before re-loaction, new SP is updated and re-location happens.
+ * So pointing the initial SP to end of 2GB DDR is not a problem
+ */
+#define CONFIG_SYS_INIT_SP_ADDR		(PHYS_SDRAM_1 + 0x80000000)
+/* 12MB Malloc size */
+#define CONFIG_SYS_MALLOC_LEN		(SZ_8M + SZ_4M)
+
+/* console configuration */
+#define CONFIG_SYS_NS16550_CLK		25000000
+
+#define CONFIG_SYS_CBSIZE		SZ_1K
+#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
+					 sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS		64
+#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
+
+#endif /* __BCM_NS3_H */
Signature · 1 line
2.17.1
#2 lore raw

PATCH v3 1/15 board: ns3: add support for Broadcom Northstar 3

Quoted 16 lines · Rayagonda Kokatanur

Add support for Broadcom Northstar 3 SoC.
NS3 is a octo-core 64-bit ARMv8 Cortex-A72 processors targeting a broad range of networking applications.

---
 arch/arm/Kconfig               | 10 ++++++
 arch/arm/dts/Makefile          |  2 ++
 arch/arm/dts/ns3-board.dts     | 24 +++++++++++++
 arch/arm/dts/ns3.dtsi          | 34 ++++++++++++++++++
 board/broadcom/bcmns3/Kconfig  | 15 ++++++++
 board/broadcom/bcmns3/Makefile |  5 +++
 board/broadcom/bcmns3/ns3.c    | 64 ++++++++++++++++++++++++++++++++++
 configs/bcm_ns3_defconfig      | 20 +++++++++++
 include/configs/bcm_ns3.h      | 40 +++++++++++++++++++++
Quoted 9 lines
 9 files changed, 214 insertions(+)
 create mode 100644 arch/arm/dts/ns3-board.dts
 create mode 100644 arch/arm/dts/ns3.dtsi
 create mode 100644 board/broadcom/bcmns3/Kconfig
 create mode 100644 board/broadcom/bcmns3/Makefile
 create mode 100644 board/broadcom/bcmns3/ns3.c
 create mode 100644 configs/bcm_ns3_defconfig
 create mode 100644 include/configs/bcm_ns3.h
#3 lore raw

PATCH v3 2/15 arm: cpu: armv8: add L3 memory flush support

In reply to Rayagonda Kokatanur

Add L3 memory flush support for NS3.

---
 arch/arm/cpu/armv8/Makefile          |  1 +
 arch/arm/cpu/armv8/bcmns3/Makefile   |  5 ++
 arch/arm/cpu/armv8/bcmns3/lowlevel.S | 90 ++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 arch/arm/cpu/armv8/bcmns3/Makefile
 create mode 100644 arch/arm/cpu/armv8/bcmns3/lowlevel.S
arch/arm/cpu/armv8/Makefile +1 -0
index 2e48df0eb9..7e33a183d5 100644
@@ -39,3 +39,4 @@ obj-$(CONFIG_S32V234) += s32v234/
 obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
 obj-$(CONFIG_ARMV8_PSCI) += psci.o
 obj-$(CONFIG_ARCH_SUNXI) += lowlevel_init.o
+obj-$(CONFIG_TARGET_BCMNS3) += bcmns3/
arch/arm/cpu/armv8/bcmns3/Makefile new file +5 -0
new file mode 100644
index 0000000000..a35e29d11a
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2020 Broadcom.
+
+obj-y	+= lowlevel.o
arch/arm/cpu/armv8/bcmns3/lowlevel.S new file +90 -0

90 lines not on this page · raw message

Signature · 1 line
2.17.1
#4 lore raw

PATCH v3 2/15 arm: cpu: armv8: add L3 memory flush support

Quoted 38 lines · Rayagonda Kokatanur

Add L3 memory flush support for NS3.

---
 arch/arm/cpu/armv8/Makefile          |  1 +
 arch/arm/cpu/armv8/bcmns3/Makefile   |  5 ++
 arch/arm/cpu/armv8/bcmns3/lowlevel.S | 90 ++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 arch/arm/cpu/armv8/bcmns3/Makefile
 create mode 100644 arch/arm/cpu/armv8/bcmns3/lowlevel.S
arch/arm/cpu/armv8/Makefile +1 -0
index 2e48df0eb9..7e33a183d5 100644
@@ -39,3 +39,4 @@ obj-$(CONFIG_S32V234) += s32v234/
 obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
 obj-$(CONFIG_ARMV8_PSCI) += psci.o
 obj-$(CONFIG_ARCH_SUNXI) += lowlevel_init.o
+obj-$(CONFIG_TARGET_BCMNS3) += bcmns3/
arch/arm/cpu/armv8/bcmns3/Makefile new file +5 -0
new file mode 100644
index 0000000000..a35e29d11a
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2020 Broadcom.
+
+obj-y  += lowlevel.o
arch/arm/cpu/armv8/bcmns3/lowlevel.S new file +0 -0
new file mode 100644
index 0000000000..202286248e

arch/arm/cpu/armv8/bcmns3/lowlevel.S line 5

Quoted 5 lines
arch/arm/cpu/armv8/bcmns3/lowlevel.S new file +5 -0
@@ -0,0 +1,90 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Broadcom
+ *
+ * Extracted from fsl-layerscape/lowlevel.S

Should this file be common, then? Is the (c) correct?

#5 lore raw

PATCH v3 2/15 arm: cpu: armv8: add L3 memory flush support

Hi Simon,

Quoted 40 lines · Simon Glass
Quoted 37 lines · Rayagonda Kokatanur

Add L3 memory flush support for NS3.

---
 arch/arm/cpu/armv8/Makefile          |  1 +
 arch/arm/cpu/armv8/bcmns3/Makefile   |  5 ++
 arch/arm/cpu/armv8/bcmns3/lowlevel.S | 90 ++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 arch/arm/cpu/armv8/bcmns3/Makefile
 create mode 100644 arch/arm/cpu/armv8/bcmns3/lowlevel.S
arch/arm/cpu/armv8/Makefile +1 -0
index 2e48df0eb9..7e33a183d5 100644
@@ -39,3 +39,4 @@ obj-$(CONFIG_S32V234) += s32v234/
 obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
 obj-$(CONFIG_ARMV8_PSCI) += psci.o
 obj-$(CONFIG_ARCH_SUNXI) += lowlevel_init.o
+obj-$(CONFIG_TARGET_BCMNS3) += bcmns3/
arch/arm/cpu/armv8/bcmns3/Makefile new file +5 -0
new file mode 100644
index 0000000000..a35e29d11a
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2020 Broadcom.
+
+obj-y  += lowlevel.o
arch/arm/cpu/armv8/bcmns3/lowlevel.S new file +0 -0
new file mode 100644
index 0000000000..202286248e
Quoted 8 lines

arch/arm/cpu/armv8/bcmns3/lowlevel.S line 5

Quoted 6 lines
arch/arm/cpu/armv8/bcmns3/lowlevel.S new file +5 -0
@@ -0,0 +1,90 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Broadcom
+ *
+ * Extracted from fsl-layerscape/lowlevel.S

Should this file be common, then? Is the (c) correct?

Do you mean, file "arch/arm/cpu/armv8/bcmns3/lowlevel.S" should be common and for common file copyright tag should be "(C) Copyright 2020" instead of "Copyright 2020 Broadcom".

Please let me know.

Best regards,
Rayagonda

#6 lore raw

PATCH v3 2/15 arm: cpu: armv8: add L3 memory flush support

Hi Rayagonda,

Quoted 53 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 40 lines · Simon Glass
Quoted 37 lines · Rayagonda Kokatanur

Add L3 memory flush support for NS3.

---
 arch/arm/cpu/armv8/Makefile          |  1 +
 arch/arm/cpu/armv8/bcmns3/Makefile   |  5 ++
 arch/arm/cpu/armv8/bcmns3/lowlevel.S | 90 ++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 arch/arm/cpu/armv8/bcmns3/Makefile
 create mode 100644 arch/arm/cpu/armv8/bcmns3/lowlevel.S
arch/arm/cpu/armv8/Makefile +1 -0
index 2e48df0eb9..7e33a183d5 100644
@@ -39,3 +39,4 @@ obj-$(CONFIG_S32V234) += s32v234/
 obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
 obj-$(CONFIG_ARMV8_PSCI) += psci.o
 obj-$(CONFIG_ARCH_SUNXI) += lowlevel_init.o
+obj-$(CONFIG_TARGET_BCMNS3) += bcmns3/
arch/arm/cpu/armv8/bcmns3/Makefile new file +5 -0
new file mode 100644
index 0000000000..a35e29d11a
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2020 Broadcom.
+
+obj-y  += lowlevel.o
arch/arm/cpu/armv8/bcmns3/lowlevel.S new file +0 -0
new file mode 100644
index 0000000000..202286248e
Quoted 8 lines

arch/arm/cpu/armv8/bcmns3/lowlevel.S line 5

Quoted 6 lines
arch/arm/cpu/armv8/bcmns3/lowlevel.S new file +5 -0
@@ -0,0 +1,90 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Broadcom
+ *
+ * Extracted from fsl-layerscape/lowlevel.S

Should this file be common, then? Is the (c) correct?

Quoted 4 lines

Do you mean, file "arch/arm/cpu/armv8/bcmns3/lowlevel.S" should be common and for common file copyright tag should be "(C) Copyright 2020" instead of "Copyright 2020 Broadcom".

The comment suggests it was copied from another file, in which case you should keep the (c) from that file, perhaps adding your own.

But if the two files are the same, can you just have one file and move it to a common location?

Quoted 1 line

Please let me know.

Consider yourself let.

Regards,
Simon

#7 lore raw

PATCH v3 2/15 arm: cpu: armv8: add L3 memory flush support

Hi Simon,

Quoted 63 lines · Simon Glass

Hi Rayagonda,

Quoted 53 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 40 lines · Simon Glass
Quoted 37 lines · Rayagonda Kokatanur

Add L3 memory flush support for NS3.

---
 arch/arm/cpu/armv8/Makefile          |  1 +
 arch/arm/cpu/armv8/bcmns3/Makefile   |  5 ++
 arch/arm/cpu/armv8/bcmns3/lowlevel.S | 90 ++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 arch/arm/cpu/armv8/bcmns3/Makefile
 create mode 100644 arch/arm/cpu/armv8/bcmns3/lowlevel.S
arch/arm/cpu/armv8/Makefile +1 -0
index 2e48df0eb9..7e33a183d5 100644
@@ -39,3 +39,4 @@ obj-$(CONFIG_S32V234) += s32v234/
 obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
 obj-$(CONFIG_ARMV8_PSCI) += psci.o
 obj-$(CONFIG_ARCH_SUNXI) += lowlevel_init.o
+obj-$(CONFIG_TARGET_BCMNS3) += bcmns3/
arch/arm/cpu/armv8/bcmns3/Makefile new file +5 -0
new file mode 100644
index 0000000000..a35e29d11a
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2020 Broadcom.
+
+obj-y  += lowlevel.o
arch/arm/cpu/armv8/bcmns3/lowlevel.S new file +0 -0
new file mode 100644
index 0000000000..202286248e
Quoted 8 lines

arch/arm/cpu/armv8/bcmns3/lowlevel.S line 5

Quoted 6 lines
arch/arm/cpu/armv8/bcmns3/lowlevel.S new file +5 -0
@@ -0,0 +1,90 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Broadcom
+ *
+ * Extracted from fsl-layerscape/lowlevel.S

Should this file be common, then? Is the (c) correct?

Quoted 4 lines

Do you mean, file "arch/arm/cpu/armv8/bcmns3/lowlevel.S" should be common and for common file copyright tag should be "(C) Copyright 2020" instead of "Copyright 2020 Broadcom".

Quoted 5 lines

The comment suggests it was copied from another file, in which case you should keep the (c) from that file, perhaps adding your own.

But if the two files are the same, can you just have one file and move it to a common location?

The comment is misleading.
Though it is copied from another file but both files are not same. Let me remove that comment.

Thank you,
Rayagonda

Quoted 7 lines
Quoted 2 lines

Please let me know.

Consider yourself let.

Regards,
Simon

#8 lore raw

PATCH v3 3/15 configs: ns3: enable clock subsystem

In reply to Rayagonda Kokatanur

Enable clock subsystem for ns3.

---
 configs/bcm_ns3_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/bcm_ns3_defconfig +2 -0
index a81541e394..7e51a926f7 100644
@@ -16,5 +16,7 @@ CONFIG_SYS_XTRACE="n"
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="ns3-board"
 CONFIG_DM=y
+CONFIG_CLK=y
+CONFIG_CLK_CCF=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
Signature · 1 line
2.17.1
#9 lore raw

PATCH v3 3/15 configs: ns3: enable clock subsystem

Quoted 7 lines · Rayagonda Kokatanur

Enable clock subsystem for ns3.

---
 configs/bcm_ns3_defconfig | 2 ++
 1 file changed, 2 insertions(+)

It feels like I have already reviewed some of these patches. Can you check if you added my review tag correctly?

Regards,
Simon

#10 lore raw

PATCH v3 3/15 configs: ns3: enable clock subsystem

Hi Simon,

Quoted 6 lines · Simon Glass
Quoted 3 lines · Rayagonda Kokatanur

Enable clock subsystem for ns3.

Quoted 7 lines
Quoted 4 lines
---
 configs/bcm_ns3_defconfig | 2 ++
 1 file changed, 2 insertions(+)

It feels like I have already reviewed some of these patches. Can you check if you added my review tag correctly?

You reviewed other config patches, not this one. I already put a review tag for those patches.
Anyway I will put a review tag for this as well.

Thank you,
Rayagonda

Quoted 4 lines

Regards,
Simon

#11 lore raw

PATCH v3 4/15 dt-bindings: memory: ns3: add memory definitions

In reply to Rayagonda Kokatanur

Add NS3 memory definitions.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 34 +++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 include/dt-bindings/memory/bcm-ns3-mc.h
include/dt-bindings/memory/bcm-ns3-mc.h new file +34 -0
new file mode 100644
index 0000000000..b4f78584a5
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2020 Broadcom
+ */
+
+#ifndef DT_BINDINGS_BCM_NS3_MC_H
+#define DT_BINDINGS_BCM_NS3_MC_H
+
+/*
+ * Reserved Memory Map : SHMEM & TZDRAM.
+ * +--------+----------+ 0x8D000000
+ * | SHMEM (NS)         | 16 MB
+ * +-------------------+ 0x8E000000
+ * |        | TEE_RAM(S)| 4MB
+ * + TZDRAM +----------+ 0x8E400000
+ * |        | TA_RAM(S) | 12MB
+ * +--------+----------+ 0x8F000000
+ * | BL31 + TMON + LPM  |
+ * | memory             | 1MB
+ * +-------------------+ 0x8F100000
+ */
+
+#define BCM_NS3_MEM_SHARE_START    0x8D000000
+#define BCM_NS3_MEM_SHARE_LEN      0x020FFFFF
+
+/* ATF/U-boot/Linux error logs */
+#define BCM_NS3_MEM_ELOG_START     0x8F113000
+#define BCM_NS3_MEM_ELOG_LEN       0x00100000
+
+/* CRMU Page table memroy */
+#define BCM_NS3_MEM_CRMU_PT_START  0x880000000
+#define BCM_NS3_MEM_CRMU_PT_LEN    0x200000
+
+#endif
Signature · 1 line
2.17.1
#12 lore raw

PATCH v3 4/15 dt-bindings: memory: ns3: add memory definitions

Hi Rayagonda,

Quoted 8 lines · Rayagonda Kokatanur

Add NS3 memory definitions.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 34 +++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 include/dt-bindings/memory/bcm-ns3-mc.h
Quoted 21 lines
include/dt-bindings/memory/bcm-ns3-mc.h new file +14 -0
new file mode 100644
index 0000000000..b4f78584a5
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2020 Broadcom
+ */
+
+#ifndef DT_BINDINGS_BCM_NS3_MC_H
+#define DT_BINDINGS_BCM_NS3_MC_H
+
+/*
+ * Reserved Memory Map : SHMEM & TZDRAM.
+ * +--------+----------+ 0x8D000000
+ * | SHMEM (NS)         | 16 MB
+ * +-------------------+ 0x8E000000
+ * |        | TEE_RAM(S)| 4MB

include/dt-bindings/memory/bcm-ns3-mc.h line 24

Quoted 10 lines
include/dt-bindings/memory/bcm-ns3-mc.h new file +10 -0
+ * + TZDRAM +----------+ 0x8E400000
+ * |        | TA_RAM(S) | 12MB
+ * +--------+----------+ 0x8F000000
+ * | BL31 + TMON + LPM  |
+ * | memory             | 1MB
+ * +-------------------+ 0x8F100000
+ */
+
+#define BCM_NS3_MEM_SHARE_START    0x8D000000
+#define BCM_NS3_MEM_SHARE_LEN      0x020FFFFF

Suggest lower-case hex throughout.

Quoted 13 lines
include/dt-bindings/memory/bcm-ns3-mc.h new file +10 -1
+
+/* ATF/U-boot/Linux error logs */
+#define BCM_NS3_MEM_ELOG_START     0x8F113000
+#define BCM_NS3_MEM_ELOG_LEN       0x00100000
+
+/* CRMU Page table memroy */
+#define BCM_NS3_MEM_CRMU_PT_START  0x880000000
+#define BCM_NS3_MEM_CRMU_PT_LEN    0x200000
+
+#endif
--

2.17.1

#13 lore raw

PATCH v3 5/15 board: ns3: add api to save boot parameters passed from BL31

In reply to Rayagonda Kokatanur

From: Abhishek Shah <[email protected]>

Add API to save boot parameters passed from BL31

Use assembly implementation of save_boot_params instead of c function. Because generally ATF does not set up SP_EL2 on exiting. Thus, usage of a C function immediately after exiting with no stack setup done by ATF explicitly, may cause SP_EL2 to be not sane, which in turn causes a crash if this boot was not lucky to get an SP_EL2 in valid range. Replace C implementation with assembly one which does not use stack this early, and let u-boot to set up its stack later.

---
 arch/arm/cpu/armv8/bcmns3/lowlevel.S         |  9 +++++++
 arch/arm/include/asm/arch-bcmns3/bl33_info.h | 26 ++++++++++++++++++++
 board/broadcom/bcmns3/ns3.c                  | 10 ++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-bcmns3/bl33_info.h
arch/arm/cpu/armv8/bcmns3/lowlevel.S +9 -0
index 202286248e..9d8eb7f117 100644
@@ -88,3 +88,12 @@ ENTRY(__asm_flush_l3_dcache)
 	mov	lr, x29
 	ret
 ENDPROC(__asm_flush_l3_dcache)
+
+ENTRY(save_boot_params)
+/*
+ * void set_boot_params(uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3)
+ */
+	adr	x4, bl33_info
+	str	x0, [x4]
+	b	save_boot_params_ret
+ENDPROC(save_boot_params)
arch/arm/include/asm/arch-bcmns3/bl33_info.h new file +26 -0
new file mode 100644
index 0000000000..bbc95b0186
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Broadcom.
+ *
+ */
+
+#ifndef BL33_INFO_H
+#define BL33_INFO_H
+#include <asm/io.h>
+
+/* Increase version number each time this file is modified */
+#define BL33_INFO_VERSION	1
+
+struct chip_info {
+	unsigned int chip_id;
+	unsigned int rev_id;
+};
+
+struct bl33_info {
+	unsigned int version;
+	struct chip_info chip;
+};
+
+extern struct bl33_info *bl33_info;
+
+#endif
board/broadcom/bcmns3/ns3.c +10 -0
index e38156723c..5e644bd466 100644
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
+#include <asm/arch-bcmns3/bl33_info.h>
 
 static struct mm_region ns3_mem_map[] = {
 	{
@@ -33,8 +34,17 @@ struct mm_region *mem_map = ns3_mem_map;
 
 DECLARE_GLOBAL_DATA_PTR;
 
+/*
+ * Force the bl33_info to the data-section, as .bss will not be valid
+ * when save_boot_params is invoked.
+ */
+struct bl33_info *bl33_info __section(".data");
+
 int board_init(void)
 {
+	if (bl33_info->version != BL33_INFO_VERSION)
+		printf("*** warning: ATF BL31 and u-boot not in sync! ***\n");
+
 	return 0;
 }
 
Signature · 1 line
2.17.1
#14 lore raw

PATCH v3 5/15 board: ns3: add api to save boot parameters passed from BL31

Quoted 5 lines · Rayagonda Kokatanur

From: Abhishek Shah <[email protected]>

Add API to save boot parameters passed from BL31

Quoted 8 lines

Use assembly implementation of save_boot_params instead of c function. Because generally ATF does not set up SP_EL2 on exiting. Thus, usage of a C function immediately after exiting with no stack setup done by ATF explicitly, may cause SP_EL2 to be not sane, which in turn causes a crash if this boot was not lucky to get an SP_EL2 in valid range. Replace C implementation with assembly one which does not use stack this early, and let u-boot to set up its stack later.

Can this be fixed in ATF?

Quoted 5 lines
Quoted 7 lines
---
 arch/arm/cpu/armv8/bcmns3/lowlevel.S         |  9 +++++++
 arch/arm/include/asm/arch-bcmns3/bl33_info.h | 26 ++++++++++++++++++++
 board/broadcom/bcmns3/ns3.c                  | 10 ++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-bcmns3/bl33_info.h
Quoted 16 lines
board/broadcom/bcmns3/ns3.c +1 -0
index e38156723c..5e644bd466 100644
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
+#include <asm/arch-bcmns3/bl33_info.h>
 
 static struct mm_region ns3_mem_map[] = {
        {
@@ -33,8 +34,17 @@ struct mm_region *mem_map = ns3_mem_map;
 
 DECLARE_GLOBAL_DATA_PTR;
 

board/broadcom/bcmns3/ns3.c struct mm_region *mem_map = ns3_mem_map; · line 46

Quoted 10 lines
board/broadcom/bcmns3/ns3.c +8 -0
+/*
+ * Force the bl33_info to the data-section, as .bss will not be valid
+ * when save_boot_params is invoked.
+ */
+struct bl33_info *bl33_info __section(".data");
+
 int board_init(void)
 {
+       if (bl33_info->version != BL33_INFO_VERSION)
+               printf("*** warning: ATF BL31 and u-boot not in sync! ***\n");

Shouldn't this be a fatal error?

Quoted 7 lines
board/broadcom/bcmns3/ns3.c +1 -1
+
        return 0;
 }
 
--

2.17.1

#15 lore raw

PATCH v3 5/15 board: ns3: add api to save boot parameters passed from BL31

Quoted 17 lines · Simon Glass
Quoted 5 lines · Rayagonda Kokatanur

From: Abhishek Shah <[email protected]>

Add API to save boot parameters passed from BL31

Quoted 8 lines

Use assembly implementation of save_boot_params instead of c function. Because generally ATF does not set up SP_EL2 on exiting. Thus, usage of a C function immediately after exiting with no stack setup done by ATF explicitly, may cause SP_EL2 to be not sane, which in turn causes a crash if this boot was not lucky to get an SP_EL2 in valid range. Replace C implementation with assembly one which does not use stack this early, and let u-boot to set up its stack later.

Quoted 1 line

Can this be fixed in ATF?

We are passing boot parameters for uboot using arm cpu x0, x1, x2 and x3 registers.

Quoted 32 lines
Quoted 6 lines
Quoted 7 lines
---
 arch/arm/cpu/armv8/bcmns3/lowlevel.S         |  9 +++++++
 arch/arm/include/asm/arch-bcmns3/bl33_info.h | 26 ++++++++++++++++++++
 board/broadcom/bcmns3/ns3.c                  | 10 ++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-bcmns3/bl33_info.h
Quoted 16 lines
board/broadcom/bcmns3/ns3.c +1 -0
index e38156723c..5e644bd466 100644
@@ -8,6 +8,7 @@
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
+#include <asm/arch-bcmns3/bl33_info.h>
 
 static struct mm_region ns3_mem_map[] = {
        {
@@ -33,8 +34,17 @@ struct mm_region *mem_map = ns3_mem_map;
 
 DECLARE_GLOBAL_DATA_PTR;
 
Quoted 12 lines

board/broadcom/bcmns3/ns3.c struct mm_region *mem_map = ns3_mem_map; · line 46

Quoted 10 lines
board/broadcom/bcmns3/ns3.c +8 -0
+/*
+ * Force the bl33_info to the data-section, as .bss will not be valid
+ * when save_boot_params is invoked.
+ */
+struct bl33_info *bl33_info __section(".data");
+
 int board_init(void)
 {
+       if (bl33_info->version != BL33_INFO_VERSION)
+               printf("*** warning: ATF BL31 and u-boot not in sync! ***\n");

Shouldn't this be a fatal error?

It's not a fatal error.
Its warning message for the user indicates that BL31 and BL33 are out of sync. By knowing this warning message, users can upgrade the binarie from uboot prompt.

Best regards,
Rayagonda

Quoted 9 lines
Quoted 9 lines
board/broadcom/bcmns3/ns3.c +1 -1
+
        return 0;
 }
 
--

2.17.1

#16 lore raw

PATCH v3 6/15 board: ns3: default reset type to L3

In reply to Rayagonda Kokatanur

Default "reset" from u-boot to L3 reset. "reset" command with argument will trigger L1 reset.

---
 board/broadcom/bcmns3/ns3.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
board/broadcom/bcmns3/ns3.c +18 -2
index 5e644bd466..1221f26ddc 100644
@@ -68,7 +68,23 @@ int dram_init_banksize(void)
 	return 0;
 }
 
-void reset_cpu(ulong addr)
+void reset_cpu(ulong level)
 {
-	psci_system_reset();
+#define L3_RESET 30
+	u32 reset_level, strap_val;
+
+	/* Default reset type is L3 reset */
+	if (!level) {
+		/*
+		 * Encoding: u-boot reset command expects decimal argument
+		 * strap val = 1st decimal digit;reset level = 2nd decimal digit
+		 */
+		strap_val = L3_RESET % 10;
+		level = L3_RESET / 10;
+		reset_level = level % 10;
+		psci_system_reset2(reset_level, strap_val);
+	} else {
+		/* U-boot cmd "reset" with any arg will trigger L1 reset */
+		psci_system_reset();
+	}
 }
Signature · 1 line
2.17.1
#17 lore raw

PATCH v3 6/15 board: ns3: default reset type to L3

Hi Rayagonda,

Quoted 2 lines · Rayagonda Kokatanur

Default "reset" from u-boot to L3 reset.

U-Boot

Quoted 14 lines

"reset" command with argument will trigger L1 reset.

---
 board/broadcom/bcmns3/ns3.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
board/broadcom/bcmns3/ns3.c +0 -0
index 5e644bd466..1221f26ddc 100644

board/broadcom/bcmns3/ns3.c int dram_init_banksize(void) · line 72

Quoted 6 lines
board/broadcom/bcmns3/ns3.c +1 -1
@@ -68,7 +68,23 @@ int dram_init_banksize(void)
        return 0;
 }
 
-void reset_cpu(ulong addr)
+void reset_cpu(ulong level)
 {

This should be in a sysreset driver. It supports different reset types.

Quoted 20 lines
board/broadcom/bcmns3/ns3.c +17 -2
-       psci_system_reset();
+#define L3_RESET 30
+       u32 reset_level, strap_val;
+
+       /* Default reset type is L3 reset */
+       if (!level) {
+               /*
+                * Encoding: u-boot reset command expects decimal argument
+                * strap val = 1st decimal digit;reset level = 2nd decimal digit
+                */
+               strap_val = L3_RESET % 10;
+               level = L3_RESET / 10;
+               reset_level = level % 10;
+               psci_system_reset2(reset_level, strap_val);
+       } else {
+               /* U-boot cmd "reset" with any arg will trigger L1 reset */
+               psci_system_reset();
+       }
 }
--
Quoted 2 lines

2.17.1

Regards,
Simon

#18 lore raw

PATCH v3 6/15 board: ns3: default reset type to L3

Hi Simon,

Quoted 9 lines · Simon Glass

Hi Rayagonda,

Quoted 2 lines · Rayagonda Kokatanur

Default "reset" from u-boot to L3 reset.

U-Boot

Thank you, will fix this.

Quoted 18 lines
Quoted 18 lines

"reset" command with argument will trigger L1 reset.

---
 board/broadcom/bcmns3/ns3.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
board/broadcom/bcmns3/ns3.c +0 -0
index 5e644bd466..1221f26ddc 100644
@@ -68,7 +68,23 @@ int dram_init_banksize(void)
        return 0;
 }
 
Quoted 5 lines

board/broadcom/bcmns3/ns3.c int dram_init_banksize(void) · line 72

Quoted 3 lines
board/broadcom/bcmns3/ns3.c +1 -1
-void reset_cpu(ulong addr)
+void reset_cpu(ulong level)
 {

This should be in a sysreset driver. It supports different reset types.

I checked the sysreset driver and found a generic/common psci driver - drivers/sysreset/sysreset_psci.c.
We could use this common driver in our platform.

Right now this common driver uses the same command or function_id for both WARM and COLD reset.
But in our case we should use different commands for WARM and COLD reset.

I am planning to add one kconfig option (USE_FN64_CMD) through which we can select different commands or the same command for COLD reset.

Something like this,

static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)

{
    unsigned long function_id;

    switch (type) {
    case SYSRESET_WARM:
         function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_COLD:
         if (CONFIG_IS_ENABLED(USE_FN64_CMD))
              function_id = PSCI_0_2_FN64_SYSTEM_RESET;
         else
              function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_POWER_OFF:
         function_id = PSCI_0_2_FN_SYSTEM_OFF;
         break;

     default:
         return -ENOSYS;
    }

    invoke_psci_fn(function_id, 0, 0, 0);

    return -EINPROGRESS;
}

This way any platform can define/select USE_FN64_CMD if they need different commands for WARM reset.
Please let me know about this approach.

Best regards,
Rayagonda

Quoted 26 lines
Quoted 21 lines
board/broadcom/bcmns3/ns3.c +17 -2
-       psci_system_reset();
+#define L3_RESET 30
+       u32 reset_level, strap_val;
+
+       /* Default reset type is L3 reset */
+       if (!level) {
+               /*
+                * Encoding: u-boot reset command expects decimal argument
+                * strap val = 1st decimal digit;reset level = 2nd decimal digit
+                */
+               strap_val = L3_RESET % 10;
+               level = L3_RESET / 10;
+               reset_level = level % 10;
+               psci_system_reset2(reset_level, strap_val);
+       } else {
+               /* U-boot cmd "reset" with any arg will trigger L1 reset */
+               psci_system_reset();
+       }
 }
--
Quoted 2 lines

2.17.1

Regards,
Simon

#19 lore raw

PATCH v3 6/15 board: ns3: default reset type to L3

Hi Rayagonda,

Quoted 81 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 9 lines · Simon Glass

Hi Rayagonda,

Quoted 2 lines · Rayagonda Kokatanur

Default "reset" from u-boot to L3 reset.

U-Boot

Thank you, will fix this.

Quoted 18 lines
Quoted 18 lines

"reset" command with argument will trigger L1 reset.

---
 board/broadcom/bcmns3/ns3.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
board/broadcom/bcmns3/ns3.c +0 -0
index 5e644bd466..1221f26ddc 100644
@@ -68,7 +68,23 @@ int dram_init_banksize(void)
        return 0;
 }
 
Quoted 5 lines

board/broadcom/bcmns3/ns3.c int dram_init_banksize(void) · line 72

Quoted 3 lines
board/broadcom/bcmns3/ns3.c +1 -1
-void reset_cpu(ulong addr)
+void reset_cpu(ulong level)
 {

This should be in a sysreset driver. It supports different reset types.

I checked the sysreset driver and found a generic/common psci driver - drivers/sysreset/sysreset_psci.c.
We could use this common driver in our platform.

Right now this common driver uses the same command or function_id for both WARM and COLD reset.
But in our case we should use different commands for WARM and COLD reset.

I am planning to add one kconfig option (USE_FN64_CMD) through which we can select different commands or the same command for COLD reset.

Something like this,

static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)

{
    unsigned long function_id;

    switch (type) {
    case SYSRESET_WARM:
         function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_COLD:
         if (CONFIG_IS_ENABLED(USE_FN64_CMD))
              function_id = PSCI_0_2_FN64_SYSTEM_RESET;
         else
              function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_POWER_OFF:
         function_id = PSCI_0_2_FN_SYSTEM_OFF;
         break;

     default:
         return -ENOSYS;
    }

    invoke_psci_fn(function_id, 0, 0, 0);

    return -EINPROGRESS;
}
Quoted 3 lines

This way any platform can define/select USE_FN64_CMD if they need different commands for WARM reset.
Please let me know about this approach.

It seems OK, but better would be to use the device tree to determine the command (e.g. compatible string or a property).

Regards,
Simon

#20 lore raw

PATCH v3 6/15 board: ns3: default reset type to L3

Hi Simon,

Quoted 86 lines · Simon Glass

Hi Rayagonda,

Quoted 81 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 9 lines · Simon Glass

Hi Rayagonda,

Quoted 2 lines · Rayagonda Kokatanur

Default "reset" from u-boot to L3 reset.

U-Boot

Thank you, will fix this.

Quoted 18 lines
Quoted 18 lines

"reset" command with argument will trigger L1 reset.

---
 board/broadcom/bcmns3/ns3.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
board/broadcom/bcmns3/ns3.c +0 -0
index 5e644bd466..1221f26ddc 100644
@@ -68,7 +68,23 @@ int dram_init_banksize(void)
        return 0;
 }
 
Quoted 5 lines

board/broadcom/bcmns3/ns3.c int dram_init_banksize(void) · line 72

Quoted 3 lines
board/broadcom/bcmns3/ns3.c +1 -1
-void reset_cpu(ulong addr)
+void reset_cpu(ulong level)
 {

This should be in a sysreset driver. It supports different reset types.

I checked the sysreset driver and found a generic/common psci driver - drivers/sysreset/sysreset_psci.c.
We could use this common driver in our platform.

Right now this common driver uses the same command or function_id for both WARM and COLD reset.
But in our case we should use different commands for WARM and COLD reset.

I am planning to add one kconfig option (USE_FN64_CMD) through which we can select different commands or the same command for COLD reset.

Something like this,

static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)

{
    unsigned long function_id;

    switch (type) {
    case SYSRESET_WARM:
         function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_COLD:
         if (CONFIG_IS_ENABLED(USE_FN64_CMD))
              function_id = PSCI_0_2_FN64_SYSTEM_RESET;
         else
              function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_POWER_OFF:
         function_id = PSCI_0_2_FN_SYSTEM_OFF;
         break;

     default:
         return -ENOSYS;
    }

    invoke_psci_fn(function_id, 0, 0, 0);

    return -EINPROGRESS;
}
Quoted 6 lines
Quoted 3 lines

This way any platform can define/select USE_FN64_CMD if they need different commands for WARM reset.
Please let me know about this approach.

It seems OK, but better would be to use the device tree to determine the command (e.g. compatible string or a property).

I was checking linux psci drivers (drivers/firmware/psci/psci.c), they are handling SYSTEM_RESET and SYSTEM_RESET2 without dt ie they read psci capability, if it supports SYSTEM_RESET2 then they use it else they use SYSTEM_RESET only.
I think, in U-Boot also we should handle in the same way. This is a little bit more work, hence I am planning to handle this as a separate patch set only.
So request you to allow this patch as it is.

Please let me know.

Best regards,
Rayagonda

Quoted 3 lines

Regards,
Simon

#21 lore raw

PATCH v3 6/15 board: ns3: default reset type to L3

Hi Rayagonda,

Quoted 106 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 86 lines · Simon Glass

Hi Rayagonda,

Quoted 81 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 9 lines · Simon Glass

Hi Rayagonda,

Quoted 2 lines · Rayagonda Kokatanur

Default "reset" from u-boot to L3 reset.

U-Boot

Thank you, will fix this.

Quoted 18 lines
Quoted 18 lines

"reset" command with argument will trigger L1 reset.

---
 board/broadcom/bcmns3/ns3.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
board/broadcom/bcmns3/ns3.c +0 -0
index 5e644bd466..1221f26ddc 100644
@@ -68,7 +68,23 @@ int dram_init_banksize(void)
        return 0;
 }
 
Quoted 5 lines

board/broadcom/bcmns3/ns3.c int dram_init_banksize(void) · line 72

Quoted 3 lines
board/broadcom/bcmns3/ns3.c +1 -1
-void reset_cpu(ulong addr)
+void reset_cpu(ulong level)
 {

This should be in a sysreset driver. It supports different reset types.

I checked the sysreset driver and found a generic/common psci driver - drivers/sysreset/sysreset_psci.c.
We could use this common driver in our platform.

Right now this common driver uses the same command or function_id for both WARM and COLD reset.
But in our case we should use different commands for WARM and COLD reset.

I am planning to add one kconfig option (USE_FN64_CMD) through which we can select different commands or the same command for COLD reset.

Something like this,

static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)

{
    unsigned long function_id;

    switch (type) {
    case SYSRESET_WARM:
         function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_COLD:
         if (CONFIG_IS_ENABLED(USE_FN64_CMD))
              function_id = PSCI_0_2_FN64_SYSTEM_RESET;
         else
              function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_POWER_OFF:
         function_id = PSCI_0_2_FN_SYSTEM_OFF;
         break;

     default:
         return -ENOSYS;
    }

    invoke_psci_fn(function_id, 0, 0, 0);

    return -EINPROGRESS;
}
Quoted 6 lines
Quoted 3 lines

This way any platform can define/select USE_FN64_CMD if they need different commands for WARM reset.
Please let me know about this approach.

It seems OK, but better would be to use the device tree to determine the command (e.g. compatible string or a property).

I was checking linux psci drivers (drivers/firmware/psci/psci.c), they are handling SYSTEM_RESET and SYSTEM_RESET2 without dt ie they read psci capability, if it supports SYSTEM_RESET2 then they use it else they use SYSTEM_RESET only.
I think, in U-Boot also we should handle in the same way. This is a little bit more work, hence I am planning to handle this as a separate patch set only.
So request you to allow this patch as it is.

Quoted 1 line

Please let me know.

That's fine with me. So for now can we drop the Kconfig and just support SYSTEM_RESET?

Regards,
Simon

#22 lore raw

PATCH v3 6/15 board: ns3: default reset type to L3

Hi Simon,

Quoted 111 lines · Simon Glass

Hi Rayagonda,

Quoted 106 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 86 lines · Simon Glass

Hi Rayagonda,

Quoted 81 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 9 lines · Simon Glass

Hi Rayagonda,

Quoted 2 lines · Rayagonda Kokatanur

Default "reset" from u-boot to L3 reset.

U-Boot

Thank you, will fix this.

Quoted 18 lines
Quoted 18 lines

"reset" command with argument will trigger L1 reset.

---
 board/broadcom/bcmns3/ns3.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
board/broadcom/bcmns3/ns3.c +0 -0
index 5e644bd466..1221f26ddc 100644
@@ -68,7 +68,23 @@ int dram_init_banksize(void)
        return 0;
 }
 
Quoted 5 lines

board/broadcom/bcmns3/ns3.c int dram_init_banksize(void) · line 72

Quoted 3 lines
board/broadcom/bcmns3/ns3.c +1 -1
-void reset_cpu(ulong addr)
+void reset_cpu(ulong level)
 {

This should be in a sysreset driver. It supports different reset types.

I checked the sysreset driver and found a generic/common psci driver - drivers/sysreset/sysreset_psci.c.
We could use this common driver in our platform.

Right now this common driver uses the same command or function_id for both WARM and COLD reset.
But in our case we should use different commands for WARM and COLD reset.

I am planning to add one kconfig option (USE_FN64_CMD) through which we can select different commands or the same command for COLD reset.

Something like this,

static int psci_sysreset_request(struct udevice *dev, enum sysreset_t type)

{
    unsigned long function_id;

    switch (type) {
    case SYSRESET_WARM:
         function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_COLD:
         if (CONFIG_IS_ENABLED(USE_FN64_CMD))
              function_id = PSCI_0_2_FN64_SYSTEM_RESET;
         else
              function_id = PSCI_0_2_FN_SYSTEM_RESET;
         break;

     case SYSRESET_POWER_OFF:
         function_id = PSCI_0_2_FN_SYSTEM_OFF;
         break;

     default:
         return -ENOSYS;
    }

    invoke_psci_fn(function_id, 0, 0, 0);

    return -EINPROGRESS;
}
Quoted 6 lines
Quoted 3 lines

This way any platform can define/select USE_FN64_CMD if they need different commands for WARM reset.
Please let me know about this approach.

It seems OK, but better would be to use the device tree to determine the command (e.g. compatible string or a property).

I was checking linux psci drivers (drivers/firmware/psci/psci.c), they are handling SYSTEM_RESET and SYSTEM_RESET2 without dt ie they read psci capability, if it supports SYSTEM_RESET2 then they use it else they use SYSTEM_RESET only.
I think, in U-Boot also we should handle in the same way. This is a little bit more work, hence I am planning to handle this as a separate patch set only.
So request you to allow this patch as it is.

Quoted 4 lines
Quoted 1 line

Please let me know.

That's fine with me. So for now can we drop the Kconfig and just support SYSTEM_RESET?

For now I will keep this patch as it is, won't use UCLASS_SYSRESET. Later I will push patch to,
-- use UCLASS_SYSRESET
-- Implement SYSTEM_RESET and SYSTEM_RESET2 as per linux.

Best regards,
Rayagonda

Quoted 3 lines

Regards,
Simon

#23 lore raw

PATCH v3 7/15 dt-bindings: memory: ns3: update GIC LPI address

In reply to Rayagonda Kokatanur

Update NS3 GIC LPI address.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 3 +++
 1 file changed, 3 insertions(+)
include/dt-bindings/memory/bcm-ns3-mc.h +3 -0
index b4f78584a5..d6e7717ba2 100644
@@ -31,4 +31,7 @@
 #define BCM_NS3_MEM_CRMU_PT_START  0x880000000
 #define BCM_NS3_MEM_CRMU_PT_LEN    0x200000
 
+#define BCM_NS3_GIC_LPI_BASE      0x8AD70000
+#define BCM_NS3_GIC_LPI_SIZE      0x90000
+
 #endif
Signature · 1 line
2.17.1
#24 lore raw

PATCH v3 7/15 dt-bindings: memory: ns3: update GIC LPI address

Quoted 8 lines · Rayagonda Kokatanur

Update NS3 GIC LPI address.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 3 +++
 1 file changed, 3 insertions(+)

Lower case hex

Can these be in the device tree and use a driver, like syscon maybe?

Quoted 15 lines
include/dt-bindings/memory/bcm-ns3-mc.h +3 -1
index b4f78584a5..d6e7717ba2 100644
@@ -31,4 +31,7 @@
 #define BCM_NS3_MEM_CRMU_PT_START  0x880000000
 #define BCM_NS3_MEM_CRMU_PT_LEN    0x200000
 
+#define BCM_NS3_GIC_LPI_BASE      0x8AD70000
+#define BCM_NS3_GIC_LPI_SIZE      0x90000
+
 #endif
--

2.17.1

#25 lore raw

PATCH v3 7/15 dt-bindings: memory: ns3: update GIC LPI address

Hi Simon,

Quoted 12 lines · Simon Glass
Quoted 8 lines · Rayagonda Kokatanur

Update NS3 GIC LPI address.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 3 +++
 1 file changed, 3 insertions(+)
Quoted 5 lines

Lower case hex

Can these be in the device tree and use a driver, like syscon maybe?

I tried using a device tree and syscon driver class (UCLASS_SYSCON) but I am facing an issue ie

When I call syscon_get_regmap() to get regmap, I am getting zero for regmap->ranges[0].start and regmap->ranges[0].size.
I am passing the parent node udevice pointer to syscon_get_regmap().

I could see syscon_pre_probe() is not getting called during uboot booting, hence regmap is not initialized.

Following are my code changes:

//dt changes:
+ gic_lpi: syscon at 0x8ad70000 {

+               compatible = "syscon";
+               reg = <0x0 0x8ad70000 0x0 0x90000>;
+               status = "okay";
+       };
+
+       scr {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x0 0x61000000 0x05000000>;
+
+               gic: interrupt-controller at 2c00000 {
+                       compatible = "arm,gic-v3";
+                       #interrupt-cells = <3>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       interrupt-controller;
+                       reg = <0x02c00000 0x010000>, /* GICD */

+ <0x02e00000 0x600000>; /* GICR */
+ regmap = <&gic_lpi>;
+ status = "okay";
+ };
+ };
+

//driver changes
+static int gic_v3_its_get_gic_addr(struct gic_v3_its_priv *priv) +{

+       struct udevice *dev;
+       struct regmap *regmap;
+       fdt_addr_t addr;
+       int ret;

+
+ ret = uclass_first_device_err(UCLASS_IRQ, &dev);
+ if (ret && ret != -ENODEV) {
+ pr_err("%s: Canont find irq device\n", __func__);
+ return ret;
+ }
+
+ addr = dev_read_addr_index(dev, 0);
+ if (addr == FDT_ADDR_T_NONE) {
+ pr_err("%s: Failed to get GICD address\n", __func__);
+ return -EINVAL;
+ }
+ priv->gicd_base = addr;
+
+ regmap = syscon_get_regmap(dev);
+ if (!regmap) {
+ pr_err("%s: ** unable to find gic-lpi device\n", __func__);
+ return -ENODEV;
+ }
+
+ priv->lpi_base = regmap->ranges[0].start;
+
+ return 0;
+}

//defconfig changes
CONFIG_DM=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
CONFIG_DM_GPIO=y

If I call uclass_first_device_err(UCLASS_SYSCON, &dev) before syscon_get_regmap(dev) then it works.
Do I need to explicitly call uclass_first_device_err(UCLASS_SYSCON, &dev).

Please let me know.

Best regards,
Rayagonda

Quoted 17 lines
Quoted 17 lines
include/dt-bindings/memory/bcm-ns3-mc.h +3 -1
index b4f78584a5..d6e7717ba2 100644
@@ -31,4 +31,7 @@
 #define BCM_NS3_MEM_CRMU_PT_START  0x880000000
 #define BCM_NS3_MEM_CRMU_PT_LEN    0x200000
 
+#define BCM_NS3_GIC_LPI_BASE      0x8AD70000
+#define BCM_NS3_GIC_LPI_SIZE      0x90000
+
 #endif
--

2.17.1

#26 lore raw

PATCH v3 7/15 dt-bindings: memory: ns3: update GIC LPI address

Hi Simon,

Quoted 100 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 12 lines · Simon Glass
Quoted 8 lines · Rayagonda Kokatanur

Update NS3 GIC LPI address.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 3 +++
 1 file changed, 3 insertions(+)
Quoted 5 lines

Lower case hex

Can these be in the device tree and use a driver, like syscon maybe?

I tried using a device tree and syscon driver class (UCLASS_SYSCON) but I am facing an issue ie

When I call syscon_get_regmap() to get regmap, I am getting zero for regmap->ranges[0].start and regmap->ranges[0].size.
I am passing the parent node udevice pointer to syscon_get_regmap().

I could see syscon_pre_probe() is not getting called during uboot booting, hence regmap is not initialized.

Following are my code changes:

//dt changes:

(quoted diff) +26 -0
+       gic_lpi: syscon at 0x8ad70000 {
+               compatible = "syscon";
+               reg = <0x0 0x8ad70000 0x0 0x90000>;
+               status = "okay";
+       };
+
+       scr {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x0 0x61000000 0x05000000>;
+
+               gic: interrupt-controller at 2c00000 {
+                       compatible = "arm,gic-v3";
+                       #interrupt-cells = <3>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       interrupt-controller;
+                       reg = <0x02c00000 0x010000>, /* GICD */
+                             <0x02e00000 0x600000>; /* GICR */
+                       regmap = <&gic_lpi>;
+                       status = "okay";
+               };
+       };
+

//driver changes

(quoted diff) +30 -0
+static int gic_v3_its_get_gic_addr(struct gic_v3_its_priv *priv)
+{
+       struct udevice *dev;
+       struct regmap *regmap;
+       fdt_addr_t addr;
+       int ret;
+
+       ret = uclass_first_device_err(UCLASS_IRQ, &dev);
+       if (ret && ret != -ENODEV) {
+               pr_err("%s: Canont find irq device\n", __func__);
+               return ret;
+       }
+
+       addr = dev_read_addr_index(dev, 0);
+       if (addr == FDT_ADDR_T_NONE) {
+               pr_err("%s: Failed to get GICD address\n", __func__);
+               return -EINVAL;
+       }
+       priv->gicd_base = addr;
+
+       regmap = syscon_get_regmap(dev);
+       if (!regmap) {
+               pr_err("%s: ** unable to find gic-lpi device\n", __func__);
+               return -ENODEV;
+       }
+
+       priv->lpi_base = regmap->ranges[0].start;
+
+       return 0;
+}

//defconfig changes
CONFIG_DM=y

(quoted diff) +2 -0
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
 CONFIG_DM_GPIO=y
Quoted 5 lines

If I call uclass_first_device_err(UCLASS_SYSCON, &dev) before syscon_get_regmap(dev) then it works.
Do I need to explicitly call uclass_first_device_err(UCLASS_SYSCON, &dev).

Please let me know.

I used uclass_get_device_by_driver() api and it's working. Please ignore the above question.

Thank you,
Rayagonda

Quoted 22 lines

Best regards,
Rayagonda

Quoted 17 lines
Quoted 17 lines
include/dt-bindings/memory/bcm-ns3-mc.h +3 -1
index b4f78584a5..d6e7717ba2 100644
@@ -31,4 +31,7 @@
 #define BCM_NS3_MEM_CRMU_PT_START  0x880000000
 #define BCM_NS3_MEM_CRMU_PT_LEN    0x200000
 
+#define BCM_NS3_GIC_LPI_BASE      0x8AD70000
+#define BCM_NS3_GIC_LPI_SIZE      0x90000
+
 #endif
--

2.17.1

#27 lore raw

PATCH v3 7/15 dt-bindings: memory: ns3: update GIC LPI address

Hi Simon,

Quoted 26 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 21 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 17 lines · Simon Glass
Quoted 8 lines · Rayagonda Kokatanur

Update NS3 GIC LPI address.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 3 +++
 1 file changed, 3 insertions(+)

Lower case hex

Can these be in the device tree and use a driver, like syscon maybe?

I will use dt and syscon to get the LPI base address. This will require change in arch/arm/lib/gic-v3-its.c driver.

Hope this is okay. Please let me know.

Best regards,
Rayagonda

Quoted 113 lines
Quoted 79 lines

I tried using a device tree and syscon driver class (UCLASS_SYSCON) but I am facing an issue ie

When I call syscon_get_regmap() to get regmap, I am getting zero for regmap->ranges[0].start and regmap->ranges[0].size.
I am passing the parent node udevice pointer to syscon_get_regmap().

I could see syscon_pre_probe() is not getting called during uboot booting, hence regmap is not initialized.

Following are my code changes:

//dt changes:

(quoted diff) +26 -0
+       gic_lpi: syscon at 0x8ad70000 {
+               compatible = "syscon";
+               reg = <0x0 0x8ad70000 0x0 0x90000>;
+               status = "okay";
+       };
+
+       scr {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0x0 0x0 0x61000000 0x05000000>;
+
+               gic: interrupt-controller at 2c00000 {
+                       compatible = "arm,gic-v3";
+                       #interrupt-cells = <3>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+                       interrupt-controller;
+                       reg = <0x02c00000 0x010000>, /* GICD */
+                             <0x02e00000 0x600000>; /* GICR */
+                       regmap = <&gic_lpi>;
+                       status = "okay";
+               };
+       };
+

//driver changes

(quoted diff) +30 -0
+static int gic_v3_its_get_gic_addr(struct gic_v3_its_priv *priv)
+{
+       struct udevice *dev;
+       struct regmap *regmap;
+       fdt_addr_t addr;
+       int ret;
+
+       ret = uclass_first_device_err(UCLASS_IRQ, &dev);
+       if (ret && ret != -ENODEV) {
+               pr_err("%s: Canont find irq device\n", __func__);
+               return ret;
+       }
+
+       addr = dev_read_addr_index(dev, 0);
+       if (addr == FDT_ADDR_T_NONE) {
+               pr_err("%s: Failed to get GICD address\n", __func__);
+               return -EINVAL;
+       }
+       priv->gicd_base = addr;
+
+       regmap = syscon_get_regmap(dev);
+       if (!regmap) {
+               pr_err("%s: ** unable to find gic-lpi device\n", __func__);
+               return -ENODEV;
+       }
+
+       priv->lpi_base = regmap->ranges[0].start;
+
+       return 0;
+}

//defconfig changes
CONFIG_DM=y

(quoted diff) +2 -0
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
 CONFIG_DM_GPIO=y
Quoted 5 lines

If I call uclass_first_device_err(UCLASS_SYSCON, &dev) before syscon_get_regmap(dev) then it works.
Do I need to explicitly call uclass_first_device_err(UCLASS_SYSCON, &dev).

Please let me know.

I used uclass_get_device_by_driver() api and it's working. Please ignore the above question.

Thank you,
Rayagonda

Quoted 22 lines

Best regards,
Rayagonda

Quoted 17 lines
Quoted 17 lines
include/dt-bindings/memory/bcm-ns3-mc.h +3 -1
index b4f78584a5..d6e7717ba2 100644
@@ -31,4 +31,7 @@
 #define BCM_NS3_MEM_CRMU_PT_START  0x880000000
 #define BCM_NS3_MEM_CRMU_PT_LEN    0x200000
 
+#define BCM_NS3_GIC_LPI_BASE      0x8AD70000
+#define BCM_NS3_GIC_LPI_SIZE      0x90000
+
 #endif
--

2.17.1

#28 lore raw

PATCH v3 7/15 dt-bindings: memory: ns3: update GIC LPI address

Hi Rayagonda,

Quoted 21 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 16 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 11 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 7 lines · Simon Glass
Quoted 4 lines · Rayagonda Kokatanur

Update NS3 GIC LPI address.

Signed-off-by Rayagonda Kokatanur <

[email protected]>

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
---
 include/dt-bindings/memory/bcm-ns3-mc.h | 3 +++
 1 file changed, 3 insertions(+)
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Lower case hex

Can these be in the device tree and use a driver, like syscon maybe?

I will use dt and syscon to get the LPI base address. This will require change in arch/arm/lib/gic-v3-its.c driver.

Hope this is okay. Please let me know.

Yes of course, change whatever you like.

Regards,
SImon

#29 lore raw

PATCH v3 7/15 dt-bindings: memory: ns3: update GIC LPI address

Quoted 34 lines · Simon Glass

Hi Rayagonda,

Quoted 30 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 25 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 20 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 16 lines · Simon Glass
Quoted 8 lines · Rayagonda Kokatanur

Update NS3 GIC LPI address.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 3 +++
 1 file changed, 3 insertions(+)

Lower case hex

Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Can these be in the device tree and use a driver, like syscon maybe?

I will use dt and syscon to get the LPI base address. This will require change in arch/arm/lib/gic-v3-its.c driver.

Hope this is okay. Please let me know.

Yes of course, change whatever you like.

Thank you Simon.

Quoted 3 lines

Regards,
SImon

#30 lore raw

PATCH v3 7/15 dt-bindings: memory: ns3: update GIC LPI address

Hi Simon,

Quoted 34 lines · Rayagonda Kokatanur
Quoted 32 lines · Simon Glass

Hi Rayagonda,

Quoted 28 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 23 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 18 lines · Rayagonda Kokatanur

Hi Simon,

Quoted 14 lines · Simon Glass
Quoted 8 lines · Rayagonda Kokatanur

Update NS3 GIC LPI address.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 3 +++
 1 file changed, 3 insertions(+)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Lower case hex

Can these be in the device tree and use a driver, like syscon maybe?

I will use dt and syscon to get the LPI base address. This will require change in arch/arm/lib/gic-v3-its.c driver.

Hope this is okay. Please let me know.

I have changed arch/arm/lib/gic-v3-its.c driver to address these comments and pushed separate patches.
Please review them.

Best regards,
Rayagonda

Quoted 8 lines
Quoted 2 lines

Yes of course, change whatever you like.

Thank you Simon.

Quoted 3 lines

Regards,
SImon

#31 lore raw

PATCH v3 8/15 board: ns3: program GIC LPI tables

In reply to Rayagonda Kokatanur

U-boot programs the GIC LPI configuration tables and enables the LPI table.

---
 board/broadcom/bcmns3/ns3.c | 12 ++++++++++++
 include/configs/bcm_ns3.h   |  6 ++++++
 2 files changed, 18 insertions(+)
board/broadcom/bcmns3/ns3.c +12 -0
index 1221f26ddc..d4f374a7c6 100644
@@ -6,9 +6,12 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/gic.h>
+#include <asm/gic-v3.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
 #include <asm/arch-bcmns3/bl33_info.h>
+#include <dt-bindings/memory/bcm-ns3-mc.h>
 
 static struct mm_region ns3_mem_map[] = {
 	{
@@ -88,3 +91,12 @@ void reset_cpu(ulong level)
 		psci_system_reset();
 	}
 }
+
+#ifdef CONFIG_OF_BOARD_SETUP
+int ft_board_setup(void *fdt, bd_t *bd)
+{
+	gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS);
+
+	return 0;
+}
+#endif /* CONFIG_OF_BOARD_SETUP */
include/configs/bcm_ns3.h +6 -0
index 02a736456a..a17b9d51c0 100644
@@ -37,4 +37,10 @@
 #define CONFIG_SYS_MAXARGS		64
 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
+/* Generic Interrupt Controller Definitions */
+#define GICD_BASE			0x63C00000
+#define GICR_BASE			0x63E00000
+/* Number of GIC re-distributors */
+#define MAX_GIC_REDISTRIBUTORS		8
+
 #endif /* __BCM_NS3_H */
Signature · 1 line
2.17.1
#32 lore raw

PATCH v3 8/15 board: ns3: program GIC LPI tables

Hi Rayagonda,

Quoted 46 lines · Rayagonda Kokatanur

U-boot programs the GIC LPI configuration tables and enables the LPI table.

---
 board/broadcom/bcmns3/ns3.c | 12 ++++++++++++
 include/configs/bcm_ns3.h   |  6 ++++++
 2 files changed, 18 insertions(+)
board/broadcom/bcmns3/ns3.c +12 -0
index 1221f26ddc..d4f374a7c6 100644
@@ -6,9 +6,12 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/gic.h>
+#include <asm/gic-v3.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
 #include <asm/arch-bcmns3/bl33_info.h>
+#include <dt-bindings/memory/bcm-ns3-mc.h>
 
 static struct mm_region ns3_mem_map[] = {
        {
@@ -88,3 +91,12 @@ void reset_cpu(ulong level)
                psci_system_reset();
        }
 }
+
+#ifdef CONFIG_OF_BOARD_SETUP
+int ft_board_setup(void *fdt, bd_t *bd)
+{
+       gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS);
+
+       return 0;
+}
+#endif /* CONFIG_OF_BOARD_SETUP */
include/configs/bcm_ns3.h +0 -0
index 02a736456a..a17b9d51c0 100644

include/configs/bcm_ns3.h line 42

Quoted 6 lines
include/configs/bcm_ns3.h +3 -0
@@ -37,4 +37,10 @@
 #define CONFIG_SYS_MAXARGS             64
 #define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
 
+/* Generic Interrupt Controller Definitions */
+#define GICD_BASE                      0x63C00000
+#define GICR_BASE                      0x63E00000

Please use device tree and a UCLASS_IRQ driver

Quoted 7 lines
include/configs/bcm_ns3.h +3 -1
+/* Number of GIC re-distributors */
+#define MAX_GIC_REDISTRIBUTORS         8
+
 #endif /* __BCM_NS3_H */
--

2.17.1

Regards,
Simon

#33 lore raw

PATCH v3 8/15 board: ns3: program GIC LPI tables

Hi Simon,

Quoted 54 lines · Simon Glass

Hi Rayagonda,

Quoted 49 lines · Rayagonda Kokatanur

U-boot programs the GIC LPI configuration tables and enables the LPI table.

---
 board/broadcom/bcmns3/ns3.c | 12 ++++++++++++
 include/configs/bcm_ns3.h   |  6 ++++++
 2 files changed, 18 insertions(+)
board/broadcom/bcmns3/ns3.c +12 -0
index 1221f26ddc..d4f374a7c6 100644
@@ -6,9 +6,12 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/gic.h>
+#include <asm/gic-v3.h>
 #include <asm/system.h>
 #include <asm/armv8/mmu.h>
 #include <asm/arch-bcmns3/bl33_info.h>
+#include <dt-bindings/memory/bcm-ns3-mc.h>
 
 static struct mm_region ns3_mem_map[] = {
        {
@@ -88,3 +91,12 @@ void reset_cpu(ulong level)
                psci_system_reset();
        }
 }
+
+#ifdef CONFIG_OF_BOARD_SETUP
+int ft_board_setup(void *fdt, bd_t *bd)
+{
+       gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS);
+
+       return 0;
+}
+#endif /* CONFIG_OF_BOARD_SETUP */
include/configs/bcm_ns3.h +0 -0
index 02a736456a..a17b9d51c0 100644
@@ -37,4 +37,10 @@
 #define CONFIG_SYS_MAXARGS             64
 #define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
 
Quoted 5 lines

include/configs/bcm_ns3.h line 42

Quoted 3 lines
include/configs/bcm_ns3.h +3 -0
+/* Generic Interrupt Controller Definitions */
+#define GICD_BASE                      0x63C00000
+#define GICR_BASE                      0x63E00000

Please use device tree and a UCLASS_IRQ driver

Thank you. I will use UCLASS_IRQ.

This will require changes in arch/arm/lib/gic-v3-its.c driver ie I will use UCLASS_IRQ in arch/arm/lib/gic-v3-its.c driver to get GICD and GICR base address.

Hope this is okay. Please let me know.

Best regards,
Rayagonda

Quoted 12 lines
Quoted 9 lines
include/configs/bcm_ns3.h +3 -1
+/* Number of GIC re-distributors */
+#define MAX_GIC_REDISTRIBUTORS         8
+
 #endif /* __BCM_NS3_H */
--

2.17.1

Regards,
Simon

#34 lore raw

PATCH v3 9/15 configs: ns3: enable GIC ITS LPI table programing

In reply to Rayagonda Kokatanur

Enables the GIC_V3 ITS LPI configuration table and LPI table.

---
 configs/bcm_ns3_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/bcm_ns3_defconfig +1 -0
index 7e51a926f7..040e753f9f 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_GIC_V3_ITS=y
 CONFIG_TARGET_BCMNS3=y
 CONFIG_SYS_TEXT_BASE=0xFF000000
 CONFIG_ENV_SIZE=0x80000
Signature · 1 line
2.17.1
#35 lore raw

PATCH v3 9/15 configs: ns3: enable GIC ITS LPI table programing

Quoted 3 lines · Rayagonda Kokatanur

Enables the GIC_V3 ITS LPI configuration table and LPI table.

Please write out these in full somewhere. As it is they are meaningless to people reading the commit.

Quoted 7 lines
---
 configs/bcm_ns3_defconfig | 1 +
 1 file changed, 1 insertion(+)
Quoted 13 lines
configs/bcm_ns3_defconfig +1 -1
index 7e51a926f7..040e753f9f 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_GIC_V3_ITS=y
 CONFIG_TARGET_BCMNS3=y
 CONFIG_SYS_TEXT_BASE=0xFF000000
 CONFIG_ENV_SIZE=0x80000
--

2.17.1

#36 lore raw

PATCH v3 10/15 dt-bindings: memory: ns3: add ddr memory definition

In reply to Rayagonda Kokatanur

Add ddr memory definitions.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 30 ++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
include/dt-bindings/memory/bcm-ns3-mc.h +29 -1
index d6e7717ba2..d04b842d19 100644
@@ -7,7 +7,8 @@
 #define DT_BINDINGS_BCM_NS3_MC_H
 
 /*
- * Reserved Memory Map : SHMEM & TZDRAM.
+ * +--------+----------+ 0x8B000000
+ * | NITRO CRASH DUMP  |  32MB
  * +--------+----------+ 0x8D000000
  * | SHMEM (NS)         | 16 MB
  * +-------------------+ 0x8E000000
@@ -20,6 +21,10 @@
  * +-------------------+ 0x8F100000
  */
 
+#define BCM_NS3_MEM_NITRO_CRASH_START  0x8AE00000
+#define BCM_NS3_MEM_NITRO_CRASH_LEN    0x21fffff
+#define BCM_NS3_MEM_NITRO_CRASH_SIZE   0x2200000
+
 #define BCM_NS3_MEM_SHARE_START    0x8D000000
 #define BCM_NS3_MEM_SHARE_LEN      0x020FFFFF
 
@@ -31,7 +36,30 @@
 #define BCM_NS3_MEM_CRMU_PT_START  0x880000000
 #define BCM_NS3_MEM_CRMU_PT_LEN    0x200000
 
+/* default memory starting address and length */
+#define BCM_NS3_MEM_START          0x80000000UL
+#define BCM_NS3_MEM_LEN            0x80000000UL
+#define BCM_NS3_MEM_END            (BCM_NS3_MEM_START + BCM_NS3_MEM_LEN)
+
+/* memory starting address and length for BANK_1 */
+#define BCM_NS3_BANK_1_MEM_START   0x880000000UL
+#define BCM_NS3_BANK_1_MEM_LEN     0x180000000UL
+
+/* memory layout information */
+#define BCM_NS3_DDR_INFO_BASE      0x8F220000
+#define BCM_NS3_DDR_INFO_RSVD_LEN  0x1000
+#define BCM_NS3_DDR_INFO_LEN       73
+#define BCM_NS3_DDR_INFO_SIG       0x42434d44
+#define BCM_NS3_MAX_NR_BANKS       4
+
 #define BCM_NS3_GIC_LPI_BASE      0x8AD70000
 #define BCM_NS3_GIC_LPI_SIZE      0x90000
 
+#define BCM_NS3_MEM_RSVE_START    BCM_NS3_GIC_LPI_BASE
+#define BCM_NS3_MEM_RSVE_END      ((BCM_NS3_MEM_ELOG_START + \
+				   BCM_NS3_MEM_ELOG_LEN) - \
+				   BCM_NS3_MEM_RSVE_START)
+
+#define BCM_NS3_CRMU_PGT_START    0x880000000UL
+#define BCM_NS3_CRMU_PGT_SIZE     0x100000
 #endif
Signature · 1 line
2.17.1
#37 lore raw

PATCH v3 10/15 dt-bindings: memory: ns3: add ddr memory definition

Quoted 8 lines · Rayagonda Kokatanur

Add ddr memory definitions.

---
 include/dt-bindings/memory/bcm-ns3-mc.h | 30 ++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

Please use lower-case hex throughout.

Quoted 59 lines
include/dt-bindings/memory/bcm-ns3-mc.h +29 -2
index d6e7717ba2..d04b842d19 100644
@@ -7,7 +7,8 @@
 #define DT_BINDINGS_BCM_NS3_MC_H
 
 /*
- * Reserved Memory Map : SHMEM & TZDRAM.
+ * +--------+----------+ 0x8B000000
+ * | NITRO CRASH DUMP  |  32MB
  * +--------+----------+ 0x8D000000
  * | SHMEM (NS)         | 16 MB
  * +-------------------+ 0x8E000000
@@ -20,6 +21,10 @@
  * +-------------------+ 0x8F100000
  */
 
+#define BCM_NS3_MEM_NITRO_CRASH_START  0x8AE00000
+#define BCM_NS3_MEM_NITRO_CRASH_LEN    0x21fffff
+#define BCM_NS3_MEM_NITRO_CRASH_SIZE   0x2200000
+
 #define BCM_NS3_MEM_SHARE_START    0x8D000000
 #define BCM_NS3_MEM_SHARE_LEN      0x020FFFFF
 
@@ -31,7 +36,30 @@
 #define BCM_NS3_MEM_CRMU_PT_START  0x880000000
 #define BCM_NS3_MEM_CRMU_PT_LEN    0x200000
 
+/* default memory starting address and length */
+#define BCM_NS3_MEM_START          0x80000000UL
+#define BCM_NS3_MEM_LEN            0x80000000UL
+#define BCM_NS3_MEM_END            (BCM_NS3_MEM_START + BCM_NS3_MEM_LEN)
+
+/* memory starting address and length for BANK_1 */
+#define BCM_NS3_BANK_1_MEM_START   0x880000000UL
+#define BCM_NS3_BANK_1_MEM_LEN     0x180000000UL
+
+/* memory layout information */
+#define BCM_NS3_DDR_INFO_BASE      0x8F220000
+#define BCM_NS3_DDR_INFO_RSVD_LEN  0x1000
+#define BCM_NS3_DDR_INFO_LEN       73
+#define BCM_NS3_DDR_INFO_SIG       0x42434d44
+#define BCM_NS3_MAX_NR_BANKS       4
+
 #define BCM_NS3_GIC_LPI_BASE      0x8AD70000
 #define BCM_NS3_GIC_LPI_SIZE      0x90000
 
+#define BCM_NS3_MEM_RSVE_START    BCM_NS3_GIC_LPI_BASE
+#define BCM_NS3_MEM_RSVE_END      ((BCM_NS3_MEM_ELOG_START + \
+                                  BCM_NS3_MEM_ELOG_LEN) - \
+                                  BCM_NS3_MEM_RSVE_START)
+
+#define BCM_NS3_CRMU_PGT_START    0x880000000UL
+#define BCM_NS3_CRMU_PGT_SIZE     0x100000
 #endif
--

2.17.1

#38 lore raw

PATCH v3 11/15 board: ns3: define ddr memory layout

In reply to Rayagonda Kokatanur

Add both DRAM banks memory information and
the corresponding MMU page table mappings.

---
 arch/arm/dts/ns3-board.dts  | 23 ++++++++++
 board/broadcom/bcmns3/ns3.c | 83 +++++++++++++++++++++++++++++++++++--
 configs/bcm_ns3_defconfig   |  2 +
 3 files changed, 105 insertions(+), 3 deletions(-)
arch/arm/dts/ns3-board.dts +23 -0
index 54e56879a5..c660e74dc8 100644
@@ -5,6 +5,29 @@
 
 /dts-v1/;
 
+#include <dt-bindings/memory/bcm-ns3-mc.h>
+
+/*
+ * Single mem reserve region which includes the following:
+ * Components name	Start Addr	Size
+ * ------------------------------------------------
+ * GIC LPI tables	0x8AD7_0000	0x0009_0000
+ * Nitro FW		0x8AE0_0000	0x0020_0000
+ * Nitro Crash dump	0x8B00_0000	0x0200_0000
+ * OPTEE OS		0x8D00_0000	0x0200_0000
+ * BL31 services	0x8F00_0000	0x0010_0000
+ * Tmon			0x8F10_0000	0x0000_1000
+ * LPM/reserved		0x8F10_1000	0x0000_1000
+ * ATF to Bl33 info	0x8F10_2000	0x0000_1000
+ * ATF error logs	0x8F10_3000	0x0001_0000
+ * Error log parser	0x8F11_3000	0x0010_0000
+ */
+
+/memreserve/ BCM_NS3_MEM_RSVE_START BCM_NS3_MEM_RSVE_END;
+
+/* CRMU page tables */
+/memreserve/ BCM_NS3_CRMU_PGT_START BCM_NS3_CRMU_PGT_SIZE;
+
 #include "ns3.dtsi"
 
 / {
board/broadcom/bcmns3/ns3.c +80 -3

113 lines not on this page · raw message

configs/bcm_ns3_defconfig +2 -0
index 040e753f9f..9adb44cb51 100644
@@ -4,6 +4,7 @@ CONFIG_TARGET_BCMNS3=y
 CONFIG_SYS_TEXT_BASE=0xFF000000
 CONFIG_ENV_SIZE=0x80000
 CONFIG_NR_DRAM_BANKS=2
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_LOGLEVEL=7
 CONFIG_SILENT_CONSOLE=y
 CONFIG_SILENT_U_BOOT_ONLY=y
@@ -21,3 +22,4 @@ CONFIG_CLK=y
 CONFIG_CLK_CCF=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
+CONFIG_SPL_OF_LIBFDT=y
Signature · 1 line
2.17.1
#39 lore raw

PATCH v3 11/15 board: ns3: define ddr memory layout

Hi Rayagonda,

Quoted 4 lines · Rayagonda Kokatanur

Add both DRAM banks memory information and
the corresponding MMU page table mappings.

Quoted 8 lines
---
 arch/arm/dts/ns3-board.dts  | 23 ++++++++++
 board/broadcom/bcmns3/ns3.c | 83 +++++++++++++++++++++++++++++++++++--
 configs/bcm_ns3_defconfig   |  2 +
 3 files changed, 105 insertions(+), 3 deletions(-)

nits below

Quoted 84 lines
arch/arm/dts/ns3-board.dts +23 -0
index 54e56879a5..c660e74dc8 100644
@@ -5,6 +5,29 @@
 
 /dts-v1/;
 
+#include <dt-bindings/memory/bcm-ns3-mc.h>
+
+/*
+ * Single mem reserve region which includes the following:
+ * Components name     Start Addr      Size
+ * ------------------------------------------------
+ * GIC LPI tables      0x8AD7_0000     0x0009_0000
+ * Nitro FW            0x8AE0_0000     0x0020_0000
+ * Nitro Crash dump    0x8B00_0000     0x0200_0000
+ * OPTEE OS            0x8D00_0000     0x0200_0000
+ * BL31 services       0x8F00_0000     0x0010_0000
+ * Tmon                        0x8F10_0000     0x0000_1000
+ * LPM/reserved                0x8F10_1000     0x0000_1000
+ * ATF to Bl33 info    0x8F10_2000     0x0000_1000
+ * ATF error logs      0x8F10_3000     0x0001_0000
+ * Error log parser    0x8F11_3000     0x0010_0000
+ */
+
+/memreserve/ BCM_NS3_MEM_RSVE_START BCM_NS3_MEM_RSVE_END;
+
+/* CRMU page tables */
+/memreserve/ BCM_NS3_CRMU_PGT_START BCM_NS3_CRMU_PGT_SIZE;
+
 #include "ns3.dtsi"
 
 / {
board/broadcom/bcmns3/ns3.c +18 -3
index d4f374a7c6..85d097887e 100644
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <asm/io.h>
 #include <asm/gic.h>
 #include <asm/gic-v3.h>
@@ -13,6 +14,8 @@
 #include <asm/arch-bcmns3/bl33_info.h>
 #include <dt-bindings/memory/bcm-ns3-mc.h>
 
+#define BANK_OFFSET(bank)      ((u64)BCM_NS3_DDR_INFO_BASE + 8 + ((bank) * 16))
+
 static struct mm_region ns3_mem_map[] = {
        {
                .virt = 0x0UL,
@@ -22,9 +25,15 @@ static struct mm_region ns3_mem_map[] = {
                         PTE_BLOCK_NON_SHARE |
                         PTE_BLOCK_PXN | PTE_BLOCK_UXN
        }, {
-               .virt = 0x80000000UL,
-               .phys = 0x80000000UL,
-               .size = 0x80000000UL,
+               .virt = BCM_NS3_MEM_START,
+               .phys = BCM_NS3_MEM_START,
+               .size = BCM_NS3_MEM_LEN,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+                        PTE_BLOCK_INNER_SHARE
+       }, {
+               .virt = BCM_NS3_BANK_1_MEM_START,
+               .phys = BCM_NS3_BANK_1_MEM_START,
+               .size = BCM_NS3_BANK_1_MEM_LEN,
                .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
                         PTE_BLOCK_INNER_SHARE
        }, {
@@ -43,6 +52,72 @@ DECLARE_GLOBAL_DATA_PTR;
  */
 struct bl33_info *bl33_info __section(".data");
 
+/*
+ * Run modulo 256 checksum calculation and return the calculated checksum
+ */
+static u8 checksum_calc(u8 *p, unsigned int len)
+{
+       unsigned int i;

board/broadcom/bcmns3/ns3.c DECLARE_GLOBAL_DATA_PTR; · line 70

Quoted 10 lines
board/broadcom/bcmns3/ns3.c +10 -0
+       u8 chksum = 0;
+
+       for (i = 0; i < len; i++)
+               chksum += p[i];
+
+       return chksum;
+}
+
+/*
+ * This function parses the memory layout informaion from a reserved area in

information

Quoted 4 lines
board/broadcom/bcmns3/ns3.c +4 -0
+ * DDR, and then fix up the FDT before passing it to Linux.
+ *
+ * In the case of error, do nothing and the default memory layout in DT will
+ * be used

board/broadcom/bcmns3/ns3.c DECLARE_GLOBAL_DATA_PTR; · line 84

Quoted 10 lines
board/broadcom/bcmns3/ns3.c +10 -0
+ */
+static void mem_info_parse_fixup(void *fdt)
+{
+       u32 *p32, sig, i, nr_banks;
+       u64 *p64;
+       u64 start[BCM_NS3_MAX_NR_BANKS];
+       u64 len[BCM_NS3_MAX_NR_BANKS];
+
+       /* validate signature */
+       p32 = (u32 *)BCM_NS3_DDR_INFO_BASE;

Use a struct instead of ad-hoc pointer reading. Here I think you want something like:

struct xxx_dram_hdr {
u32 sig;
struct xxx_dram_bank bank[MAX_BANKS];
};

board/broadcom/bcmns3/ns3.c DECLARE_GLOBAL_DATA_PTR; · line 88

Quoted 4 lines
board/broadcom/bcmns3/ns3.c +4 -0
+       sig = *p32;
+       if (sig != BCM_NS3_DDR_INFO_SIG) {
+               printf("DDR info signature 0x%x invalid\n", sig);
+               return;

Return error code

Quoted 20 lines
board/broadcom/bcmns3/ns3.c +20 -0
+       }
+
+       /* run checksum test to validate data  */
+       if (checksum_calc((u8 *)p32, BCM_NS3_DDR_INFO_LEN) != 0) {
+               printf("Checksum on DDR info failed\n");
+               return;
+       }
+
+       /* parse information for each bank */
+       nr_banks = 0;
+       for (i = 0; i < BCM_NS3_MAX_NR_BANKS; i++) {
+               /* skip banks with a length of zero */
+               p64 = (u64 *)BANK_OFFSET(i);
+               if (*(p64 + 1) == 0)
+                       continue;
+
+               start[i] = *p64;
+               len[i] = *(p64 + 1);
+
+               printf("mem[%u] 0x%llx - 0x%llx\n", i, start[i],

board/broadcom/bcmns3/ns3.c DECLARE_GLOBAL_DATA_PTR; · line 118

Quoted 10 lines
board/broadcom/bcmns3/ns3.c +10 -0
+                      start[i] + len[i] - 1);
+               nr_banks++;
+       }
+
+       if (!nr_banks) {
+               printf("No DDR banks detected\n");
+               return;
+       }
+
+       fdt_fixup_memory_banks(fdt, start, len, nr_banks);

Check error - this can fail.

board/broadcom/bcmns3/ns3.c int ft_board_setup(void *fdt, bd_t *bd) · line 175

Quoted 10 lines
board/broadcom/bcmns3/ns3.c +3 -0
+}
+
 int board_init(void)
 {
        if (bl33_info->version != BL33_INFO_VERSION)
@@ -97,6 +172,8 @@ int ft_board_setup(void *fdt, bd_t *bd)
 {
        gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS);
 
+       mem_info_parse_fixup(fdt);

Check error.

Quoted 22 lines
board/broadcom/bcmns3/ns3.c +1 -0
+
        return 0;
 }
 #endif /* CONFIG_OF_BOARD_SETUP */
configs/bcm_ns3_defconfig +2 -1
index 040e753f9f..9adb44cb51 100644
@@ -4,6 +4,7 @@ CONFIG_TARGET_BCMNS3=y
 CONFIG_SYS_TEXT_BASE=0xFF000000
 CONFIG_ENV_SIZE=0x80000
 CONFIG_NR_DRAM_BANKS=2
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_LOGLEVEL=7
 CONFIG_SILENT_CONSOLE=y
 CONFIG_SILENT_U_BOOT_ONLY=y
@@ -21,3 +22,4 @@ CONFIG_CLK=y
 CONFIG_CLK_CCF=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
+CONFIG_SPL_OF_LIBFDT=y
--
Quoted 2 lines

2.17.1

Regards,
Simon

#40 lore raw

PATCH v3 12/15 board: ns3: limit U-boot relocation within 16MB memory

In reply to Rayagonda Kokatanur

From: Bharat Kumar Reddy Gooty <[email protected]>

By default re-location happens to higher address of DDR, i.e, DDR start + DDR size.

Limit re-location to happen within 16MB memory,
start 0xFF00_0000 and end 0x1_0000_0000

---
 board/broadcom/bcmns3/ns3.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
board/broadcom/bcmns3/ns3.c +19 -3
index 85d097887e..0dd78cde34 100644
@@ -120,6 +120,11 @@ static void mem_info_parse_fixup(void *fdt)
 
 int board_init(void)
 {
+	/* Setup memory using "memory" node from DTB */
+	if (fdtdec_setup_mem_size_base() != 0)
+		return -EINVAL;
+	fdtdec_setup_memory_banksize();
+
 	if (bl33_info->version != BL33_INFO_VERSION)
 		printf("*** warning: ATF BL31 and u-boot not in sync! ***\n");
 
@@ -133,19 +138,30 @@ int board_late_init(void)
 
 int dram_init(void)
 {
-	if (fdtdec_setup_mem_size_base() != 0)
-		return -EINVAL;
+	/*
+	 * Mark ram base as the last 16MB of 2GB DDR, which is 0xFF00_0000.
+	 * So that relocation happens with in the last 16MB memory.
+	 */
+	gd->ram_base = (phys_size_t)(BCM_NS3_MEM_END - SZ_16M);
+	gd->ram_size = (unsigned long)SZ_16M;
 
 	return 0;
 }
 
 int dram_init_banksize(void)
 {
-	fdtdec_setup_memory_banksize();
+	gd->bd->bi_dram[0].start = (BCM_NS3_MEM_END - SZ_16M);
+	gd->bd->bi_dram[0].size = SZ_16M;
 
 	return 0;
 }
 
+/* Limit RAM used by U-Boot to the DDR first bank End region */
+ulong board_get_usable_ram_top(ulong total_size)
+{
+	return BCM_NS3_MEM_END;
+}
+
 void reset_cpu(ulong level)
 {
 #define L3_RESET 30
Signature · 1 line
2.17.1
#41 lore raw

PATCH v3 12/15 board: ns3: limit U-boot relocation within 16MB memory

Quoted 4 lines · Rayagonda Kokatanur

From: Bharat Kumar Reddy Gooty <[email protected]>

By default re-location happens to higher address of DDR,

relocation happens to a higher address

Quoted 4 lines

i.e, DDR start + DDR size.

Limit re-location to happen within 16MB memory,
start 0xFF00_0000 and end 0x1_0000_0000

Please add the motivation for this patch. Why?

Quoted 7 lines
---
 board/broadcom/bcmns3/ns3.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
#42 lore raw

PATCH v3 12/15 board: ns3: limit U-boot relocation within 16MB memory

Quoted 9 lines · Simon Glass
Quoted 4 lines · Rayagonda Kokatanur

From: Bharat Kumar Reddy Gooty <[email protected]>

By default re-location happens to higher address of DDR,

relocation happens to a higher address

Thank you, will fix it.

Quoted 7 lines
Quoted 5 lines

i.e, DDR start + DDR size.

Limit re-location to happen within 16MB memory,
start 0xFF00_0000 and end 0x1_0000_0000

Please add the motivation for this patch. Why?

We use u-boot to collect the ramdump. We are restricting the u-boot to use only 16MB. So that we can reserve only 16MB DDR

Thanks,
Rayagonda

Quoted 10 lines
Quoted 8 lines
---
 board/broadcom/bcmns3/ns3.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
#43 lore raw

PATCH v3 12/15 board: ns3: limit U-boot relocation within 16MB memory

Hi Rayagonda,

Quoted 16 lines · Rayagonda Kokatanur
Quoted 9 lines · Simon Glass
Quoted 4 lines · Rayagonda Kokatanur

From: Bharat Kumar Reddy Gooty <[email protected]>

By default re-location happens to higher address of DDR,

relocation happens to a higher address

Thank you, will fix it.

Quoted 3 lines
Quoted 3 lines

i.e, DDR start + DDR size.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Limit re-location to happen within 16MB memory,
start 0xFF00_0000 and end 0x1_0000_0000

Please add the motivation for this patch. Why?

We use u-boot to collect the ramdump. We are restricting the u-boot to use only 16MB. So that we can reserve only 16MB DDR

U-Boot

So you are wanting to leave most of the memory alone so you can check it for this?

OK that's the info needed in your commit message.

Regards,
Simon

#44 lore raw

PATCH v3 12/15 board: ns3: limit U-boot relocation within 16MB memory

Quoted 24 lines · Simon Glass

Hi Rayagonda,

Quoted 19 lines · Rayagonda Kokatanur
Quoted 9 lines · Simon Glass
Quoted 4 lines · Rayagonda Kokatanur

From: Bharat Kumar Reddy Gooty <[email protected]>

By default re-location happens to higher address of DDR,

relocation happens to a higher address

Thank you, will fix it.

Quoted 6 lines
Quoted 5 lines

i.e, DDR start + DDR size.

Limit re-location to happen within 16MB memory,
start 0xFF00_0000 and end 0x1_0000_0000

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Please add the motivation for this patch. Why?

We use u-boot to collect the ramdump. We are restricting the u-boot to use only 16MB. So that we can reserve only 16MB DDR

U-Boot

Thank you.

Quoted 3 lines

So you are wanting to leave most of the memory alone so you can check it for this?

Yes.

Quoted 2 lines

OK that's the info needed in your commit message.

Thank you, I will update commit message.

Regards,
Rayagonda

Quoted 3 lines

Regards,
Simon

#45 lore raw

PATCH v3 13/15 include/configs: ns3: add env variables for Linux boot

In reply to Rayagonda Kokatanur

From: Bharat Gooty <[email protected]>

Add env variables and commands for booting Linux.

---
 include/configs/bcm_ns3.h | 366 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 366 insertions(+)
include/configs/bcm_ns3.h +366 -0
index a17b9d51c0..5e135ec319 100644
@@ -43,4 +43,370 @@
 /* Number of GIC re-distributors */
 #define MAX_GIC_REDISTRIBUTORS		8
 
+/*
+ * Increase max uncompressed/gunzip size, keeping size same as EMMC linux
+ * partition.
+ */
+#define CONFIG_SYS_BOOTM_LEN		0x01800000
+
+/* Env configuration */
+#define CONFIG_SYS_MMC_ENV_DEV		0
+#define CONFIG_SYS_MMC_ENV_PART		0
+
+/* Access eMMC Boot_1 and Boot_2 partitions */
+#define CONFIG_SUPPORT_EMMC_BOOT
+
+/* enable 64-bit PCI resources */
+#define CONFIG_SYS_PCI_64BIT		1
+
+#define CONSOLE_ARGS "console_args=console=ttyS0,115200n8\0"
+#define MAX_CPUS "max_cpus=maxcpus=8\0"
+#define OS_LOG_LEVEL "log_level=loglevel=7\0"
+#define EXTRA_ARGS "extra_args=earlycon=uart8250,mmio32,0x68A10000 " \
+		   "earlyelog=" __stringify(ELOG_AP_UART_LOG_BASE) ",0x10000 " \
+		   "crashkernel=512M reboot=w\0"
+
+#define PCIE_ARGS "pcie_args=pci=pcie_bus_safe pcie_ports=native vfio_pci.disable_idle_d3=1\0"
+
+#ifdef CONFIG_BCM_SF2_ETH
+#define ETH_ADDR "ethaddr=00:0A:F7:95:65:A4\0"
+#define NET_ARGS "bgmac_platform.ethaddr=${ethaddr} " \
+	"ip=${ipaddr}::${gatewayip}:${netmask}::${ethif}:off"
+#else
+#define ETH_ADDR
+#define NET_ARGS
+#endif
+
+#define RESERVED_MEM "reserved_mem=memmap=0xff000000$0x1000000\0"
+
+#define BASE_ARGS "${console_args} ${extra_args} ${pcie_args}" \
+		  " ${max_cpus}  ${log_level} ${reserved_mem}"
+#define SETBOOTARGS "setbootargs=setenv bootargs " BASE_ARGS " " NET_ARGS "\0"
+
+#define UPDATEME_FLASH_PARAMS "bcm_compat_level=4\0" \
+			      "bcm_need_recovery_rootfs=0\0" \
+			      "bcm_bl_flash_pending_rfs_imgs=0\0"
+
+#define KERNEL_LOADADDR_CFG \
+	"fit_image_loadaddr=0x90000000\0" \
+	"dtb_loadaddr=0x82000000\0"
+
+#define INITRD_ARGS "initrd_args=root=/dev/ram rw\0"
+#define INITRD_LOADADDR "initrd_loadaddr=0x92000000\0"
+#define INITRD_IMAGE "initrd_image=rootfs-lake-bcm958742t.cpio.gz\0"
+#define MMC_DEV "sd_device_number=0\0"
+#define EXEC_STATE "exec_state=normal\0"
+
+#define EXT4RD_ARGS "ext4rd_args="\
+	"root=/dev/mmcblk${sd_device_number}p${gpt_partition_entry} rw rootwait\0"
+
+#define WDT_CNTRL "wdt_enable=1\0" \
+		  "wdt_timeout_sec=0\0"
+
+#define ELOG_SETUP \
+	"mbox0_addr=0x66424024\0"\
+	"elog_setup="\
+	"if logsetup -s ${mbox0_addr}; then "\
+	"else "\
+		"echo ELOG is not supported by this version of the MCU patch.;"\
+		"exit;"\
+	"fi;"\
+	"if logsetup -c ${mbox0_addr}; then "\
+		"echo ELOG is ready;"\
+	"else "\
+		"echo ELOG is supported, but is not set up.;"\
+		"echo Getting setup file from the server ${serverip}...;"\
+		"if tftp ${tftp_dir}elog_src.txt; then "\
+			"echo Setting up ELOG. Please wait...;"\
+			"if logsetup ${loadaddr} ${mbox0_addr} ${filesize}; "\
+				"then "\
+			"else "\
+				"echo [logsetup] ERROR.;"\
+			"fi;"\
+			"if logsetup -c ${mbox0_addr}; then "\
+				"echo ELOG is READY.;"\
+			"else "\
+				"echo ELOG is NOT SET UP.;"\
+			"fi;"\
+		"else "\
+			"echo ELOG setup file is not available on the server.;"\
+		"fi;"\
+	"fi \0"
+
+/* eMMC partition for FIT images */
+#define FIT_MMC_PARTITION \
+	"fit_partitions=" \
+	"uuid_disk=${uuid_gpt_disk};" \
+	"name=env,size=512K,uuid=${uuid_gpt_env};" \
+	"name=Image_rsa.img,size=24MiB,uuid=${uuid_gpt_linux};" \
+	"name=Image1_rsa.img,size=24MiB,uuid=${uuid_gpt_linux1};" \
+	"name=Image2_rsa.img,size=24MiB,uuid=${uuid_gpt_linux2};" \
+	"name=nitro,size=8MiB,uuid=${uuid_gpt_nitro};" \
+	"name=recovery,size=940MiB,uuid=${uuid_gpt_recovery};" \
+	"name=rootfs,size=-,uuid=${uuid_gpt_prootfs}\0"
+
+/*         QSPI layout
+ * |---------------------------|->0x000000
+ * |                           |
+ * |                           |
+ * |        fip.bin            |
+ * |         2MB               |
+ * |                           |
+ * ~                           ~
+ * ~                           ~
+ * |                           |
+ * |                           |
+ * |                           |
+ * |---------------------------|->0x200000
+ * |                           |
+ * |                           |
+ * |                           |
+ * |       fip.bin (Mirror)    |
+ * |        2MB                |
+ * ~                           ~
+ * ~                           ~
+ * |                           |
+ * |                           |
+ * |                           |
+ * |---------------------------|->0x400000
+ * |       Nitro_itb           |
+ * |           +               |
+ * |      Nitro NS3 Config     |
+ * |           +               |
+ * |      Nitro NS3Z Config    |
+ * |          1.5M             |
+ * |                           |
+ * ~                           ~
+ * ~                           ~
+ * |                           |
+ * |---------------------------|->0x580000
+ * |        Nitro_itb          |
+ * |           +               |
+ * |      Nitro NS3 Config     |
+ * |           +               |
+ * |      Nitro NS3Z Config    |
+ * |          1.5M             |
+ * |        (Mirror)           |
+ * ~                           ~
+ * ~                           ~
+ * |                           |
+ * |---------------------------|->0x700000
+ * |   Nitro NS3 bspd Config   |
+ * |        64KB               |
+ * ~                           ~
+ * ~                           ~
+ * |                           |
+ * |---------------------------|->0x710000
+ * |   Nitro NS3 bspd Config   |
+ * |        64KB               |
+ * ~       (Mirror)            ~
+ * ~                           ~
+ * |                           |
+ * |---------------------------|->0x720000
+ * |        SHMOO              |
+ * |        64KB               |
+ * |                           |
+ * ~                           ~
+ * ~                           ~
+ * |---------------------------|->0x730000
+ * |        Meta Data          |
+ * |        832KB              |
+ * |                           |
+ * ~                           ~
+ * ~                           ~
+ * |                           |
+ * |---------------------------|
+ */
+
+#define QSPI_FLASH_NITRO_PARAMS \
+	"spi_nitro_img_bin_start=0x400000\0" \
+	"spi_nitro_img_bin_mirror_start=0x580000\0" \
+	"spi_nitro_bspd_cfg_start=0x700000\0" \
+	"spi_nitro_bspd_mirror_cfg_start=0x710000\0" \
+
+#define QSPI_ACCESS_ENABLE \
+	"qspi_access_en=" \
+	"mw 0x68a403e8 1;" \
+	"mw 0x68a403ec 1;" \
+	"mw 0x68a403f0 1;" \
+	"mw 0x68a403f4 1;" \
+	"mw 0x68a403f8 1;" \
+	"mw 0x68a403fc 1 \0"
+
+#define FUNC_QSPI_PROBE \
+	"func_qspi_probe="\
+	"if run qspi_access_en; then "\
+	"else "\
+		"echo ${errstr} run qspi_access_en ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if sf probe 0; then "\
+	"else "\
+		"echo echo ${errstr} sf probe command ** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define NITRO_FW_IMAGES \
+	"nitro_bin=nitro.img\0" \
+	"nitro_bspd_cfg=nitro_fb_bspd_config.bin\0"
+
+#define FASTBOOT_NITRO_SETUP \
+	"nitro_fastboot_type=1\0" \
+	"nitro_fastboot_secure=1\0" \
+	"nitro_fastboot_img_buffer=0\0" \
+	"nitro_fit_img_loc=0x90000000\0"
+
+#define FASTBOOT_SETUP \
+	"fastboot_nitro_setup=" \
+	"setenv errstr fastboot_setup;" \
+	"run func_qspi_probe;" \
+	/* first load header only */ \
+	"if sf read ${nitro_fit_img_loc} "\
+		   "${spi_nitro_img_bin_start} 0x18; then "\
+	"else "\
+		"echo [fastboot_nitro_setup] sf read "\
+		      "${spi_nitro_img_bin_start} ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if spi_nitro_images_addr ${nitro_fit_img_loc} "\
+				 "${spi_nitro_img_bin_start}; then "\
+	"else "\
+		 "echo [fastboot_nitro_setup] spi_nitro_images_addr "\
+		       "** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define CHECK_CHIMP_HS\
+	"check_chimp_hs=chimp_hs"\
+	"\0"
+
+#define FASTBOOT_NITRO "fastboot_nitro=chimp_ld_secure\0"
+
+#define FIT_IMAGE "fit_image=Image_rsa.img\0"
+#define BOOTCMD_MMC_FIT \
+	"bootcmd_mmc_fit="\
+	"mmc dev ${sd_device_number};"\
+	"if test $exec_state = normal; then " \
+		"setenv use_rootfs rootfs;"\
+	"else " \
+		"setenv use_rootfs recovery;"\
+	"fi;" \
+	"echo used filesystem :${use_rootfs};"\
+	"gpt setenv mmc ${sd_device_number} ${use_rootfs};"\
+	"setenv bootargs_fs ${setbootargs} ${ext4rd_args}; run bootargs_fs;"\
+	"gpt setenv mmc ${sd_device_number} ${fit_image};"\
+	"mmc read ${fit_image_loadaddr} ${gpt_partition_addr} "\
+	"${gpt_partition_size};"\
+	"bootm ${fit_image_loadaddr}\0"
+
+#define BOOTCMD_MMC_FITS \
+	"bootcmd_mmc_fits="\
+	"setenv mmc_fit0 " \
+	"'setenv fit_image Image_rsa.img; run bootcmd_mmc_fit';"\
+	"setenv mmc_fit1 " \
+	"'setenv fit_image Image1_rsa.img; run bootcmd_mmc_fit';"\
+	"setenv mmc_fit2 " \
+	"'setenv fit_image Image2_rsa.img; run bootcmd_mmc_fit';"\
+	"run mmc_fit0 || run mmc_fit1 || run mmc_fit2\0"
+
+#define USBDEV "usbdev=0\0"
+#define BOOTCMD_USB\
+	"bootcmd_usb="\
+	"setenv usb_image_loadaddr 90000000;"\
+	"setenv fit_image Image_rsa.img;"\
+	"setenv bootargs_fs ${setbootargs} ${initrd_args}; run bootargs_fs;"\
+	"if usb dev ${usbdev}; && usb start; then "\
+		"echo Booting from USB...;"\
+		"fatload usb ${usbdev} ${usb_image_loadaddr} ${fit_image};"\
+		"fatload usb ${usbdev} ${initrd_loadaddr} ${initrd_image};"\
+		"bootm ${usb_image_loadaddr} ${initrd_loadaddr}:${filesize};"\
+	"fi;"\
+	"\0"
+
+#define START_PCI\
+	"start_pci=pci e "\
+	"\0"
+
+#define BNXT_LOAD\
+	"bnxt_load=bnxt 0 probe "\
+	"\0"
+
+#define BOOTCMD_PXE\
+	"bootcmd_pxe="\
+	"run check_chimp_hs && "\
+	"run start_pci && "\
+	"run bnxt_load;"\
+	"setenv ethact bnxt_eth0;"\
+	"setenv autoload no;"\
+	"setenv bootargs_fs ${setbootargs} ${initrd_args}; run bootargs_fs;"\
+	"if dhcp; then "\
+		"setenv pxefile_addr_r ${loadaddr};"\
+		"if pxe get; then "\
+			"setenv ramdisk_addr_r ${initrd_loadaddr};"\
+			"setenv kernel_addr_r ${fit_image_loadaddr};"\
+			"pxe boot; "\
+		"fi;"\
+	"fi;"\
+	"\0"
+
+#define FLASH_PENDING_RFS_IMGS \
+	"flash_pending_rfs_imgs=" \
+	"if test $bcm_bl_flash_pending_rfs_imgs = 1; then " \
+		"if test $bl_flash_pending_rfs_imgs = rootfs; then " \
+			"dhcp;" \
+			"run mmc_flash_rootfs;" \
+		"fi;" \
+		"if test $bl_flash_pending_rfs_imgs = recovery; then " \
+			"dhcp;" \
+			"run mmc_flash_recovery;" \
+		"fi;" \
+		"setenv bl_flash_pending_rfs_imgs;" \
+	"fi; \0"
+
+#define CONFIG_BOOTCOMMAND "run flash_pending_rfs_imgs;" \
+			   "run fastboot_nitro && "\
+			   "run bootcmd_mmc_fits || "\
+			   "run bootcmd_usb || "\
+			   "run bootcmd_pxe"
+
+#define ARCH_ENV_SETTINGS \
+	CONSOLE_ARGS \
+	MAX_CPUS \
+	OS_LOG_LEVEL \
+	EXTRA_ARGS \
+	PCIE_ARGS \
+	ETH_ADDR \
+	RESERVED_MEM \
+	SETBOOTARGS \
+	UPDATEME_FLASH_PARAMS \
+	KERNEL_LOADADDR_CFG\
+	INITRD_ARGS \
+	INITRD_LOADADDR \
+	INITRD_IMAGE \
+	MMC_DEV \
+	EXEC_STATE \
+	EXT4RD_ARGS \
+	WDT_CNTRL \
+	ELOG_SETUP \
+	FIT_MMC_PARTITION \
+	QSPI_FLASH_NITRO_PARAMS \
+	QSPI_ACCESS_ENABLE \
+	FUNC_QSPI_PROBE \
+	NITRO_FW_IMAGES \
+	FASTBOOT_NITRO_SETUP \
+	FASTBOOT_SETUP \
+	CHECK_CHIMP_HS \
+	FASTBOOT_NITRO \
+	FIT_IMAGE \
+	BOOTCMD_MMC_FIT \
+	BOOTCMD_MMC_FITS \
+	USBDEV \
+	BOOTCMD_USB \
+	START_PCI \
+	BNXT_LOAD \
+	BOOTCMD_PXE \
+	FLASH_PENDING_RFS_IMGS
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	ARCH_ENV_SETTINGS
 #endif /* __BCM_NS3_H */
Signature · 1 line
2.17.1
#46 lore raw

PATCH v3 13/15 include/configs: ns3: add env variables for Linux boot

Quoted 10 lines · Rayagonda Kokatanur

From: Bharat Gooty <[email protected]>

Add env variables and commands for booting Linux.

---
 include/configs/bcm_ns3.h | 366 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 366 insertions(+)

Are you using binman to create your images?

It seems like you should put your documentation somewhere in doc/ instead of in this header file.

#47 lore raw

PATCH v3 13/15 include/configs: ns3: add env variables for Linux boot

Quoted 14 lines · Simon Glass
Quoted 10 lines · Rayagonda Kokatanur

From: Bharat Gooty <[email protected]>

Add env variables and commands for booting Linux.

---
 include/configs/bcm_ns3.h | 366 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 366 insertions(+)
Quoted 3 lines

Are you using binman to create your images?

No.

Quoted 3 lines

It seems like you should put your documentation somewhere in doc/ instead of in this header file.

Okay, I will create one readme file under doc ( /doc/README.bcmns3-qpsi) and move the documentation there.

Best regards,
Rayagonda

#48 lore raw

PATCH v3 14/15 include/configs: ns3: add support for flashing images

In reply to Rayagonda Kokatanur

From: Bharat Gooty <[email protected]>

Add support for flashing images into QSPI and eMMC.

---
 include/configs/bcm_ns3.h | 491 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 490 insertions(+), 1 deletion(-)
include/configs/bcm_ns3.h +490 -1
index 5e135ec319..d2d140a7df 100644
@@ -369,6 +369,483 @@
 			   "run bootcmd_usb || "\
 			   "run bootcmd_pxe"
 
+/* Flashing commands */
+#define TFTP_QSPI_PARAM \
+	"fip_qspi_addr=0x0\0"\
+	"fip_qspi_mirror_addr=0x200000\0"\
+	"loadaddr=0x90000000\0"\
+	"tftpblocksize=1468\0"\
+	"qspi_flash_fip=fip\0"\
+
+/* Flash fit_GPT partition to eMMC */
+#define MMC_FLASH_FIT_GPT \
+	"mmc_flash_gpt="\
+	"if mmc dev ${sd_device_number}; then "\
+	"else "\
+		"echo [mmc_flash_gpt] mmc dev ${sd_device_number} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if gpt write mmc ${sd_device_number} ${fit_partitions}; then "\
+	"else "\
+		"echo [mmc_flash_gpt] gpt write ${fit_partitions} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define MMC_FLASH_IMAGE_RSA \
+	"mmc_flash_image_rsa="\
+	"if mmc dev ${sd_device_number}; then "\
+	"else "\
+		"echo [mmc_flash_image_rsa] mmc dev ${sd_device_number} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if gpt setenv mmc ${sd_device_number} ${fit_image}; then "\
+	"else "\
+		"echo [mmc_flash_image_rsa] gpt setenv ${fit_image} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if tftp ${loadaddr} ${tftp_dir}${fit_image}; then "\
+		"if test ${fit_image} = Image_rsa.img; then "\
+			"if setenv tftp_fit_image yes; then "\
+			"else "\
+				"echo [mmc_flash_image_rsa] "\
+				"setenv tftp_fit_image to yes"\
+				"** FAILED **;"\
+				"exit;"\
+			"fi;"\
+		"fi;"\
+	"else "\
+		"if test ${fit_image} = Image_rsa.img; then "\
+			"echo [mmc_flash_image_rsa] tftp "\
+			"${tftp_dir}${fit_image} ** FAILED **;"\
+		"else "\
+			"if test ${tftp_fit_image} = yes; then "\
+				"if mmc write ${loadaddr} "\
+				"${gpt_partition_addr} "\
+				"${fileblocks}; then "\
+				"else "\
+					"echo "\
+					"[mmc_flash_image_rsa] "\
+					"mmc write "\
+					"${gpt_partition_addr} "\
+					"** FAILED **;"\
+					"exit;"\
+				"fi;"\
+			"else "\
+				"echo [mmc_flash_image_rsa] tftp "\
+				"${tftp_dir}${fit_image} "\
+				"** FAILED **;"\
+			"fi;"\
+		"fi;"\
+		"exit;"\
+	"fi;"\
+	"if math add filesize filesize 1FF; then "\
+	"else "\
+		"echo [mmc_flash_image_rsa] math add command ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if math div fileblocks filesize 200; then "\
+	"else "\
+		"echo [mmc_flash_image_rsa] math div command ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if mmc write ${loadaddr} ${gpt_partition_addr} ${fileblocks}; then "\
+	"else "\
+		"echo [mmc_flash_image_rsa] mmc write ${gpt_partition_addr} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if setenv image_sz_blk_cnt ${fileblocks}; then "\
+	"else "\
+		"echo [mmc_flash_image_rsa] setenv image_sz_blk_cnt ** "\
+		"FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if saveenv; then "\
+	"else "\
+		"echo [mmc_flash_image_rsa] saveenv command ** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define MMC_FLASH_RECOVERY \
+	"mmc_flash_recovery="\
+	"if mmc dev ${sd_device_number}; then "\
+	"else "\
+		"echo [mmc_flash_recovery] mmc dev ${sd_device_number} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if gpt setenv mmc ${sd_device_number} recovery; then "\
+	"else "\
+		"echo [mmc_flash_recovery] gpt setenv recovery ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"setenv index 1;"\
+	"while tftp ${loadaddr} "\
+	"${tftp_dir}${gpt_partition_name}/chunk_00${index}; do "\
+		"if math add filesize filesize 1FF; then "\
+		"else "\
+			"echo [mmc_flash_recovery] math add command "\
+			"** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if math div fileblocks filesize 200; then "\
+		"else "\
+			"echo [mmc_flash_recovery] math div command "\
+			"** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if mmc write ${loadaddr} ${gpt_partition_addr} "\
+		"${fileblocks}; then "\
+		"else "\
+			"echo [mmc_flash_recovery] mmc write "\
+			"${gpt_partition_addr} ** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if math add index index 1; then "\
+		"else "\
+			"echo [mmc_flash_recovery] math add command "\
+			"** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if math add gpt_partition_addr gpt_partition_addr"\
+		" ${fileblocks}; then "\
+		"else "\
+			"echo [mmc_flash_recovery] math add command"\
+			" ** FAILED **;"\
+			"exit;"\
+		"fi;"\
+	"done;"\
+	"if itest ${index} -ne 1; then "\
+	"else "\
+		"echo [mmc_flash_recovery] "\
+		"${tftp_dir}${gpt_partition_name}/chunk_00${index} file "\
+		"not found ** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define MMC_FLASH_ROOTFS \
+	"mmc_flash_rootfs="\
+	"if mmc dev ${sd_device_number}; then "\
+	"else "\
+		"echo [mmc_flash_rootfs] mmc dev ${sd_device_number} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if gpt setenv mmc ${sd_device_number} rootfs; then "\
+	"else "\
+		"echo [mmc_flash_rootfs] gpt setenv rootfs ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"setenv index 1;"\
+	"while tftp ${loadaddr} "\
+	"${tftp_dir}${gpt_partition_name}/chunk_00${index}; do "\
+		"if math add filesize filesize 1FF; then "\
+		"else "\
+			"echo [mmc_flash_rootfs] math add command "\
+			"** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if math div fileblocks filesize 200; then "\
+		"else "\
+			"echo [mmc_flash_rootfs] math div command "\
+			"** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if mmc write ${loadaddr} ${gpt_partition_addr} "\
+		"${fileblocks}; then "\
+		"else "\
+			"echo [mmc_flash_rootfs] mmc write "\
+			"${gpt_partition_addr} ** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if math add index index 1; then "\
+		"else "\
+			"echo [mmc_flash_rootfs] math add command "\
+			"** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if math add gpt_partition_addr gpt_partition_addr"\
+		" ${fileblocks}; then "\
+		"else "\
+			"echo [mmc_flash_rootfs] math add command"\
+			" ** FAILED **;"\
+			"exit;"\
+		"fi;"\
+	"done;"\
+	"if itest ${index} -ne 1; then "\
+	"else "\
+		"echo [mmc_flash_rootfs] "\
+		"${tftp_dir}${gpt_partition_name}/chunk_00${index} file "\
+		"not found ** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+/*
+ * For individual flash commands like mmc_flash_gpt, it is not
+ * necessary to check for errors.
+ * If any of its intermediate commands fails, then next commands
+ * will not execute. Script will exit from the failure command.
+ * For uniformity, checking for mmc_flash_gpt, mmc_flash_image_rsa
+ * mmc_flash_nitro and mmc_flash_rootfs
+ */
+#define MMC_FLASH \
+	"flash_mmc="\
+	"if run mmc_flash_gpt; then "\
+	"else "\
+		"echo [flash_mmc] run mmc_flash_gpt ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if setenv tftp_fit_image no; then "\
+	"else "\
+		"echo [flash_mmc] setenv tftp_fit_image to no "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if setenv fit_image Image_rsa.img; then "\
+	"else "\
+		"echo [flash_mmc] setenv fit_image to Image_rsa.img "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if run mmc_flash_image_rsa; then "\
+	"else "\
+		"echo [flash_mmc] run mmc_flash_image_rsa ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if setenv fit_image Image1_rsa.img; then "\
+	"else "\
+		"echo [flash_mmc] setenv fit_image to Image1_rsa.img "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if run mmc_flash_image_rsa; then "\
+	"else "\
+		"echo [flash_mmc] run mmc_flash_image_rsa "\
+		"for Image1_rsa.img ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if setenv fit_image Image2_rsa.img; then "\
+	"else "\
+		"echo [flash_mmc] setenv fit_image to Image2_rsa.img "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if run mmc_flash_image_rsa; then "\
+	"else "\
+		"echo [flash_mmc] run mmc_flash_image_rsa "\
+		"for Image2_rsa.img ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if run mmc_flash_recovery; then "\
+	"else "\
+		"echo [flash_mmc] run mmc_flash_recovery ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if run mmc_flash_rootfs; then "\
+	"else "\
+		"echo [flash_mmc] run mmc_flash_rootfs ** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define FUNC_ALIGN_QSPI_ERASE_BLOCK_SIZE \
+	"align_erase_blk_size=" \
+	"setenv fl_write_size 0;" \
+	"if math add fl_write_size filesize FFFF; then "\
+	"else "\
+		"echo ${errstr} math add command ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if math div fl_write_size fl_write_size 10000; then "\
+	"else "\
+		"echo ${errstr} math div command ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if math mul fl_write_size fl_write_size 10000; then "\
+	"else "\
+		"echo ${errstr} math mul command ** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define QSPI_FLASH_FIP \
+	"flash_fip="\
+	"if run qspi_access_en; then "\
+	"else "\
+		"echo [flash_fip] run qspi_access_en ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if tftp ${loadaddr} ${tftp_dir}fip.bin; then "\
+	"else "\
+		"echo [flash_fip] tftp ${tftp_dir}fip.bin "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if math add tmpsize filesize FFFF; then "\
+	"else "\
+		"echo [flash_fip] math add command ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if math div tmpsize tmpsize 10000; then "\
+	"else "\
+		"echo [flash_fip] math div command ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if math mul tmpsize tmpsize 10000; then "\
+	"else "\
+		"echo [flash_fip] math mul command ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if sf probe 0; then "\
+	"else "\
+		"echo [flash_fip] sf probe command ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if sf erase ${fip_qspi_addr} ${tmpsize}; then "\
+	"else "\
+		"echo [flash_fip] sf erase ${fip_qspi_addr} ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if sf write ${loadaddr} ${fip_qspi_addr} ${filesize}; then "\
+	"else "\
+		"echo [flash_fip] sf write ${fip_qspi_addr} ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	/* Flash mirror FIP image */ \
+	"if sf erase ${fip_qspi_mirror_addr} ${tmpsize}; then "\
+	"else "\
+		"echo [flash_fip] sf erase ${fip_qspi_mirror_addr} "\
+			"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if sf write ${loadaddr} ${fip_qspi_mirror_addr} ${filesize}; then "\
+	"else "\
+		"echo [flash_fip] sf write ${fip_qspi_mirror_addr} "\
+			"** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define QSPI_FLASH_NITRO \
+	"flash_nitro="\
+	"run func_qspi_probe; "\
+	"if tftp ${loadaddr} ${tftp_dir}${nitro_bin}; then "\
+	"else "\
+		"echo [flash_nitro] tftp ${tftp_dir}${nitro_bin} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"setenv errstr flash_nitro;" \
+	"run align_erase_blk_size;" \
+	/* Flash Nitro fw fit + configuration */ \
+	"if sf erase ${spi_nitro_img_bin_start} ${fl_write_size}; then "\
+	"else "\
+		"echo [flash_nitro] sf erase ${spi_nitro_img_bin_start} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if sf write ${loadaddr} ${spi_nitro_img_bin_start}" \
+		     " ${fl_write_size}; then "\
+	"else "\
+		"echo [flash_nitro] sf write ${spi_nitro_bin_start} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	/* Mirror of Flash Nitro fw fit + configuration */ \
+	"if sf erase ${spi_nitro_img_bin_mirror_start} ${fl_write_size}; then "\
+	"else "\
+		"echo [flash_nitro] sf erase "\
+		      "${spi_nitro_img_bin_mirror_start} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if sf write ${loadaddr} ${spi_nitro_img_bin_mirror_start}" \
+		     " ${fl_write_size}; then "\
+	"else "\
+		"echo [flash_nitro] sf write "\
+		      "${spi_nitro_img_bin_mirror_start} "\
+		"** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define QSPI_FLASH_NITRO_BSPD_CONFIG \
+	"flash_nitro_bspd_config="\
+	"run func_qspi_probe; "\
+	/* Flash BSPD configuration */ \
+	"if tftp ${loadaddr} ${tftp_dir}${nitro_bspd_cfg}; then "\
+		"setenv bspd_cfg_avialable 1; "\
+		"setenv errstr flash_nitro_bspd_config; "\
+		"run align_erase_blk_size;" \
+		"if sf erase ${spi_nitro_bspd_cfg_start} "\
+			    "${fl_write_size}; then "\
+		"else "\
+			"echo [flash_nitro] sf erase "\
+				"${spi_nitro_bspd_cfg_start} "\
+				"** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if sf write ${loadaddr} ${spi_nitro_bspd_cfg_start} "\
+			    "${fl_write_size}; then "\
+		"else "\
+			"echo [flash_nitro] sf write "\
+				"${spi_nitro_bspd_cfg_start} "\
+				"** FAILED **;"\
+			"exit;"\
+		"fi;" \
+		/* Flash BSPD mirror configuration */ \
+		"if sf erase ${spi_nitro_bspd_mirror_cfg_start} "\
+			    "${fl_write_size}; then "\
+		"else "\
+			"echo [flash_nitro] sf erase "\
+				"${spi_nitro_bspd_mirror_cfg_start} "\
+				"** FAILED **;"\
+			"exit;"\
+		"fi;"\
+		"if sf write ${loadaddr} ${spi_nitro_bspd_mirror_cfg_start} "\
+			"${fl_write_size}; then "\
+		"else "\
+			"echo [flash_nitro] sf write "\
+				"${spi_nitro_bspd_mirror_cfg_start} "\
+				"** FAILED **;"\
+			"exit;"\
+		"fi;" \
+	"else "\
+		"echo [flash_nitro] tftp ${tftp_dir}${nitro_bspd_cfg} "\
+		"** Skip flashing bspd config file **;"\
+	"fi \0"
+
+#define QSPI_FLASH \
+	"flash_qspi="\
+	"if run qspi_access_en; then "\
+	"else "\
+		"echo [flash_qspi] run qspi_access_en ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if run flash_fip; then "\
+	"else "\
+		"echo [flash_qspi] run flash_fip ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if run flash_nitro; then "\
+	"else "\
+		"echo [flash_qspi] run flash_nitro ** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
+#define FLASH_IMAGES \
+	"flash_images=" \
+	"if run flash_qspi; then "\
+	"else "\
+		"echo [flash_images] run flash_qspi ** FAILED **;"\
+		"exit;"\
+	"fi;"\
+	"if run flash_mmc; then "\
+	"else "\
+		"echo [flash_images] run flash_mmc ** FAILED **;"\
+		"exit;"\
+	"fi \0"
+
 #define ARCH_ENV_SETTINGS \
 	CONSOLE_ARGS \
 	MAX_CPUS \
@@ -405,7 +882,19 @@
 	START_PCI \
 	BNXT_LOAD \
 	BOOTCMD_PXE \
-	FLASH_PENDING_RFS_IMGS
+	FLASH_PENDING_RFS_IMGS \
+	TFTP_QSPI_PARAM \
+	MMC_FLASH_FIT_GPT \
+	MMC_FLASH_IMAGE_RSA \
+	MMC_FLASH_RECOVERY \
+	MMC_FLASH_ROOTFS \
+	MMC_FLASH \
+	FUNC_ALIGN_QSPI_ERASE_BLOCK_SIZE \
+	QSPI_FLASH_FIP \
+	QSPI_FLASH_NITRO \
+	QSPI_FLASH_NITRO_BSPD_CONFIG \
+	QSPI_FLASH \
+	FLASH_IMAGES
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	ARCH_ENV_SETTINGS
Signature · 1 line
2.17.1
#49 lore raw

PATCH v3 14/15 include/configs: ns3: add support for flashing images

Quoted 11 lines · Rayagonda Kokatanur

From: Bharat Gooty <[email protected]>

Add support for flashing images into QSPI and eMMC.

---
 include/configs/bcm_ns3.h | 491 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 490 insertions(+), 1 deletion(-)
#50 lore raw

PATCH v3 15/15 MAINTAINERS: update maintainers for broadcom ns3 platform

In reply to Rayagonda Kokatanur

Update MAINTAINERS for broadcom ns3 platform (TARGET_NS3).

---
Changes from v2:
-Address self review comments,
Update MAINTAINERS file with dt file change.

 MAINTAINERS | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
MAINTAINERS +15 -1
index 1fd975c72f..0c72deaa44 100644
@@ -11,7 +11,7 @@ Descriptions of section entries:
 	   Type is one of: git, hg, quilt, stgit, topgit
 	S: Status, one of the following:
 	   Supported:	Someone is actually paid to look after this.
-	   Maintained:	Someone actually looks after it.
+	   Mne actually looks after it.
 	   Orphan:	No current maintainer [but maybe you could take the
 			role as you write your new code].
 	F: Files and directories with wildcard patterns.
@@ -922,6 +922,20 @@ S:	Maintained
 F:	drivers/spmi/
 F:	include/spmi/
 
+TARGET_BCMNS3
+M:	Bharat Gooty <[email protected]>
+M:	Rayagonda Kokatanur <[email protected]>
+S:	Maintained
+F:	board/broadcom/bcmns3/
+F:	configs/bcm_ns3_defconfig
+F:	include/configs/bcm_ns3.h
+F:	include/dt-bindings/memory/bcm-ns3-mc.h
+F:	arch/arm/Kconfig
+F:	arch/arm/dts/ns3-board.dts
+F:	arch/arm/dts/ns3.dtsi
+F:	arch/arm/cpu/armv8/bcmns3
+F:	arch/arm/include/asm/arch-bcmns3/
+
 TDA19988 HDMI ENCODER
 M:	Liviu Dudau <[email protected]>
 S:	Maintained
Signature · 1 line
2.17.1
#51 lore raw

PATCH v3 15/15 MAINTAINERS: update maintainers for broadcom ns3 platform

Quoted 11 lines · Rayagonda Kokatanur

Update MAINTAINERS for broadcom ns3 platform (TARGET_NS3).

---
Changes from v2:
-Address self review comments,
Update MAINTAINERS file with dt file change.

 MAINTAINERS | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
#52 lore raw

PATCH v3 15/15 MAINTAINERS: update maintainers for broadcom ns3 platform

In reply to Rayagonda Kokatanur

<snip>

MAINTAINERS Descriptions of section entries: · line 17

Quoted 13 lines
MAINTAINERS +1 -1
index 1fd975c72f..0c72deaa44 100644
@@ -11,7 +11,7 @@ Descriptions of section entries:
 	   Type is one of: git, hg, quilt, stgit, topgit
 	S: Status, one of the following:
 	   Supported:	Someone is actually paid to look after this.
-	   Maintained:	Someone actually looks after it.
+	   Mne actually looks after it.
 	   Orphan:	No current maintainer [but maybe you could take the
 			role as you write your new code].
 	F: Files and directories with wildcard patterns.

This looks to be an accidental change that should be fixed?

Regards,
Peter

#53 lore raw

PATCH v3 15/15 MAINTAINERS: update maintainers for broadcom ns3 platform

Hi Peter,

Quoted 18 lines · Peter Tyser

<snip>

MAINTAINERS Descriptions of section entries: · line 17

Quoted 13 lines
MAINTAINERS +1 -1
index 1fd975c72f..0c72deaa44 100644
@@ -11,7 +11,7 @@ Descriptions of section entries:
         Type is one of: git, hg, quilt, stgit, topgit
      S: Status, one of the following:
         Supported:   Someone is actually paid to look after this.
-        Maintained:  Someone actually looks after it.
+        Mne actually looks after it.
         Orphan:      No current maintainer [but maybe you could take the
                      role as you write your new code].
      F: Files and directories with wildcard patterns.

This looks to be an accidental change that should be fixed?

Thank you so much, I will fix it.

Regards,
Rayagonda

Quoted 3 lines

Regards,
Peter