From nobody Fri Jan 2 15:28:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 561AACD80C1 for ; Tue, 10 Oct 2023 12:33:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231853AbjJJMd3 (ORCPT ); Tue, 10 Oct 2023 08:33:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231371AbjJJMdZ (ORCPT ); Tue, 10 Oct 2023 08:33:25 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2C54B0 for ; Tue, 10 Oct 2023 05:33:23 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S4Zw61yY1zNnx2; Tue, 10 Oct 2023 20:29:26 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 10 Oct 2023 20:33:21 +0800 From: Yicong Yang To: , , , CC: , , , , , , , , Subject: [RFC PATCH 1/3] clocksource/drivers/arm_arch_timer: Split the function of __arch_timer_setup() Date: Tue, 10 Oct 2023 20:30:31 +0800 Message-ID: <20231010123033.23258-2-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20231010123033.23258-1-yangyicong@huawei.com> References: <20231010123033.23258-1-yangyicong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yicong Yang Currently we use __arch_timer_setup() to setup and register clockevents device for both cp15 and memory-mapped timer. However there's not too much in common of the setups for cp15 and memory-mapped timer. So split the setup function for cp15 and memory-mapped timer into separate functions. This will also allows future extension for platform timers. Signed-off-by: Yicong Yang --- drivers/clocksource/arm_arch_timer.c | 105 ++++++++++++++------------- 1 file changed, 54 insertions(+), 51 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm= _arch_timer.c index 7dd2c615bce2..2e20a8ec50ca 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -849,65 +849,68 @@ static u64 __arch_timer_check_delta(void) return CLOCKSOURCE_MASK(arch_counter_get_width()); } =20 -static void __arch_timer_setup(unsigned type, - struct clock_event_device *clk) +static void __arch_timer_setup_cp15(struct clock_event_device *clk) { + typeof(clk->set_next_event) sne; u64 max_delta; =20 clk->features =3D CLOCK_EVT_FEAT_ONESHOT; =20 - if (type =3D=3D ARCH_TIMER_TYPE_CP15) { - typeof(clk->set_next_event) sne; - - arch_timer_check_ool_workaround(ate_match_local_cap_id, NULL); - - if (arch_timer_c3stop) - clk->features |=3D CLOCK_EVT_FEAT_C3STOP; - clk->name =3D "arch_sys_timer"; - clk->rating =3D 450; - clk->cpumask =3D cpumask_of(smp_processor_id()); - clk->irq =3D arch_timer_ppi[arch_timer_uses_ppi]; - switch (arch_timer_uses_ppi) { - case ARCH_TIMER_VIRT_PPI: - clk->set_state_shutdown =3D arch_timer_shutdown_virt; - clk->set_state_oneshot_stopped =3D arch_timer_shutdown_virt; - sne =3D erratum_handler(set_next_event_virt); - break; - case ARCH_TIMER_PHYS_SECURE_PPI: - case ARCH_TIMER_PHYS_NONSECURE_PPI: - case ARCH_TIMER_HYP_PPI: - clk->set_state_shutdown =3D arch_timer_shutdown_phys; - clk->set_state_oneshot_stopped =3D arch_timer_shutdown_phys; - sne =3D erratum_handler(set_next_event_phys); - break; - default: - BUG(); - } - - clk->set_next_event =3D sne; - max_delta =3D __arch_timer_check_delta(); - } else { - clk->features |=3D CLOCK_EVT_FEAT_DYNIRQ; - clk->name =3D "arch_mem_timer"; - clk->rating =3D 400; - clk->cpumask =3D cpu_possible_mask; - if (arch_timer_mem_use_virtual) { - clk->set_state_shutdown =3D arch_timer_shutdown_virt_mem; - clk->set_state_oneshot_stopped =3D arch_timer_shutdown_virt_mem; - clk->set_next_event =3D - arch_timer_set_next_event_virt_mem; - } else { - clk->set_state_shutdown =3D arch_timer_shutdown_phys_mem; - clk->set_state_oneshot_stopped =3D arch_timer_shutdown_phys_mem; - clk->set_next_event =3D - arch_timer_set_next_event_phys_mem; - } + arch_timer_check_ool_workaround(ate_match_local_cap_id, NULL); =20 - max_delta =3D CLOCKSOURCE_MASK(56); + if (arch_timer_c3stop) + clk->features |=3D CLOCK_EVT_FEAT_C3STOP; + clk->name =3D "arch_sys_timer"; + clk->rating =3D 450; + clk->cpumask =3D cpumask_of(smp_processor_id()); + clk->irq =3D arch_timer_ppi[arch_timer_uses_ppi]; + switch (arch_timer_uses_ppi) { + case ARCH_TIMER_VIRT_PPI: + clk->set_state_shutdown =3D arch_timer_shutdown_virt; + clk->set_state_oneshot_stopped =3D arch_timer_shutdown_virt; + sne =3D erratum_handler(set_next_event_virt); + break; + case ARCH_TIMER_PHYS_SECURE_PPI: + case ARCH_TIMER_PHYS_NONSECURE_PPI: + case ARCH_TIMER_HYP_PPI: + clk->set_state_shutdown =3D arch_timer_shutdown_phys; + clk->set_state_oneshot_stopped =3D arch_timer_shutdown_phys; + sne =3D erratum_handler(set_next_event_phys); + break; + default: + BUG(); } =20 + clk->set_next_event =3D sne; + max_delta =3D __arch_timer_check_delta(); + clk->set_state_shutdown(clk); + clockevents_config_and_register(clk, arch_timer_rate, 0xf, max_delta); +} + +static void __arch_timer_setup_mem(struct clock_event_device *clk) +{ + u64 max_delta; =20 + clk->features =3D CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_DYNIRQ; + clk->name =3D "arch_mem_timer"; + clk->rating =3D 400; + clk->cpumask =3D cpu_possible_mask; + if (arch_timer_mem_use_virtual) { + clk->set_state_shutdown =3D arch_timer_shutdown_virt_mem; + clk->set_state_oneshot_stopped =3D arch_timer_shutdown_virt_mem; + clk->set_next_event =3D + arch_timer_set_next_event_virt_mem; + } else { + clk->set_state_shutdown =3D arch_timer_shutdown_phys_mem; + clk->set_state_oneshot_stopped =3D arch_timer_shutdown_phys_mem; + clk->set_next_event =3D + arch_timer_set_next_event_phys_mem; + } + + max_delta =3D CLOCKSOURCE_MASK(56); + + clk->set_state_shutdown(clk); clockevents_config_and_register(clk, arch_timer_rate, 0xf, max_delta); } =20 @@ -1004,7 +1007,7 @@ static int arch_timer_starting_cpu(unsigned int cpu) struct clock_event_device *clk =3D this_cpu_ptr(arch_timer_evt); u32 flags; =20 - __arch_timer_setup(ARCH_TIMER_TYPE_CP15, clk); + __arch_timer_setup_cp15(clk); =20 flags =3D check_ppi_trigger(arch_timer_ppi[arch_timer_uses_ppi]); enable_percpu_irq(arch_timer_ppi[arch_timer_uses_ppi], flags); @@ -1294,7 +1297,7 @@ static int __init arch_timer_mem_register(void __iome= m *base, unsigned int irq) =20 arch_timer_mem->base =3D base; arch_timer_mem->evt.irq =3D irq; - __arch_timer_setup(ARCH_TIMER_TYPE_MEM, &arch_timer_mem->evt); + __arch_timer_setup_mem(&arch_timer_mem->evt); =20 if (arch_timer_mem_use_virtual) func =3D arch_timer_handler_virt_mem; --=20 2.24.0 From nobody Fri Jan 2 15:28:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0C89CD80C0 for ; Tue, 10 Oct 2023 12:33:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231830AbjJJMdb (ORCPT ); Tue, 10 Oct 2023 08:33:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbjJJMd0 (ORCPT ); Tue, 10 Oct 2023 08:33:26 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB719B6 for ; Tue, 10 Oct 2023 05:33:23 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4S4ZvL17YfztTHX; Tue, 10 Oct 2023 20:28:46 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 10 Oct 2023 20:33:22 +0800 From: Yicong Yang To: , , , CC: , , , , , , , , Subject: [RFC PATCH 2/3] clocksource/drivers/arm_arch_timer: Extend and export arch_timer_mem_register() Date: Tue, 10 Oct 2023 20:30:32 +0800 Message-ID: <20231010123033.23258-3-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20231010123033.23258-1-yangyicong@huawei.com> References: <20231010123033.23258-1-yangyicong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yicong Yang Currently the memory-mapped timer will be probed by the GTDT table on ACPI based systems, and the timer interrupt can only be the GSI (SPI interrupt for arm64) per ACPI spec. However the generic timer specification doesn't restrict the interrupt type and per BSA Spec section 3.8.1 (DEN0094C 1.0C) the timer interrupt can also be a LPI interrupt. So this patch extends and exports the arch_timer_mem_register() function to allow other drivers registers a generic timer using LPI interrupt and probed by other means rather than GTDT. Note that the GTDT timer still has a higher priority, if a GTDT timer is registered, we'll block later registration of other timers. Signed-off-by: Yicong Yang --- drivers/clocksource/arm_arch_timer.c | 26 +++++++++++++++++--------- include/clocksource/arm_arch_timer.h | 2 ++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm= _arch_timer.c index 2e20a8ec50ca..6e9445192ca4 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -66,7 +66,7 @@ struct arch_timer { struct clock_event_device evt; }; =20 -static struct arch_timer *arch_timer_mem __ro_after_init; +static struct arch_timer *arch_timer_mem; =20 #define to_arch_timer(e) container_of(e, struct arch_timer, evt) =20 @@ -888,15 +888,16 @@ static void __arch_timer_setup_cp15(struct clock_even= t_device *clk) clockevents_config_and_register(clk, arch_timer_rate, 0xf, max_delta); } =20 -static void __arch_timer_setup_mem(struct clock_event_device *clk) +static void __arch_timer_setup_mem(struct clock_event_device *clk, + bool irq_virtual, const char *name) { u64 max_delta; =20 clk->features =3D CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_DYNIRQ; - clk->name =3D "arch_mem_timer"; + clk->name =3D name; clk->rating =3D 400; clk->cpumask =3D cpu_possible_mask; - if (arch_timer_mem_use_virtual) { + if (irq_virtual) { clk->set_state_shutdown =3D arch_timer_shutdown_virt_mem; clk->set_state_oneshot_stopped =3D arch_timer_shutdown_virt_mem; clk->set_next_event =3D @@ -1286,25 +1287,30 @@ static int __init arch_timer_register(void) return err; } =20 -static int __init arch_timer_mem_register(void __iomem *base, unsigned int= irq) +int arch_timer_mem_register(void __iomem *base, unsigned int irq, + bool irq_virtual, const char *name) { int ret; irq_handler_t func; =20 + /* If we've already register a memory timer, fail the registration */ + if (arch_timer_mem) + return -EEXIST; + arch_timer_mem =3D kzalloc(sizeof(*arch_timer_mem), GFP_KERNEL); if (!arch_timer_mem) return -ENOMEM; =20 arch_timer_mem->base =3D base; arch_timer_mem->evt.irq =3D irq; - __arch_timer_setup_mem(&arch_timer_mem->evt); + __arch_timer_setup_mem(&arch_timer_mem->evt, irq_virtual, name); =20 - if (arch_timer_mem_use_virtual) + if (irq_virtual) func =3D arch_timer_handler_virt_mem; else func =3D arch_timer_handler_phys_mem; =20 - ret =3D request_irq(irq, func, IRQF_TIMER, "arch_mem_timer", &arch_timer_= mem->evt); + ret =3D request_irq(irq, func, IRQF_TIMER, name, &arch_timer_mem->evt); if (ret) { pr_err("Failed to request mem timer irq\n"); kfree(arch_timer_mem); @@ -1313,6 +1319,7 @@ static int __init arch_timer_mem_register(void __iome= m *base, unsigned int irq) =20 return ret; } +EXPORT_SYMBOL_GPL(arch_timer_mem_register); =20 static const struct of_device_id arch_timer_of_match[] __initconst =3D { { .compatible =3D "arm,armv7-timer", }, @@ -1560,7 +1567,8 @@ arch_timer_mem_frame_register(struct arch_timer_mem_f= rame *frame) return -ENXIO; } =20 - ret =3D arch_timer_mem_register(base, irq); + ret =3D arch_timer_mem_register(base, irq, arch_timer_mem_use_virtual, + "arch_mem_timer"); if (ret) { iounmap(base); return ret; diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm= _arch_timer.h index cbbc9a6dc571..d0fa2065586c 100644 --- a/include/clocksource/arm_arch_timer.h +++ b/include/clocksource/arm_arch_timer.h @@ -89,6 +89,8 @@ extern u32 arch_timer_get_rate(void); extern u64 (*arch_timer_read_counter)(void); extern struct arch_timer_kvm_info *arch_timer_get_kvm_info(void); extern bool arch_timer_evtstrm_available(void); +extern int arch_timer_mem_register(void __iomem *base, unsigned int irq, + bool irq_virtual, const char *name); =20 #else =20 --=20 2.24.0 From nobody Fri Jan 2 15:28:25 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD162CD80BD for ; Tue, 10 Oct 2023 12:33:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231770AbjJJMde (ORCPT ); Tue, 10 Oct 2023 08:33:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231593AbjJJMd0 (ORCPT ); Tue, 10 Oct 2023 08:33:26 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A2CCB7 for ; Tue, 10 Oct 2023 05:33:24 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S4Zwf0rHCzVlV2; Tue, 10 Oct 2023 20:29:54 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 10 Oct 2023 20:33:22 +0800 From: Yicong Yang To: , , , CC: , , , , , , , , Subject: [RFC PATCH 3/3] clocksource/drivers: Add HiSilicon system timer driver Date: Tue, 10 Oct 2023 20:30:33 +0800 Message-ID: <20231010123033.23258-4-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20231010123033.23258-1-yangyicong@huawei.com> References: <20231010123033.23258-1-yangyicong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yicong Yang HiSilicon system timer is compatible with arm's generic timer specification but is enumerated through DSDT and can use SPI/LPI interrupt as timer interrupt. This patch adds the support for the timer. The driver probes the device IO memory and interrupt resources through DSDT and then reuse the codes of the arm_arch_timer for setup and register the clockevent device. Example DSDT node will be like: Device (TIM0) { Name (_HID, "HISI03F2") // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID Name (RBUF, ResourceTemplate () { QWordMemory (ResourceConsumer, PosDecode, MinFixed, MaxFixe= d, NonCacheable, ReadWrite, 0x0000000000000000, // Granularity 0x0000000401170000, // Range Minimum 0x0000000401170fff, // Range Maximum 0x0000000000000000, // Translation Offset 0x0000000000001000, // Length ,, , AddressRangeMemory, TypeStatic) Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, = ,, ) { 0x000003C6, } }) Method (_CRS, 0, NotSerialized) { Return (RBUF) } } Signed-off-by: Yicong Yang --- drivers/clocksource/Kconfig | 10 ++++ drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-hisi-sys.c | 68 ++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 drivers/clocksource/timer-hisi-sys.c diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 0ba0dc4ecf06..2e43cd6e2add 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -732,4 +732,14 @@ config GOLDFISH_TIMER help Support for the timer/counter of goldfish-rtc =20 +config HISI_SYS_TIMER + tristate "HiSilicon system timer driver" + depends on ARM_ARCH_TIMER && ARM64 && ACPI + help + Support for HiSilicon system timer which used as a clockevent + device. + + This driver can also be built as a module. If so, the module + will be called timer_hisi_sys. + endmenu diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile index 368c3461dab8..39ababd0d4dd 100644 --- a/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile @@ -89,3 +89,4 @@ obj-$(CONFIG_MSC313E_TIMER) +=3D timer-msc313e.o obj-$(CONFIG_GOLDFISH_TIMER) +=3D timer-goldfish.o obj-$(CONFIG_GXP_TIMER) +=3D timer-gxp.o obj-$(CONFIG_CLKSRC_LOONGSON1_PWM) +=3D timer-loongson1-pwm.o +obj-$(CONFIG_HISI_SYS_TIMER) +=3D timer-hisi-sys.o diff --git a/drivers/clocksource/timer-hisi-sys.c b/drivers/clocksource/tim= er-hisi-sys.c new file mode 100644 index 000000000000..1ef39d97e83d --- /dev/null +++ b/drivers/clocksource/timer-hisi-sys.c @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Driver for HiSilicon system timer driver. + * + * The device is fully compatible with ARM's Generic Timer specification. + * The device is enumerated through DSDT rather than GTDT and can use + * LPI interrupt besides SPI. + * + * Copyright (c) 2023 HiSilicon Technologies Co., Ltd. + * Author: Yicong Yang + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define DRV_NAME "hisi_sys_timer" + +#define CNTFRQ 0x10 + +static const struct acpi_device_id hisi_sys_timer_acpi_ids[] =3D { + { "HISI03F2", 0 }, + { } +}; +MODULE_DEVICE_TABLE(acpi, hisi_sys_timer_acpi_ids); + +static int hisi_sys_timer_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + void __iomem *iobase; + int ret, irq; + u32 freq; + + iobase =3D devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(iobase)) + return PTR_ERR(iobase); + + irq =3D platform_get_irq(pdev, 0); + if (irq <=3D 0) + return dev_err_probe(dev, ret, "failed to get interrupt\n"); + + ret =3D arch_timer_mem_register(iobase, irq, false, DRV_NAME); + if (ret) + return dev_err_probe(dev, ret, "failed to register timer\n"); + + freq =3D readl_relaxed(iobase + CNTFRQ); + dev_info(dev, "%s works at %ldMHz\n", DRV_NAME, freq / HZ_PER_MHZ); + return 0; +} + +static struct platform_driver hisi_sys_timer_driver =3D { + .probe =3D hisi_sys_timer_probe, + .driver =3D { + .name =3D DRV_NAME, + .acpi_match_table =3D hisi_sys_timer_acpi_ids, + }, +}; +module_platform_driver(hisi_sys_timer_driver); + +MODULE_AUTHOR("Yicong Yang "); +MODULE_DESCRIPTION("HiSilicon system timer driver"); +MODULE_LICENSE("GPL"); --=20 2.24.0