From patchwork Fri Dec 23 07:04:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 88918 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp3187880qgi; Thu, 22 Dec 2016 23:06:54 -0800 (PST) X-Received: by 10.84.210.233 with SMTP id a96mr26624016pli.72.1482476814896; Thu, 22 Dec 2016 23:06:54 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si13386337pgn.3.2016.12.22.23.06.54; Thu, 22 Dec 2016 23:06:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758281AbcLWHGx (ORCPT + 7 others); Fri, 23 Dec 2016 02:06:53 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:5100 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754763AbcLWHGx (ORCPT ); Fri, 23 Dec 2016 02:06:53 -0500 Received: from 172.24.1.60 (EHLO szxeml431-hub.china.huawei.com) ([172.24.1.60]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CNC22739; Fri, 23 Dec 2016 15:05:11 +0800 (CST) Received: from localhost (10.177.23.32) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.235.1; Fri, 23 Dec 2016 15:05:02 +0800 From: Ding Tianhong To: , , , , , , , , , CC: Hanjun Guo , Ding Tianhong Subject: [PATCH v5 6/6] arm64: arch_timer: acpi: add hisi timer errata data Date: Fri, 23 Dec 2016 15:04:29 +0800 Message-ID: <1482476669-15596-7-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1482476669-15596-1-git-send-email-dingtianhong@huawei.com> References: <1482476669-15596-1-git-send-email-dingtianhong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.23.32] X-CFilter-Loop: Reflected Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Hanjun Guo Add hisi timer specific erratum fixes. v3: add hisilicon erratum 161601 for ACPI mode. v4: update some data structures. Signed-off-by: Hanjun Guo Signed-off-by: Ding Tianhong --- drivers/clocksource/arm_arch_timer.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 212bfa5..7b15d2a 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -1089,10 +1089,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,