All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/28] armv8/fsl-lsch3: Implement workaround for erratum A008585
@ 2015-03-19 16:45 York Sun
  2015-03-19 16:45 ` [U-Boot] [PATCH 02/28] armv8/ls2085a: Update common header file York Sun
                   ` (26 more replies)
  0 siblings, 27 replies; 69+ messages in thread
From: York Sun @ 2015-03-19 16:45 UTC (permalink / raw)
  To: u-boot

Generic Timer may contain an erroneous value. The workaround is to
read it twice until getting the same value.

Signed-off-by: York Sun <yorksun@freescale.com>
---
 arch/arm/cpu/armv8/generic_timer.c           |   11 +++++++++++
 arch/arm/include/asm/arch-fsl-lsch3/config.h |    1 +
 2 files changed, 12 insertions(+)

diff --git a/arch/arm/cpu/armv8/generic_timer.c b/arch/arm/cpu/armv8/generic_timer.c
index 223b95e..8e60bae 100644
--- a/arch/arm/cpu/armv8/generic_timer.c
+++ b/arch/arm/cpu/armv8/generic_timer.c
@@ -25,7 +25,18 @@ unsigned long get_tbclk(void)
 unsigned long timer_read_counter(void)
 {
 	unsigned long cntpct;
+#ifdef CONFIG_SYS_FSL_ERRATUM_A008585
+	/* This erratum number needs to be confirmed to match ARM document */
+	unsigned long temp;
+#endif
 	isb();
 	asm volatile("mrs %0, cntpct_el0" : "=r" (cntpct));
+#ifdef CONFIG_SYS_FSL_ERRATUM_A008585
+	asm volatile("mrs %0, cntpct_el0" : "=r" (temp));
+	while (temp != cntpct) {
+		asm volatile("mrs %0, cntpct_el0" : "=r" (cntpct));
+		asm volatile("mrs %0, cntpct_el0" : "=r" (temp));
+	}
+#endif
 	return cntpct;
 }
diff --git a/arch/arm/include/asm/arch-fsl-lsch3/config.h b/arch/arm/include/asm/arch-fsl-lsch3/config.h
index 1d2a7fa..2d461d9 100644
--- a/arch/arm/include/asm/arch-fsl-lsch3/config.h
+++ b/arch/arm/include/asm/arch-fsl-lsch3/config.h
@@ -120,6 +120,7 @@
 #ifdef CONFIG_LS2085A
 #define CONFIG_SYS_FSL_ERRATUM_A008336
 #define CONFIG_SYS_FSL_ERRATUM_A008514
+#define CONFIG_SYS_FSL_ERRATUM_A008585
 #endif
 
 #endif /* _ASM_ARMV8_FSL_LSCH3_CONFIG_ */
-- 
1.7.9.5

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

end of thread, other threads:[~2015-03-27 16:01 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19 16:45 [U-Boot] [PATCH 01/28] armv8/fsl-lsch3: Implement workaround for erratum A008585 York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 02/28] armv8/ls2085a: Update common header file York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 03/28] armv8/fsl-lsch3: Fix platform clock calculation York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 04/28] armv8/ls2085a: Fix generic timer clock source York Sun
2015-03-19 18:08   ` Mark Rutland
2015-03-19 18:16     ` York Sun
2015-03-19 18:17       ` Mark Rutland
2015-03-19 18:24         ` York Sun
2015-03-19 18:46           ` Mark Rutland
2015-03-19 19:26             ` York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 05/28] armv8/ls2085a: Add support for reset request York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 06/28] armv8/fsl-lsch3: Set nodes in DVM domain York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 07/28] armv8/fsl-lsch3: Update early MMU table York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 08/28] fsl-lsch3: Introduce place for common early SoC init York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 09/28] armv8/ls2085a: Add workaround for USB erratum A-008751 York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 10/28] armv8/fsl-lsch3: Use correct compatible for serial clock fixup York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 11/28] driver/ldpaa_eth: Update ldpaa ethernet driver York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 12/28] armv8: Add SerDes framework for LayerScape Architecture York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 13/28] net/phy/cortina: Fix compilation warning York Sun
2015-03-19 17:17   ` Joe Hershberger
2015-03-19 16:45 ` [U-Boot] [PATCH 14/28] drivers/fsl-mc: Changed MC firmware loading for new boot architecture York Sun
2015-03-19 17:53   ` Kim Phillips
2015-03-23 20:06     ` Jose Rivera
2015-03-23 20:34       ` Kim Phillips
2015-03-23 21:15         ` Jose Rivera
2015-03-23 22:05           ` Kim Phillips
2015-03-24 15:14             ` Jose Rivera
2015-03-24 15:35               ` Kim Phillips
     [not found]                 ` <CALRxmdDfZKYh3QOSnz1LzvkpWuS2OzontG_fLECuMgzz2N68uA@mail.gmail.com>
2015-03-25 21:12                   ` Kim Phillips
2015-03-26 23:57                     ` Jose Rivera
2015-03-27 16:01                       ` Kim Phillips
2015-03-19 16:45 ` [U-Boot] [PATCH 15/28] net/memac_phy: reuse driver for little endian SoCs York Sun
2015-03-19 18:03   ` Joe Hershberger
2015-03-20  3:06     ` Shaohui Xie
2015-03-20  3:33       ` Joe Hershberger
2015-03-20  3:48         ` Shaohui Xie
2015-03-20  3:58           ` Joe Hershberger
2015-03-19 16:45 ` [U-Boot] [PATCH 16/28] armv8/fsl-ch3: Add support to print RCW configuration York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 17/28] armv8/fsl-lsch3: Enable system error aborts York Sun
2015-03-19 18:14   ` Mark Rutland
2015-03-19 19:52     ` Scott Wood
2015-03-19 19:54       ` York Sun
2015-03-19 19:58         ` Scott Wood
2015-03-19 20:02           ` York Sun
2015-03-19 20:06             ` Scott Wood
2015-03-19 20:27               ` York Sun
2015-03-19 20:37                 ` Scott Wood
2015-03-19 20:47                   ` York Sun
2015-03-19 20:51                     ` Scott Wood
2015-03-19 20:56                       ` York Sun
2015-03-19 21:34                         ` Scott Wood
2015-03-20 11:31       ` Mark Rutland
2015-03-19 16:45 ` [U-Boot] [PATCH 18/28] driver/ldpaa: Add support of WRIOP static data structure York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 19/28] armv8/ls2085aqds: Add support of LS2085AQDS platform York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 20/28] armv8/ls2085ardb: Add support of LS2085ARDB platform York Sun
2015-03-20 23:01   ` Scott Wood
2015-03-21  0:08     ` York Sun
2015-03-21  0:12       ` Scott Wood
2015-03-21  0:16         ` York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 21/28] drivers/fsl-mc: Autoload AOIP image from NOR flash York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 22/28] board/ls2085qds: Add support ethernet York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 23/28] driver/ifc: Add 64KB page support York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 24/28] armv8/ls2085aqds: NAND boot support York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 25/28] freescale/qixis: Add support for booting from NAND York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 26/28] armv8/ls2085ardb: Enable NAND SPL support York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 27/28] ls2085a: esdhc: Add esdhc support for ls2085a York Sun
2015-03-19 16:45 ` [U-Boot] [PATCH 28/28] armv8/fsl-lsch3: Implement workaround for I2C issue York Sun
2015-03-20  5:35   ` Heiko Schocher
2015-03-20 16:08     ` York Sun

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.