aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/arm_arch_timer.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2017-02-21 10:04:27 -0500
committerMarc Zyngier <marc.zyngier@arm.com>2017-04-07 06:22:10 -0400
commitd003d029cea8a28139b4f9b88a36b8fac864f45b (patch)
treebdac1493d30d6957dcc60a036a54a4caa66efaeb /drivers/clocksource/arm_arch_timer.c
parent5a38bcac1f2f0bd0d24700690e36a277ffd0396d (diff)
arm64: arch_timer: Add HISILICON_ERRATUM_161010101 ACPI matching data
In order to deal with ACPI enabled platforms suffering from the HISILICON_ERRATUM_161010101, let's add the required OEM data that allow the workaround to be enabled. Acked-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: dann frazier <dann.frazier@canonical.com> Tested-by: Hanjun Guo <hanjun.guo@linaro.org> Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/clocksource/arm_arch_timer.c')
-rw-r--r--drivers/clocksource/arm_arch_timer.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 887f6d00a71d..bf9e9d76375e 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -270,6 +270,29 @@ static u64 notrace hisi_161010101_read_cntvct_el0(void)
270{ 270{
271 return __hisi_161010101_read_reg(cntvct_el0); 271 return __hisi_161010101_read_reg(cntvct_el0);
272} 272}
273
274static struct ate_acpi_oem_info hisi_161010101_oem_info[] = {
275 /*
276 * Note that trailing spaces are required to properly match
277 * the OEM table information.
278 */
279 {
280 .oem_id = "HISI ",
281 .oem_table_id = "HIP05 ",
282 .oem_revision = 0,
283 },
284 {
285 .oem_id = "HISI ",
286 .oem_table_id = "HIP06 ",
287 .oem_revision = 0,
288 },
289 {
290 .oem_id = "HISI ",
291 .oem_table_id = "HIP07 ",
292 .oem_revision = 0,
293 },
294 { /* Sentinel indicating the end of the OEM array */ },
295};
273#endif 296#endif
274 297
275#ifdef CONFIG_ARM64_ERRATUM_858921 298#ifdef CONFIG_ARM64_ERRATUM_858921
@@ -347,6 +370,16 @@ static const struct arch_timer_erratum_workaround ool_workarounds[] = {
347 .set_next_event_phys = erratum_set_next_event_tval_phys, 370 .set_next_event_phys = erratum_set_next_event_tval_phys,
348 .set_next_event_virt = erratum_set_next_event_tval_virt, 371 .set_next_event_virt = erratum_set_next_event_tval_virt,
349 }, 372 },
373 {
374 .match_type = ate_match_acpi_oem_info,
375 .id = hisi_161010101_oem_info,
376 .desc = "HiSilicon erratum 161010101",
377 .read_cntp_tval_el0 = hisi_161010101_read_cntp_tval_el0,
378 .read_cntv_tval_el0 = hisi_161010101_read_cntv_tval_el0,
379 .read_cntvct_el0 = hisi_161010101_read_cntvct_el0,
380 .set_next_event_phys = erratum_set_next_event_tval_phys,
381 .set_next_event_virt = erratum_set_next_event_tval_virt,
382 },
350#endif 383#endif
351#ifdef CONFIG_ARM64_ERRATUM_858921 384#ifdef CONFIG_ARM64_ERRATUM_858921
352 { 385 {