From: Ding Tianhong <dingtianhong@huawei.com>
To: catalin.marinas@arm.com, will.deacon@arm.com,
marc.zyngier@arm.com, mark.rutland@arm.com, oss@buserror.net,
devicetree@vger.kernel.org, shawnguo@kernel.org,
stuart.yoder@nxp.com, linux-arm-kernel@lists.infradead.org,
linuxarm@huawei.com, hanjun.guo@linaro.org
Cc: Ding Tianhong <dingtianhong@huawei.com>
Subject: [PATCH v4 6/6] arm64: arch_timer: acpi: add hisi timer errata data
Date: Sat, 26 Nov 2016 16:00:48 +0800 [thread overview]
Message-ID: <1480147248-12828-7-git-send-email-dingtianhong@huawei.com> (raw)
In-Reply-To: <1480147248-12828-1-git-send-email-dingtianhong@huawei.com>
From: Hanjun Guo <hanjun.guo@linaro.org>
Add hisi timer specific erratum fixes.
v3: add hisilicon erratum 161601 for ACPI mode.
v4: update some data structures.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
---
drivers/clocksource/arm_arch_timer.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index d4f4a0d..649f7fe 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -1078,10 +1078,28 @@ struct gtdt_arch_timer_fixup {
void *context;
};
+#ifdef CONFIG_HISILICON_ERRATUM_161601
+static void __init erratum_workaround_enable(void *context)
+{
+ u64 erratum = (u64) context;
+
+ if (erratum & HISILICON_161601) {
+ timer_unstable_counter_workaround = &arch_timer_hisi_161601;
+ static_branch_enable(&arch_timer_read_ool_enabled);
+ pr_info("Enabling workaround for HISILICON ERRATUM 161601\n");
+ }
+}
+#endif
+
/* note: this needs to be updated according to the doc of OEM ID
* and TABLE ID for different board.
*/
struct gtdt_arch_timer_fixup arch_timer_quirks[] __initdata = {
+#ifdef CONFIG_HISILICON_ERRATUM_161601
+ {"HISI", "hip05", 0, &erratum_workaround_enable, (void *) HISILICON_161601},
+ {"HISI", "hip06", 0, &erratum_workaround_enable, (void *) HISILICON_161601},
+ {"HISI", "hip07", 0, &erratum_workaround_enable, (void *) HISILICON_161601},
+#endif
};
void __init arch_timer_acpi_quirks_handler(char *oem_id,
--
1.9.0
next prev parent reply other threads:[~2016-11-26 8:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-26 8:00 [PATCH v4 0/6] arm64: arch_timer: Add workaround for hisilicon-161601 erratum Ding Tianhong
2016-11-26 8:00 ` [PATCH v4 1/6] arm64: arch_timer: Add device tree binding " Ding Tianhong
2016-11-26 8:00 ` [PATCH v4 2/6] arm64: arch_timer: Introduce a generic erratum handing mechanism for fsl-a008585 Ding Tianhong
2016-11-26 8:00 ` [PATCH v4 3/6] arm64: arch_timer: Work around Erratum Hisilicon-161601 Ding Tianhong
2016-11-26 8:00 ` [PATCH v4 4/6] arm64: arch timer: Add timer erratum property for Hip05-d02 and Hip06-d03 Ding Tianhong
[not found] ` <1480147248-12828-1-git-send-email-dingtianhong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-11-26 8:00 ` [PATCH v4 5/6] arm64: arch_timer: apci: Introduce a generic aquirk framework for erratum Ding Tianhong
2016-11-26 8:00 ` Ding Tianhong [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-11-15 12:16 [PATCH v4 1/6] arm64: arch_timer: Add device tree binding for hisilicon-161601 erratum Ding Tianhong
2016-11-15 12:16 ` [PATCH v4 6/6] arm64: arch_timer: acpi: add hisi timer errata data Ding Tianhong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480147248-12828-7-git-send-email-dingtianhong@huawei.com \
--to=dingtianhong@huawei.com \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=hanjun.guo@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=oss@buserror.net \
--cc=shawnguo@kernel.org \
--cc=stuart.yoder@nxp.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).