All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/8] arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU
@ 2017-07-20  9:07 Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 2/8] arm64: zynqmp: Define a way to intialize TCM Michal Simek
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Michal Simek @ 2017-07-20  9:07 UTC (permalink / raw)
  To: u-boot

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

This patch provides an option to include OCM and TCM memory
into MMU table with corresponding memory attributes.

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

 arch/arm/cpu/armv8/zynqmp/Kconfig | 6 ++++++
 arch/arm/cpu/armv8/zynqmp/cpu.c   | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/arch/arm/cpu/armv8/zynqmp/Kconfig b/arch/arm/cpu/armv8/zynqmp/Kconfig
index 5ac48ebc4d1a..2a0e8f2cbf66 100644
--- a/arch/arm/cpu/armv8/zynqmp/Kconfig
+++ b/arch/arm/cpu/armv8/zynqmp/Kconfig
@@ -56,6 +56,12 @@ config ZYNQMP_USB
 config SYS_MALLOC_F_LEN
 	default 0x600
 
+config DEFINE_TCM_OCM_MMAP
+	bool "Define TCM and OCM memory in MMU Table"
+	help
+	  This option if enabled defines the TCM and OCM memory and its
+	  memory attributes in MMU table entry.
+
 config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED
 	bool "Overwrite SPL bootmode"
 	depends on SPL
diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c
index 94ecf9066028..5fba0716ca0d 100644
--- a/arch/arm/cpu/armv8/zynqmp/cpu.c
+++ b/arch/arm/cpu/armv8/zynqmp/cpu.c
@@ -38,6 +38,14 @@ static struct mm_region zynqmp_mem_map[] = {
 			 PTE_BLOCK_NON_SHARE |
 			 PTE_BLOCK_PXN | PTE_BLOCK_UXN
 	}, {
+#if defined(CONFIG_DEFINE_TCM_OCM_MMAP)
+		.virt = 0xffe00000UL,
+		.phys = 0xffe00000UL,
+		.size = 0x00200000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+			 PTE_BLOCK_INNER_SHARE
+	}, {
+#endif
 		.virt = 0x400000000UL,
 		.phys = 0x400000000UL,
 		.size = 0x200000000UL,
-- 
1.9.1

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

* [U-Boot] [PATCH 2/8] arm64: zynqmp: Define a way to intialize TCM
  2017-07-20  9:07 [U-Boot] [PATCH 1/8] arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU Michal Simek
@ 2017-07-20  9:07 ` Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 3/8] arm64: zynqmp: Remove ifdef around zynqmp mmio read and write rotuines Michal Simek
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2017-07-20  9:07 UTC (permalink / raw)
  To: u-boot

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

TCM on ZynqMP needs to be intialized in a sequence
and this patch provides a global routine to perform
this as per requirement.

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

 arch/arm/cpu/armv8/zynqmp/mp.c               | 15 +++++++++++++++
 arch/arm/include/asm/arch-zynqmp/sys_proto.h |  7 +++++++
 2 files changed, 22 insertions(+)

diff --git a/arch/arm/cpu/armv8/zynqmp/mp.c b/arch/arm/cpu/armv8/zynqmp/mp.c
index e10fc3136c85..76f889ba7d9e 100644
--- a/arch/arm/cpu/armv8/zynqmp/mp.c
+++ b/arch/arm/cpu/armv8/zynqmp/mp.c
@@ -206,6 +206,21 @@ static void write_tcm_boot_trampoline(u32 boot_addr)
 	}
 }
 
+void initialize_tcm(bool mode)
+{
+	if (!mode) {
+		set_r5_tcm_mode(LOCK);
+		set_r5_halt_mode(HALT, LOCK);
+		enable_clock_r5();
+		release_r5_reset(LOCK);
+	} else {
+		set_r5_tcm_mode(SPLIT);
+		set_r5_halt_mode(HALT, SPLIT);
+		enable_clock_r5();
+		release_r5_reset(SPLIT);
+	}
+}
+
 int cpu_release(int nr, int argc, char * const argv[])
 {
 	if (nr >= ZYNQMP_CORE_APU0 && nr <= ZYNQMP_CORE_APU3) {
diff --git a/arch/arm/include/asm/arch-zynqmp/sys_proto.h b/arch/arm/include/asm/arch-zynqmp/sys_proto.h
index d91d98a1196c..3d7fad773115 100644
--- a/arch/arm/include/asm/arch-zynqmp/sys_proto.h
+++ b/arch/arm/include/asm/arch-zynqmp/sys_proto.h
@@ -10,6 +10,11 @@
 
 #define PAYLOAD_ARG_CNT		5
 
+enum {
+	TCM_LOCK,
+	TCM_SPLIT,
+};
+
 int zynq_slcr_get_mio_pin_status(const char *periph);
 
 unsigned int zynqmp_get_silicon_version(void);
@@ -24,4 +29,6 @@ int zynqmp_mmio_read(const u32 address, u32 *value);
 int invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2, u32 arg3,
 	       u32 *ret_payload);
 
+void initialize_tcm(bool mode);
+
 #endif /* _ASM_ARCH_SYS_PROTO_H */
-- 
1.9.1

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

* [U-Boot] [PATCH 3/8] arm64: zynqmp: Remove ifdef around zynqmp mmio read and write rotuines
  2017-07-20  9:07 [U-Boot] [PATCH 1/8] arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 2/8] arm64: zynqmp: Define a way to intialize TCM Michal Simek
@ 2017-07-20  9:07 ` Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 4/8] arm64: zynqmp: Call psu_init from board_early_init_f Michal Simek
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2017-07-20  9:07 UTC (permalink / raw)
  To: u-boot

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

This patch removes ifdef around mmio read and write rotuines
and make them a single routine by checking the current el.
This patch helps to remove ifdef around invoke_smc as well.

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

 arch/arm/cpu/armv8/zynqmp/cpu.c | 63 +++++++++++++++++++++++------------------
 1 file changed, 36 insertions(+), 27 deletions(-)

diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c
index 5fba0716ca0d..1b5066a8266d 100644
--- a/arch/arm/cpu/armv8/zynqmp/cpu.c
+++ b/arch/arm/cpu/armv8/zynqmp/cpu.c
@@ -110,9 +110,8 @@ unsigned int zynqmp_get_silicon_version(void)
 #define ZYNQMP_MMIO_READ	0xC2000014
 #define ZYNQMP_MMIO_WRITE	0xC2000013
 
-#ifndef CONFIG_SPL_BUILD
-int invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2, u32 arg3,
-	       u32 *ret_payload)
+int __maybe_unused invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2,
+			      u32 arg3, u32 *ret_payload)
 {
 	/*
 	 * Added SIP service call Function Identifier
@@ -172,28 +171,7 @@ void zynqmp_pmufw_version(void)
 }
 #endif
 
-int zynqmp_mmio_write(const u32 address,
-		      const u32 mask,
-		      const u32 value)
-{
-	return invoke_smc(ZYNQMP_MMIO_WRITE, address, mask, value, 0, NULL);
-}
-
-int zynqmp_mmio_read(const u32 address, u32 *value)
-{
-	u32 ret_payload[PAYLOAD_ARG_CNT];
-	u32 ret;
-
-	if (!value)
-		return -EINVAL;
-
-	ret = invoke_smc(ZYNQMP_MMIO_READ, address, 0, 0, 0, ret_payload);
-	*value = ret_payload[1];
-
-	return ret;
-}
-#else
-int zynqmp_mmio_write(const u32 address,
+static int zynqmp_mmio_rawwrite(const u32 address,
 		      const u32 mask,
 		      const u32 value)
 {
@@ -208,9 +186,40 @@ int zynqmp_mmio_write(const u32 address,
 	return 0;
 }
 
-int zynqmp_mmio_read(const u32 address, u32 *value)
+static int zynqmp_mmio_rawread(const u32 address, u32 *value)
 {
 	*value = readl((ulong)address);
 	return 0;
 }
-#endif
+
+int zynqmp_mmio_write(const u32 address,
+		      const u32 mask,
+		      const u32 value)
+{
+	if (IS_ENABLED(CONFIG_SPL_BUILD) || current_el() == 3)
+		return zynqmp_mmio_rawwrite(address, mask, value);
+	else if (!IS_ENABLED(CONFIG_SPL_BUILD))
+		return invoke_smc(ZYNQMP_MMIO_WRITE, address, mask,
+				  value, 0, NULL);
+
+	return -EINVAL;
+}
+
+int zynqmp_mmio_read(const u32 address, u32 *value)
+{
+	u32 ret_payload[PAYLOAD_ARG_CNT];
+	u32 ret;
+
+	if (!value)
+		return -EINVAL;
+
+	if (IS_ENABLED(CONFIG_SPL_BUILD) || current_el() == 3) {
+		ret = zynqmp_mmio_rawread(address, value);
+	} else if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
+		ret = invoke_smc(ZYNQMP_MMIO_READ, address, 0, 0,
+				 0, ret_payload);
+		*value = ret_payload[1];
+	}
+
+	return ret;
+}
-- 
1.9.1

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

* [U-Boot] [PATCH 4/8] arm64: zynqmp: Call psu_init from board_early_init_f
  2017-07-20  9:07 [U-Boot] [PATCH 1/8] arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 2/8] arm64: zynqmp: Define a way to intialize TCM Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 3/8] arm64: zynqmp: Remove ifdef around zynqmp mmio read and write rotuines Michal Simek
@ 2017-07-20  9:07 ` Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 5/8] arm64: zynqmp: Add Kconfig option for adding psu_init to binary Michal Simek
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2017-07-20  9:07 UTC (permalink / raw)
  To: u-boot

For some mini platforms there could be a need to include psu_init.
That's why move it to board file instead of spl only file.

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

 arch/arm/cpu/armv8/zynqmp/spl.c | 2 +-
 board/xilinx/zynqmp/zynqmp.c    | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv8/zynqmp/spl.c b/arch/arm/cpu/armv8/zynqmp/spl.c
index 26bf80ec52b4..468dc1dc4d54 100644
--- a/arch/arm/cpu/armv8/zynqmp/spl.c
+++ b/arch/arm/cpu/armv8/zynqmp/spl.c
@@ -17,7 +17,7 @@
 
 void board_init_f(ulong dummy)
 {
-	psu_init();
+	board_early_init_f();
 	board_early_init_r();
 
 #ifdef CONFIG_DEBUG_UART
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 51a3d9f276b7..442637bcae2c 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -118,6 +118,11 @@ int board_early_init_f(void)
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_CLK_ZYNQMP)
 	zynqmp_pmufw_version();
 #endif
+
+#if defined(CONFIG_SPL_BUILD)
+	psu_init();
+#endif
+
 	return 0;
 }
 
-- 
1.9.1

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

* [U-Boot] [PATCH 5/8] arm64: zynqmp: Add Kconfig option for adding psu_init to binary
  2017-07-20  9:07 [U-Boot] [PATCH 1/8] arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU Michal Simek
                   ` (2 preceding siblings ...)
  2017-07-20  9:07 ` [U-Boot] [PATCH 4/8] arm64: zynqmp: Call psu_init from board_early_init_f Michal Simek
@ 2017-07-20  9:07 ` Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 6/8] arm64: zynqmp: Fix SVD mask for getting chip ID Michal Simek
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2017-07-20  9:07 UTC (permalink / raw)
  To: u-boot

There is a need to include psu_init also in mini u-boot configuration
that's why handle psu_init via Kconfig property.

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

 arch/arm/cpu/armv8/zynqmp/Kconfig | 5 +++++
 board/xilinx/zynqmp/Makefile      | 6 +++++-
 board/xilinx/zynqmp/zynqmp.c      | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/armv8/zynqmp/Kconfig b/arch/arm/cpu/armv8/zynqmp/Kconfig
index 2a0e8f2cbf66..5ffc9f6c867b 100644
--- a/arch/arm/cpu/armv8/zynqmp/Kconfig
+++ b/arch/arm/cpu/armv8/zynqmp/Kconfig
@@ -62,6 +62,11 @@ config DEFINE_TCM_OCM_MMAP
 	  This option if enabled defines the TCM and OCM memory and its
 	  memory attributes in MMU table entry.
 
+config ZYNQMP_PSU_INIT_ENABLED
+	bool "Include psu_init"
+	help
+	  Include psu_init to full u-boot. SPL include psu_init by default.
+
 config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED
 	bool "Overwrite SPL bootmode"
 	depends on SPL
diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile
index 9d69d6546e2c..75aab92f0473 100644
--- a/board/xilinx/zynqmp/Makefile
+++ b/board/xilinx/zynqmp/Makefile
@@ -20,7 +20,11 @@ $(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/
 endif
 endif
 
-obj-$(CONFIG_SPL_BUILD) += $(init-objs)
+ifdef_any_of = $(filter-out undefined,$(foreach v,$(1),$(origin $(v))))
+
+ifneq ($(call ifdef_any_of, CONFIG_ZYNQMP_PSU_INIT_ENABLED CONFIG_SPL_BUILD),)
+obj-y += $(init-objs)
+endif
 
 # Suppress "warning: function declaration isn't a prototype"
 CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 442637bcae2c..ecdae5e261f6 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -119,7 +119,7 @@ int board_early_init_f(void)
 	zynqmp_pmufw_version();
 #endif
 
-#if defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED)
 	psu_init();
 #endif
 
-- 
1.9.1

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

* [U-Boot] [PATCH 6/8] arm64: zynqmp: Fix SVD mask for getting chip ID
  2017-07-20  9:07 [U-Boot] [PATCH 1/8] arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU Michal Simek
                   ` (3 preceding siblings ...)
  2017-07-20  9:07 ` [U-Boot] [PATCH 5/8] arm64: zynqmp: Add Kconfig option for adding psu_init to binary Michal Simek
@ 2017-07-20  9:07 ` Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 7/8] arm64: zynqmp: Do not setup time if already setup Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 8/8] arm64: zynqmp: Dont write to system timestamp generator Michal Simek
  6 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2017-07-20  9:07 UTC (permalink / raw)
  To: u-boot

Mask should start from the first bit - using 0xe is just wrong.
3bits are used that's why 0x7 mask is correct.
This patch is fixing silicon ID code detection. Previous behavior was
that bit0 was completely ignored.
Issue was found on 2eg chip detection.

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

 include/zynqmppl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/zynqmppl.h b/include/zynqmppl.h
index fb5200ec84a6..4c8c2f88f04c 100644
--- a/include/zynqmppl.h
+++ b/include/zynqmppl.h
@@ -20,7 +20,7 @@
 #define ZYNQMP_CSU_IDCODE_DEVICE_CODE_MASK	(0xf << \
 					ZYNQMP_CSU_IDCODE_DEVICE_CODE_SHIFT)
 #define ZYNQMP_CSU_IDCODE_SVD_SHIFT	12
-#define ZYNQMP_CSU_IDCODE_SVD_MASK	(0xe << ZYNQMP_CSU_IDCODE_SVD_SHIFT)
+#define ZYNQMP_CSU_IDCODE_SVD_MASK	(0x7 << ZYNQMP_CSU_IDCODE_SVD_SHIFT)
 
 extern struct xilinx_fpga_op zynqmp_op;
 
-- 
1.9.1

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

* [U-Boot] [PATCH 7/8] arm64: zynqmp: Do not setup time if already setup
  2017-07-20  9:07 [U-Boot] [PATCH 1/8] arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU Michal Simek
                   ` (4 preceding siblings ...)
  2017-07-20  9:07 ` [U-Boot] [PATCH 6/8] arm64: zynqmp: Fix SVD mask for getting chip ID Michal Simek
@ 2017-07-20  9:07 ` Michal Simek
  2017-07-20  9:07 ` [U-Boot] [PATCH 8/8] arm64: zynqmp: Dont write to system timestamp generator Michal Simek
  6 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2017-07-20  9:07 UTC (permalink / raw)
  To: u-boot

Newer psu_init_gpl.c/h contain clock setup. Detect if
reference clock is active. If yes, skip timer setup.

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

 board/xilinx/zynqmp/zynqmp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index ecdae5e261f6..a67473f344de 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -155,7 +155,10 @@ int board_early_init_r(void)
 {
 	u32 val;
 
-	if (current_el() == 3) {
+	val = readl(&crlapb_base->timestamp_ref_ctrl);
+	val &= ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT;
+
+	if (current_el() == 3 && !val) {
 		val = readl(&crlapb_base->timestamp_ref_ctrl);
 		val |= ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT;
 		writel(val, &crlapb_base->timestamp_ref_ctrl);
-- 
1.9.1

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

* [U-Boot] [PATCH 8/8] arm64: zynqmp: Dont write to system timestamp generator
  2017-07-20  9:07 [U-Boot] [PATCH 1/8] arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU Michal Simek
                   ` (5 preceding siblings ...)
  2017-07-20  9:07 ` [U-Boot] [PATCH 7/8] arm64: zynqmp: Do not setup time if already setup Michal Simek
@ 2017-07-20  9:07 ` Michal Simek
  6 siblings, 0 replies; 8+ messages in thread
From: Michal Simek @ 2017-07-20  9:07 UTC (permalink / raw)
  To: u-boot

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

Remove incorrect code of writing to system timestamp
counter registers. This register writes does nothing
and can be removed.

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

 arch/arm/include/asm/arch-zynqmp/hardware.h | 9 ---------
 board/xilinx/zynqmp/zynqmp.c                | 6 ------
 2 files changed, 15 deletions(-)

diff --git a/arch/arm/include/asm/arch-zynqmp/hardware.h b/arch/arm/include/asm/arch-zynqmp/hardware.h
index cf187f31110b..1228c7acb8c4 100644
--- a/arch/arm/include/asm/arch-zynqmp/hardware.h
+++ b/arch/arm/include/asm/arch-zynqmp/hardware.h
@@ -48,18 +48,9 @@ struct crlapb_regs {
 #define crlapb_base ((struct crlapb_regs *)ZYNQMP_CRL_APB_BASEADDR)
 
 #define ZYNQMP_IOU_SCNTR_SECURE	0xFF260000
-#define ZYNQMP_IOU_SCNTR	0xFF250000
 #define ZYNQMP_IOU_SCNTR_COUNTER_CONTROL_REGISTER_EN	0x1
 #define ZYNQMP_IOU_SCNTR_COUNTER_CONTROL_REGISTER_HDBG	0x2
 
-struct iou_scntr {
-	u32 counter_control_register;
-	u32 reserved0[7];
-	u32 base_frequency_id_register;
-};
-
-#define iou_scntr ((struct iou_scntr *)ZYNQMP_IOU_SCNTR)
-
 struct iou_scntr_secure {
 	u32 counter_control_register;
 	u32 reserved0[7];
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index a67473f344de..5b1852a8cec3 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -170,12 +170,6 @@ int board_early_init_r(void)
 		writel(ZYNQMP_IOU_SCNTR_COUNTER_CONTROL_REGISTER_EN,
 		       &iou_scntr_secure->counter_control_register);
 	}
-	/* Program freq register in System counter and enable system counter */
-	writel(gd->cpu_clk, &iou_scntr->base_frequency_id_register);
-	writel(ZYNQMP_IOU_SCNTR_COUNTER_CONTROL_REGISTER_HDBG |
-	       ZYNQMP_IOU_SCNTR_COUNTER_CONTROL_REGISTER_EN,
-	       &iou_scntr->counter_control_register);
-
 	return 0;
 }
 
-- 
1.9.1

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

end of thread, other threads:[~2017-07-20  9:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20  9:07 [U-Boot] [PATCH 1/8] arm64: zynqmp: Provide a Kconfig option to define OCM and TCM in MMU Michal Simek
2017-07-20  9:07 ` [U-Boot] [PATCH 2/8] arm64: zynqmp: Define a way to intialize TCM Michal Simek
2017-07-20  9:07 ` [U-Boot] [PATCH 3/8] arm64: zynqmp: Remove ifdef around zynqmp mmio read and write rotuines Michal Simek
2017-07-20  9:07 ` [U-Boot] [PATCH 4/8] arm64: zynqmp: Call psu_init from board_early_init_f Michal Simek
2017-07-20  9:07 ` [U-Boot] [PATCH 5/8] arm64: zynqmp: Add Kconfig option for adding psu_init to binary Michal Simek
2017-07-20  9:07 ` [U-Boot] [PATCH 6/8] arm64: zynqmp: Fix SVD mask for getting chip ID Michal Simek
2017-07-20  9:07 ` [U-Boot] [PATCH 7/8] arm64: zynqmp: Do not setup time if already setup Michal Simek
2017-07-20  9:07 ` [U-Boot] [PATCH 8/8] arm64: zynqmp: Dont write to system timestamp generator Michal Simek

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