Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753085AbeADNuS (ORCPT + 1 other); Thu, 4 Jan 2018 08:50:18 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:42151 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752801AbeADNuN (ORCPT ); Thu, 4 Jan 2018 08:50:13 -0500 X-Google-Smtp-Source: ACJfBovJ1vtOA9RsGL0EU3GQFt4FQhoSougMEt8rvfeUVtKO2LeUOtgSLMRLs+WYwt97w7wgVkxyqA== Subject: Re: [PATCH v5 1/3] clocksource/drivers/atcpit100: Add andestech atcpit100 timer To: Greentime Hu , Greentime Cc: Rick Chen , Rick Chen , Linux Kernel Mailing List , Arnd Bergmann , Linus Walleij , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , netdev , Vincent Chen , DTML , Al Viro , David Howells , Will Deacon , linux-serial@vger.kernel.org References: <1513057621-19084-1-git-send-email-rickchen36@gmail.com> <1513057621-19084-2-git-send-email-rickchen36@gmail.com> From: Daniel Lezcano Message-ID: Date: Thu, 4 Jan 2018 14:50:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi, sorry I missed your answer. Comments below. On 13/12/2017 07:06, Greentime Hu wrote: > Hi, Daniel: > > 2017-12-12 18:05 GMT+08:00 Daniel Lezcano : >> On 12/12/2017 06:46, Rick Chen wrote: >>> ATCPIT100 is often used on the Andes architecture, >>> This timer provide 4 PIT channels. Each PIT channel is a >>> multi-function timer, can be configured as 32,16,8 bit timers >>> or PWM as well. >>> >>> For system timer it will set channel 1 32-bit timer0 as clock >>> source and count downwards until underflow and restart again. >> >> [ ... ] >> >>> +config CLKSRC_ATCPIT100 >>> + bool "Clocksource for AE3XX platform" >>> + depends on NDS32 || COMPILE_TEST >>> + depends on HAS_IOMEM >>> + help >>> + This option enables support for the Andestech AE3XX platform timers. >> >> Hi Rick, >> >> the general rule for the Kconfig is: >> >> bool "Clocksource for AE3XX platform" if COMPILE_TEST >> >> and no deps on the platform. >> >> It is up to the platform Kconfig to select the option. >> >> We want here a silent option but make it selectable in case of >> compilation test coverage. > > > The way we like to use it is because > 1. This timer is a basic component to boot an nds32 CPU and it should > be able to select without COMPILE_TEST for nds32 architecture. Yes, so you don't need it to be selectable, you must select it from the platform's Kconfig. > 2. It seems conflict with debug info. I am not sure if there is > another way to debug kernel(with debug info) with COMPILE_TEST and > DEBUG_INFO because we need this driver for nds32 architecture. > > Symbol: DEBUG_INFO [=n] > Type : boolean > Prompt: Compile the kernel with debug info > Location: > -> Kernel hacking > -> Compile-time checks and compiler options > Defined at lib/Kconfig.debug:140 > Depends on: DEBUG_KERNEL [=y] && !COMPILE_TEST [=n] The COMPILE_TEST option is only there to allow cross-compilation test coverage, it does not select or unselect the driver in usual way. If the COMPILE_TEST is enabled, then the option will appear in the menuconfig, so that gives the opportunity to select/unselect it. Otherwise, the Kconfig's platform selects automatically the driver and the user *can't* unselect it from the menuconfig as it is a silent option and that is certainly what you want. >> Also, this driver is not a CLKSRC but a TIMER. Rename CLKSRC_ATCPIT100 >> to TIMER_ATCPIT100. > > Thanks. We will rename it in the next version patch. You just resend an entire series V5 for the architecture. I'm confused, what is the merging path ? Thanks. -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog