Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1830255rwb; Fri, 7 Oct 2022 20:11:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6+HfHlSHaJyiXgY17lUu7VcgVxC3wDTWv9TcY6lbX4T1yzhHuWfghKvN/g1LjueFlXpvku X-Received: by 2002:a63:d845:0:b0:44b:d074:97d with SMTP id k5-20020a63d845000000b0044bd074097dmr7450557pgj.32.1665198699987; Fri, 07 Oct 2022 20:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665198699; cv=none; d=google.com; s=arc-20160816; b=ZM4xJbs3SA1TPwS2Om57aP6ZFMnlQgceQ2zTW3lo9C2G80Pa5MDXFB4Q8pfSKS2vVV 8/vgn5jsS12HxCO804cgkWZW4q5LpRcUEpkRhNEQ2OXG9BEYoHPeIeEiiJoMmnpo3Lqo fgxz6gmePtUuD0+Yl2xtv5kjxkUAp+wYRcH09nq+x3l/XNkfyh9Hai8/jA235GaruKRH 9Jrd3S/dTTyZs/BalxlBS9s/bs0/FPc9PhO7km43/WNBcE+cbMSWs2PJHB2OTMq02LRi yrYgekaZt5MJq9yCMyYHWz3HluSBluyzY/5qpHwnOW/rkNrHM/do5go17TSqoTv4Lw61 uA5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=FRDPmrbdc/h+LVymRQGT+45Fa7+ic0l0JIOUGmuyoT4=; b=DDAfEmL7rcvv/wC1sgnoJKj1BD1/SmU0dic8Mork0qYfuyEId3QHQ9dALUN7jPosDf qSLFyr9vNq/kvnJI+ycN/y+HcpM6RCo1/pJ6CIyRcHxRQw9TiRspefAArtJRKO1r6Fdu Fgf3+I+6OML3wLotxmIjC6JoIhicHhyJfioE3IbEIF71XUUJrfbuTIVIYgihS9YGB1VV JQOcKJSbICJeUjvbsZRstd+f5CMd/VcazYIoKznZq2OAAHUCuSpUr2LHmYecJA5gZRPF /8RwU1I3jcLZT14MqDHoKv2nhZgpwjhbukrJ7pFhC9IP7fnwp8mNs//6B+MwcJ+ki3f4 8sMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a170903404d00b0017849a2b55dsi3575558pla.284.2022.10.07.20.11.20; Fri, 07 Oct 2022 20:11:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229647AbiJHDAL (ORCPT + 99 others); Fri, 7 Oct 2022 23:00:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbiJHDAH (ORCPT ); Fri, 7 Oct 2022 23:00:07 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B9933AB03; Fri, 7 Oct 2022 20:00:03 -0700 (PDT) Received: from [10.180.13.64] (unknown [10.180.13.64]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxTWus50BjQyEoAA--.19966S2; Sat, 08 Oct 2022 10:59:56 +0800 (CST) Subject: Re: [PATCH v1 1/2] clocksource: loongson2_hpet: add hpet driver support To: WANG Xuerui , Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Huacai Chen , Jiaxun Yang , Jianmin Lv , Yun Liu , Yang Li , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, loongarch@lists.linux.dev, zhuyinbo@loongson.cn References: <20220930093510.10781-1-zhuyinbo@loongson.cn> From: Yinbo Zhu Message-ID: <1b1f167f-a9be-fc1c-ffe7-0fb1bdf7c429@loongson.cn> Date: Sat, 8 Oct 2022 10:59:56 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8AxTWus50BjQyEoAA--.19966S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Aw1fJw4xXrW7GFWfAw15XFb_yoW8tFy3pF 4xG3Z8KrWDXr4fZwsxXryDCF98Cw1xJw15G3W7t3WkArykJF1jqr4jqa4Yg3W7Xr4rJ342 vFZYqr1UuFyDAF7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9K14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxV WxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2Wl Yx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbV WUJVW8JwACjcxG0xvEwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lFIxGxcIEc7CjxVA2 Y2ka0xkIwI1lc7I2V7IY0VAS07AlzVAYIcxG8wCY02Avz4vE-syl42xK82IYc2Ij64vIr4 1l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK 67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI 8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAv wI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14 v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUoOJ5UUUUU X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/9/30 下午10:43, WANG Xuerui 写道: > Hi, > > On 9/30/22 17:35, Yinbo Zhu wrote: >> HPET (High Precision Event Timer) defines a new set of timers, which >> are used by the operating system to schedule threads, interrupt the >> kernel and interrupt the multimedia timer server. The operating >> system can assign different timers to different applications. By >> configuration, each timer can generate interrupt independently. >> >> The loongson2 HPET module includes a main count and three comparators >> , all of which are 32 bits wide. Among the three comparators, only >> one comparator supports periodic interrupt, all three comparators >> support non periodic interrupts. >> >> Signed-off-by: Yinbo Zhu >> --- >>   MAINTAINERS                          |   6 + >>   arch/loongarch/kernel/time.c         |   3 + >>   drivers/clocksource/Kconfig          |   9 + >>   drivers/clocksource/Makefile         |   1 + >>   drivers/clocksource/loongson2_hpet.c | 332 +++++++++++++++++++++++++++ >>   5 files changed, 351 insertions(+) >>   create mode 100644 drivers/clocksource/loongson2_hpet.c > > Thanks for the contribution, but as HPET is a fairly common peripheral > that have well standardized behavior, why not simply add DT support to > the drivers/char/hpet.c and be done with it? At present, the drivers/char/hpet.c doesn't support DT(dts parse) and loongson2 soc wasn't belong to X86 or IA64 architecture, Although it is an option to add DT support for this driver, I consider that the hpet design of loongson2 series socs may not be universal. In addition, I notice that mips and x86 have their own hpet drivers. In order to reduce the impact on the public driver and make more flexible modifications to the loongson2 hpet driver under its own architecture, a separate loongson2 hpet driver was submitted. config HPET bool "HPET - High Precision Event Timer" if (X86 || IA64) default n depends on ACPI help If you say Y here, you will have a miscdevice named "/dev/hpet/". Each open selects one of the timers supported by the HPET. The timers are non-periodic and/or periodic. BRs Yinbo Zhu. >