From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Armstrong Subject: Re: [PATCH 2/7] clocksource: Rename CLOCKSOURCE_OF_DECLARE Date: Mon, 29 May 2017 10:00:46 +0200 Message-ID: <4ccb7cac-1663-792a-7912-d9ee803c7e2b@baylibre.com> References: <1495879129-28109-1-git-send-email-daniel.lezcano@linaro.org> <1495879129-28109-2-git-send-email-daniel.lezcano@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1495879129-28109-2-git-send-email-daniel.lezcano@linaro.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+gla-linux-snps-arc=m.gmane.org@lists.infradead.org To: Daniel Lezcano , tglx@linutronix.de Cc: Mark Rutland , "open list:RALINK MIPS ARCHITECTURE" , Baruch Siach , Heiko Stuebner , Linus Walleij , Santosh Shilimkar , Liviu Dudau , "moderated list:ARM/OXNAS platform support" , Patrice Chotard , Eric Anholt , Thierry Reding , Ingo Molnar , "open list:ARM/STI ARCHITECTURE" , Alexandre Courbot , "moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES" , Florian Fainelli , "moderated list:H8/300 ARCHITECTURE" , Alexander Shiyan , open list:ARM/Rockchip So List-Id: linux-tegra@vger.kernel.org On 05/27/2017 11:58 AM, Daniel Lezcano wrote: > The CLOCKSOUCE_OF_DECLARE macro is used widely for the timers to declare the > clocksource at early stage. However, this macro is also used to initialize > the clockevent if any, or the clockevent only. > > It was originally suggested to declare another macro to initialize a > clockevent, so in order to separate the two entities even they belong to the > same IP. This was not accepted because of the impact on the DT where splitting > a clocksource/clockevent definition does not make sense as it is a Linux > concept not a hardware description. > > On the other side, the clocksource has not interrupt declared while the > clockevent has, so it is easy from the driver to know if the description is > for a clockevent or a clocksource, IOW it could be implemented at the driver > level. > > So instead of dealing with a named clocksource macro, let's use a more generic > one: TIMER_OF_DECLARE. > > The patch has not functional changes. > > Signed-off-by: Daniel Lezcano > --- > arch/arm/kernel/smp_twd.c | 6 +++--- > arch/microblaze/kernel/timer.c | 2 +- > arch/mips/ralink/cevt-rt3352.c | 2 +- > arch/nios2/kernel/time.c | 2 +- > drivers/clocksource/arc_timer.c | 6 +++--- > drivers/clocksource/arm_arch_timer.c | 6 +++--- > drivers/clocksource/arm_global_timer.c | 2 +- > drivers/clocksource/armv7m_systick.c | 2 +- > drivers/clocksource/asm9260_timer.c | 2 +- > drivers/clocksource/bcm2835_timer.c | 2 +- > drivers/clocksource/bcm_kona_timer.c | 4 ++-- > drivers/clocksource/cadence_ttc_timer.c | 2 +- > drivers/clocksource/clksrc-dbx500-prcmu.c | 2 +- > drivers/clocksource/clksrc_st_lpc.c | 2 +- > drivers/clocksource/clps711x-timer.c | 2 +- > drivers/clocksource/dw_apb_timer_of.c | 8 ++++---- > drivers/clocksource/exynos_mct.c | 4 ++-- > drivers/clocksource/fsl_ftm_timer.c | 2 +- > drivers/clocksource/h8300_timer16.c | 2 +- > drivers/clocksource/h8300_timer8.c | 2 +- > drivers/clocksource/h8300_tpu.c | 2 +- > drivers/clocksource/jcore-pit.c | 2 +- > drivers/clocksource/meson6_timer.c | 2 +- > drivers/clocksource/mips-gic-timer.c | 2 +- > drivers/clocksource/mps2-timer.c | 2 +- > drivers/clocksource/mtk_timer.c | 2 +- > drivers/clocksource/mxs_timer.c | 2 +- > drivers/clocksource/nomadik-mtu.c | 2 +- > drivers/clocksource/pxa_timer.c | 2 +- > drivers/clocksource/qcom-timer.c | 4 ++-- > drivers/clocksource/renesas-ostm.c | 2 +- > drivers/clocksource/rockchip_timer.c | 4 ++-- > drivers/clocksource/samsung_pwm_timer.c | 8 ++++---- > drivers/clocksource/sun4i_timer.c | 2 +- > drivers/clocksource/tango_xtal.c | 2 +- > drivers/clocksource/tegra20_timer.c | 4 ++-- > drivers/clocksource/time-armada-370-xp.c | 6 +++--- > drivers/clocksource/time-efm32.c | 4 ++-- > drivers/clocksource/time-lpc32xx.c | 2 +- > drivers/clocksource/time-orion.c | 2 +- > drivers/clocksource/time-pistachio.c | 2 +- > drivers/clocksource/timer-atlas7.c | 2 +- > drivers/clocksource/timer-atmel-pit.c | 2 +- > drivers/clocksource/timer-atmel-st.c | 2 +- > drivers/clocksource/timer-digicolor.c | 2 +- > drivers/clocksource/timer-fttmr010.c | 10 +++++----- > drivers/clocksource/timer-imx-gpt.c | 24 ++++++++++++------------ > drivers/clocksource/timer-integrator-ap.c | 2 +- > drivers/clocksource/timer-keystone.c | 2 +- > drivers/clocksource/timer-nps.c | 6 +++--- > drivers/clocksource/timer-oxnas-rps.c | 4 ++-- > drivers/clocksource/timer-prima2.c | 2 +- > drivers/clocksource/timer-sp804.c | 4 ++-- > drivers/clocksource/timer-stm32.c | 2 +- > drivers/clocksource/timer-sun5i.c | 4 ++-- > drivers/clocksource/timer-ti-32k.c | 2 +- > drivers/clocksource/timer-u300.c | 2 +- > drivers/clocksource/versatile.c | 4 ++-- > drivers/clocksource/vf_pit_timer.c | 2 +- > drivers/clocksource/vt8500_timer.c | 2 +- > drivers/clocksource/zevio-timer.c | 2 +- > include/linux/clocksource.h | 2 +- > 62 files changed, 103 insertions(+), 103 deletions(-) > [...] > diff --git a/drivers/clocksource/timer-oxnas-rps.c b/drivers/clocksource/timer-oxnas-rps.c > index d630bf4..eed6fef 100644 > --- a/drivers/clocksource/timer-oxnas-rps.c > +++ b/drivers/clocksource/timer-oxnas-rps.c > @@ -293,7 +293,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np) > return ret; > } > > -CLOCKSOURCE_OF_DECLARE(ox810se_rps, > +TIMER_OF_DECLARE(ox810se_rps, > "oxsemi,ox810se-rps-timer", oxnas_rps_timer_init); > -CLOCKSOURCE_OF_DECLARE(ox820_rps, > +TIMER_OF_DECLARE(ox820_rps, > "oxsemi,ox820se-rps-timer", oxnas_rps_timer_init); [...] For the timer-oxnas-rps driver, Acked-by: Neil Armstrong Thanks for the rework, Neil From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 29 May 2017 10:01:12 +0200 (CEST) Received: from mail-wm0-x233.google.com ([IPv6:2a00:1450:400c:c09::233]:37238 "EHLO mail-wm0-x233.google.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23990601AbdE2IA71fLFg (ORCPT ); Mon, 29 May 2017 10:00:59 +0200 Received: by mail-wm0-x233.google.com with SMTP id d127so48050071wmf.0 for ; Mon, 29 May 2017 01:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=viWXfdu6tF+tnlL6vz+rKhQ0nXZPouD8mMO6dpttZoo=; b=TDHnfPSSE8i/gj60LbU6FPudtSaBbUaWkcKo07UIau4q2ywoCNN5PxI3Zg8nABYkQ/ 8nhM2hURllVKUQAI7TRfKsFTjognJaMj0dMR5gfKe1o/aTdP/P42hm3qE5glUvEVVhUy Nlmf/u4w7qI0CkDjYjWm4g+FsMyI6b8duOwYPLD36sL77PACEzo6hnizkFUjd0DQG1ze DDY5fWQ2hzkj7ay6ejORlp9hQdiOuGcfe0sJqWWehcA4iNzxYBbDRXPjCVXu1IauOanu DXKYqnqbDXSi6/GxA1DZZo9MUyvpvb3OvsnbiNF8pg6mJnFDSz1b+ciiEd1Nc1EauR59 AyrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=viWXfdu6tF+tnlL6vz+rKhQ0nXZPouD8mMO6dpttZoo=; b=q4BaYXg2vdnT/HH4YGqSk1XqH+sCV0V9DRxBwHPIBq4QylWcRS6Mu6Kn/R94YuWPWD spmtUAvP2IJeB58mAI3YVuWFoAtBw9JRA3rSzTdT2iwu3sD+NYmEMeg928vbaitDUQV8 XcgIexb59SziGXidVJxB10UDFdqpv5kSxqiQcO77L7u6QOIktMs5iD1U2xOU7JlwGA43 Lbg8aTUCsZepC7mp3rQQjI1z3xsfD2zuLc/WVQK8H4v6TRTR8+diimpX9WWZRcTSN+ri Cs4EPelKPtIYlgKcvxCoG9kmhTaoUca/F2yNH/hSQBJVmDzR1XEdx23RdngzHeuhwGSb U0qA== X-Gm-Message-State: AODbwcALN/Z3RrMAYW2buYfIkdTnqiTLzO1xJPXcsTGzGzXx9foQAePX PtmzVvhfpdOt7Hy6 X-Received: by 10.223.169.78 with SMTP id u72mr9200363wrc.193.1496044852903; Mon, 29 May 2017 01:00:52 -0700 (PDT) Received: from [192.168.1.21] ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id r130sm4826125wmg.4.2017.05.29.01.00.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 May 2017 01:00:52 -0700 (PDT) Subject: Re: [PATCH 2/7] clocksource: Rename CLOCKSOURCE_OF_DECLARE To: Daniel Lezcano , tglx@linutronix.de References: <1495879129-28109-1-git-send-email-daniel.lezcano@linaro.org> <1495879129-28109-2-git-send-email-daniel.lezcano@linaro.org> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King , Michal Simek , John Crispin , Ralf Baechle , Ley Foon Tan , Vineet Gupta , Mark Rutland , Marc Zyngier , Patrice Chotard , Maxime Coquelin , Alexandre Torgue , Florian Fainelli , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , Stephen Warren , Lee Jones , Eric Anholt , =?UTF-8?Q?S=c3=b6ren_Brinkmann?= , Linus Walleij , Alexander Shiyan , Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas , Yoshinori Sato , Carlo Caione , Kevin Hilman , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Matthias Brugger , Heiko Stuebner , Maxime Ripard , Chen-Yu Tsai , Marc Gonzalez , Thierry Reding , Alexandre Courbot , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , Joachim Eastwood , Vladimir Zapolskiy , Sylvain Lemieux , Barry Song , Baruch Siach , Santosh Shilimkar , Tony Prisk , John Stultz , Stephen Boyd , Anna-Maria Gleixner , Richard Cochran , Ingo Molnar , Noam Camus , Arnd Bergmann , "open list:RALINK MIPS ARCHITECTURE" , "moderated list:NIOS2 ARCHITECTURE" , "open list:SYNOPSYS ARC ARCHITECTURE" , "open list:ARM/STI ARCHITECTURE" , "moderated list:BROADCOM BCM2835 ARM ARCHITECTURE" , "moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES" , "moderated list:H8/300 ARCHITECTURE" , "open list:ARM/Amlogic Meson SoC support" , "moderated list:ARM/Mediatek SoC support" , "open list:ARM/Rockchip SoC support" , "open list:TEGRA ARCHITECTURE SUPPORT" , "moderated list:ARM/OXNAS platform support" From: Neil Armstrong Organization: Baylibre Message-ID: <4ccb7cac-1663-792a-7912-d9ee803c7e2b@baylibre.com> Date: Mon, 29 May 2017 10:00:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1495879129-28109-2-git-send-email-daniel.lezcano@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 58060 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: narmstrong@baylibre.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On 05/27/2017 11:58 AM, Daniel Lezcano wrote: > The CLOCKSOUCE_OF_DECLARE macro is used widely for the timers to declare the > clocksource at early stage. However, this macro is also used to initialize > the clockevent if any, or the clockevent only. > > It was originally suggested to declare another macro to initialize a > clockevent, so in order to separate the two entities even they belong to the > same IP. This was not accepted because of the impact on the DT where splitting > a clocksource/clockevent definition does not make sense as it is a Linux > concept not a hardware description. > > On the other side, the clocksource has not interrupt declared while the > clockevent has, so it is easy from the driver to know if the description is > for a clockevent or a clocksource, IOW it could be implemented at the driver > level. > > So instead of dealing with a named clocksource macro, let's use a more generic > one: TIMER_OF_DECLARE. > > The patch has not functional changes. > > Signed-off-by: Daniel Lezcano > --- > arch/arm/kernel/smp_twd.c | 6 +++--- > arch/microblaze/kernel/timer.c | 2 +- > arch/mips/ralink/cevt-rt3352.c | 2 +- > arch/nios2/kernel/time.c | 2 +- > drivers/clocksource/arc_timer.c | 6 +++--- > drivers/clocksource/arm_arch_timer.c | 6 +++--- > drivers/clocksource/arm_global_timer.c | 2 +- > drivers/clocksource/armv7m_systick.c | 2 +- > drivers/clocksource/asm9260_timer.c | 2 +- > drivers/clocksource/bcm2835_timer.c | 2 +- > drivers/clocksource/bcm_kona_timer.c | 4 ++-- > drivers/clocksource/cadence_ttc_timer.c | 2 +- > drivers/clocksource/clksrc-dbx500-prcmu.c | 2 +- > drivers/clocksource/clksrc_st_lpc.c | 2 +- > drivers/clocksource/clps711x-timer.c | 2 +- > drivers/clocksource/dw_apb_timer_of.c | 8 ++++---- > drivers/clocksource/exynos_mct.c | 4 ++-- > drivers/clocksource/fsl_ftm_timer.c | 2 +- > drivers/clocksource/h8300_timer16.c | 2 +- > drivers/clocksource/h8300_timer8.c | 2 +- > drivers/clocksource/h8300_tpu.c | 2 +- > drivers/clocksource/jcore-pit.c | 2 +- > drivers/clocksource/meson6_timer.c | 2 +- > drivers/clocksource/mips-gic-timer.c | 2 +- > drivers/clocksource/mps2-timer.c | 2 +- > drivers/clocksource/mtk_timer.c | 2 +- > drivers/clocksource/mxs_timer.c | 2 +- > drivers/clocksource/nomadik-mtu.c | 2 +- > drivers/clocksource/pxa_timer.c | 2 +- > drivers/clocksource/qcom-timer.c | 4 ++-- > drivers/clocksource/renesas-ostm.c | 2 +- > drivers/clocksource/rockchip_timer.c | 4 ++-- > drivers/clocksource/samsung_pwm_timer.c | 8 ++++---- > drivers/clocksource/sun4i_timer.c | 2 +- > drivers/clocksource/tango_xtal.c | 2 +- > drivers/clocksource/tegra20_timer.c | 4 ++-- > drivers/clocksource/time-armada-370-xp.c | 6 +++--- > drivers/clocksource/time-efm32.c | 4 ++-- > drivers/clocksource/time-lpc32xx.c | 2 +- > drivers/clocksource/time-orion.c | 2 +- > drivers/clocksource/time-pistachio.c | 2 +- > drivers/clocksource/timer-atlas7.c | 2 +- > drivers/clocksource/timer-atmel-pit.c | 2 +- > drivers/clocksource/timer-atmel-st.c | 2 +- > drivers/clocksource/timer-digicolor.c | 2 +- > drivers/clocksource/timer-fttmr010.c | 10 +++++----- > drivers/clocksource/timer-imx-gpt.c | 24 ++++++++++++------------ > drivers/clocksource/timer-integrator-ap.c | 2 +- > drivers/clocksource/timer-keystone.c | 2 +- > drivers/clocksource/timer-nps.c | 6 +++--- > drivers/clocksource/timer-oxnas-rps.c | 4 ++-- > drivers/clocksource/timer-prima2.c | 2 +- > drivers/clocksource/timer-sp804.c | 4 ++-- > drivers/clocksource/timer-stm32.c | 2 +- > drivers/clocksource/timer-sun5i.c | 4 ++-- > drivers/clocksource/timer-ti-32k.c | 2 +- > drivers/clocksource/timer-u300.c | 2 +- > drivers/clocksource/versatile.c | 4 ++-- > drivers/clocksource/vf_pit_timer.c | 2 +- > drivers/clocksource/vt8500_timer.c | 2 +- > drivers/clocksource/zevio-timer.c | 2 +- > include/linux/clocksource.h | 2 +- > 62 files changed, 103 insertions(+), 103 deletions(-) > [...] > diff --git a/drivers/clocksource/timer-oxnas-rps.c b/drivers/clocksource/timer-oxnas-rps.c > index d630bf4..eed6fef 100644 > --- a/drivers/clocksource/timer-oxnas-rps.c > +++ b/drivers/clocksource/timer-oxnas-rps.c > @@ -293,7 +293,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np) > return ret; > } > > -CLOCKSOURCE_OF_DECLARE(ox810se_rps, > +TIMER_OF_DECLARE(ox810se_rps, > "oxsemi,ox810se-rps-timer", oxnas_rps_timer_init); > -CLOCKSOURCE_OF_DECLARE(ox820_rps, > +TIMER_OF_DECLARE(ox820_rps, > "oxsemi,ox820se-rps-timer", oxnas_rps_timer_init); [...] For the timer-oxnas-rps driver, Acked-by: Neil Armstrong Thanks for the rework, Neil From mboxrd@z Thu Jan 1 00:00:00 1970 From: narmstrong@baylibre.com (Neil Armstrong) Date: Mon, 29 May 2017 10:00:46 +0200 Subject: [PATCH 2/7] clocksource: Rename CLOCKSOURCE_OF_DECLARE In-Reply-To: <1495879129-28109-2-git-send-email-daniel.lezcano@linaro.org> References: <1495879129-28109-1-git-send-email-daniel.lezcano@linaro.org> <1495879129-28109-2-git-send-email-daniel.lezcano@linaro.org> List-ID: Message-ID: <4ccb7cac-1663-792a-7912-d9ee803c7e2b@baylibre.com> To: linux-snps-arc@lists.infradead.org On 05/27/2017 11:58 AM, Daniel Lezcano wrote: > The CLOCKSOUCE_OF_DECLARE macro is used widely for the timers to declare the > clocksource at early stage. However, this macro is also used to initialize > the clockevent if any, or the clockevent only. > > It was originally suggested to declare another macro to initialize a > clockevent, so in order to separate the two entities even they belong to the > same IP. This was not accepted because of the impact on the DT where splitting > a clocksource/clockevent definition does not make sense as it is a Linux > concept not a hardware description. > > On the other side, the clocksource has not interrupt declared while the > clockevent has, so it is easy from the driver to know if the description is > for a clockevent or a clocksource, IOW it could be implemented at the driver > level. > > So instead of dealing with a named clocksource macro, let's use a more generic > one: TIMER_OF_DECLARE. > > The patch has not functional changes. > > Signed-off-by: Daniel Lezcano > --- > arch/arm/kernel/smp_twd.c | 6 +++--- > arch/microblaze/kernel/timer.c | 2 +- > arch/mips/ralink/cevt-rt3352.c | 2 +- > arch/nios2/kernel/time.c | 2 +- > drivers/clocksource/arc_timer.c | 6 +++--- > drivers/clocksource/arm_arch_timer.c | 6 +++--- > drivers/clocksource/arm_global_timer.c | 2 +- > drivers/clocksource/armv7m_systick.c | 2 +- > drivers/clocksource/asm9260_timer.c | 2 +- > drivers/clocksource/bcm2835_timer.c | 2 +- > drivers/clocksource/bcm_kona_timer.c | 4 ++-- > drivers/clocksource/cadence_ttc_timer.c | 2 +- > drivers/clocksource/clksrc-dbx500-prcmu.c | 2 +- > drivers/clocksource/clksrc_st_lpc.c | 2 +- > drivers/clocksource/clps711x-timer.c | 2 +- > drivers/clocksource/dw_apb_timer_of.c | 8 ++++---- > drivers/clocksource/exynos_mct.c | 4 ++-- > drivers/clocksource/fsl_ftm_timer.c | 2 +- > drivers/clocksource/h8300_timer16.c | 2 +- > drivers/clocksource/h8300_timer8.c | 2 +- > drivers/clocksource/h8300_tpu.c | 2 +- > drivers/clocksource/jcore-pit.c | 2 +- > drivers/clocksource/meson6_timer.c | 2 +- > drivers/clocksource/mips-gic-timer.c | 2 +- > drivers/clocksource/mps2-timer.c | 2 +- > drivers/clocksource/mtk_timer.c | 2 +- > drivers/clocksource/mxs_timer.c | 2 +- > drivers/clocksource/nomadik-mtu.c | 2 +- > drivers/clocksource/pxa_timer.c | 2 +- > drivers/clocksource/qcom-timer.c | 4 ++-- > drivers/clocksource/renesas-ostm.c | 2 +- > drivers/clocksource/rockchip_timer.c | 4 ++-- > drivers/clocksource/samsung_pwm_timer.c | 8 ++++---- > drivers/clocksource/sun4i_timer.c | 2 +- > drivers/clocksource/tango_xtal.c | 2 +- > drivers/clocksource/tegra20_timer.c | 4 ++-- > drivers/clocksource/time-armada-370-xp.c | 6 +++--- > drivers/clocksource/time-efm32.c | 4 ++-- > drivers/clocksource/time-lpc32xx.c | 2 +- > drivers/clocksource/time-orion.c | 2 +- > drivers/clocksource/time-pistachio.c | 2 +- > drivers/clocksource/timer-atlas7.c | 2 +- > drivers/clocksource/timer-atmel-pit.c | 2 +- > drivers/clocksource/timer-atmel-st.c | 2 +- > drivers/clocksource/timer-digicolor.c | 2 +- > drivers/clocksource/timer-fttmr010.c | 10 +++++----- > drivers/clocksource/timer-imx-gpt.c | 24 ++++++++++++------------ > drivers/clocksource/timer-integrator-ap.c | 2 +- > drivers/clocksource/timer-keystone.c | 2 +- > drivers/clocksource/timer-nps.c | 6 +++--- > drivers/clocksource/timer-oxnas-rps.c | 4 ++-- > drivers/clocksource/timer-prima2.c | 2 +- > drivers/clocksource/timer-sp804.c | 4 ++-- > drivers/clocksource/timer-stm32.c | 2 +- > drivers/clocksource/timer-sun5i.c | 4 ++-- > drivers/clocksource/timer-ti-32k.c | 2 +- > drivers/clocksource/timer-u300.c | 2 +- > drivers/clocksource/versatile.c | 4 ++-- > drivers/clocksource/vf_pit_timer.c | 2 +- > drivers/clocksource/vt8500_timer.c | 2 +- > drivers/clocksource/zevio-timer.c | 2 +- > include/linux/clocksource.h | 2 +- > 62 files changed, 103 insertions(+), 103 deletions(-) > [...] > diff --git a/drivers/clocksource/timer-oxnas-rps.c b/drivers/clocksource/timer-oxnas-rps.c > index d630bf4..eed6fef 100644 > --- a/drivers/clocksource/timer-oxnas-rps.c > +++ b/drivers/clocksource/timer-oxnas-rps.c > @@ -293,7 +293,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np) > return ret; > } > > -CLOCKSOURCE_OF_DECLARE(ox810se_rps, > +TIMER_OF_DECLARE(ox810se_rps, > "oxsemi,ox810se-rps-timer", oxnas_rps_timer_init); > -CLOCKSOURCE_OF_DECLARE(ox820_rps, > +TIMER_OF_DECLARE(ox820_rps, > "oxsemi,ox820se-rps-timer", oxnas_rps_timer_init); [...] For the timer-oxnas-rps driver, Acked-by: Neil Armstrong Thanks for the rework, Neil From mboxrd@z Thu Jan 1 00:00:00 1970 From: narmstrong@baylibre.com (Neil Armstrong) Date: Mon, 29 May 2017 10:00:46 +0200 Subject: [PATCH 2/7] clocksource: Rename CLOCKSOURCE_OF_DECLARE In-Reply-To: <1495879129-28109-2-git-send-email-daniel.lezcano@linaro.org> References: <1495879129-28109-1-git-send-email-daniel.lezcano@linaro.org> <1495879129-28109-2-git-send-email-daniel.lezcano@linaro.org> Message-ID: <4ccb7cac-1663-792a-7912-d9ee803c7e2b@baylibre.com> To: linus-amlogic@lists.infradead.org List-Id: linus-amlogic.lists.infradead.org On 05/27/2017 11:58 AM, Daniel Lezcano wrote: > The CLOCKSOUCE_OF_DECLARE macro is used widely for the timers to declare the > clocksource at early stage. However, this macro is also used to initialize > the clockevent if any, or the clockevent only. > > It was originally suggested to declare another macro to initialize a > clockevent, so in order to separate the two entities even they belong to the > same IP. This was not accepted because of the impact on the DT where splitting > a clocksource/clockevent definition does not make sense as it is a Linux > concept not a hardware description. > > On the other side, the clocksource has not interrupt declared while the > clockevent has, so it is easy from the driver to know if the description is > for a clockevent or a clocksource, IOW it could be implemented at the driver > level. > > So instead of dealing with a named clocksource macro, let's use a more generic > one: TIMER_OF_DECLARE. > > The patch has not functional changes. > > Signed-off-by: Daniel Lezcano > --- > arch/arm/kernel/smp_twd.c | 6 +++--- > arch/microblaze/kernel/timer.c | 2 +- > arch/mips/ralink/cevt-rt3352.c | 2 +- > arch/nios2/kernel/time.c | 2 +- > drivers/clocksource/arc_timer.c | 6 +++--- > drivers/clocksource/arm_arch_timer.c | 6 +++--- > drivers/clocksource/arm_global_timer.c | 2 +- > drivers/clocksource/armv7m_systick.c | 2 +- > drivers/clocksource/asm9260_timer.c | 2 +- > drivers/clocksource/bcm2835_timer.c | 2 +- > drivers/clocksource/bcm_kona_timer.c | 4 ++-- > drivers/clocksource/cadence_ttc_timer.c | 2 +- > drivers/clocksource/clksrc-dbx500-prcmu.c | 2 +- > drivers/clocksource/clksrc_st_lpc.c | 2 +- > drivers/clocksource/clps711x-timer.c | 2 +- > drivers/clocksource/dw_apb_timer_of.c | 8 ++++---- > drivers/clocksource/exynos_mct.c | 4 ++-- > drivers/clocksource/fsl_ftm_timer.c | 2 +- > drivers/clocksource/h8300_timer16.c | 2 +- > drivers/clocksource/h8300_timer8.c | 2 +- > drivers/clocksource/h8300_tpu.c | 2 +- > drivers/clocksource/jcore-pit.c | 2 +- > drivers/clocksource/meson6_timer.c | 2 +- > drivers/clocksource/mips-gic-timer.c | 2 +- > drivers/clocksource/mps2-timer.c | 2 +- > drivers/clocksource/mtk_timer.c | 2 +- > drivers/clocksource/mxs_timer.c | 2 +- > drivers/clocksource/nomadik-mtu.c | 2 +- > drivers/clocksource/pxa_timer.c | 2 +- > drivers/clocksource/qcom-timer.c | 4 ++-- > drivers/clocksource/renesas-ostm.c | 2 +- > drivers/clocksource/rockchip_timer.c | 4 ++-- > drivers/clocksource/samsung_pwm_timer.c | 8 ++++---- > drivers/clocksource/sun4i_timer.c | 2 +- > drivers/clocksource/tango_xtal.c | 2 +- > drivers/clocksource/tegra20_timer.c | 4 ++-- > drivers/clocksource/time-armada-370-xp.c | 6 +++--- > drivers/clocksource/time-efm32.c | 4 ++-- > drivers/clocksource/time-lpc32xx.c | 2 +- > drivers/clocksource/time-orion.c | 2 +- > drivers/clocksource/time-pistachio.c | 2 +- > drivers/clocksource/timer-atlas7.c | 2 +- > drivers/clocksource/timer-atmel-pit.c | 2 +- > drivers/clocksource/timer-atmel-st.c | 2 +- > drivers/clocksource/timer-digicolor.c | 2 +- > drivers/clocksource/timer-fttmr010.c | 10 +++++----- > drivers/clocksource/timer-imx-gpt.c | 24 ++++++++++++------------ > drivers/clocksource/timer-integrator-ap.c | 2 +- > drivers/clocksource/timer-keystone.c | 2 +- > drivers/clocksource/timer-nps.c | 6 +++--- > drivers/clocksource/timer-oxnas-rps.c | 4 ++-- > drivers/clocksource/timer-prima2.c | 2 +- > drivers/clocksource/timer-sp804.c | 4 ++-- > drivers/clocksource/timer-stm32.c | 2 +- > drivers/clocksource/timer-sun5i.c | 4 ++-- > drivers/clocksource/timer-ti-32k.c | 2 +- > drivers/clocksource/timer-u300.c | 2 +- > drivers/clocksource/versatile.c | 4 ++-- > drivers/clocksource/vf_pit_timer.c | 2 +- > drivers/clocksource/vt8500_timer.c | 2 +- > drivers/clocksource/zevio-timer.c | 2 +- > include/linux/clocksource.h | 2 +- > 62 files changed, 103 insertions(+), 103 deletions(-) > [...] > diff --git a/drivers/clocksource/timer-oxnas-rps.c b/drivers/clocksource/timer-oxnas-rps.c > index d630bf4..eed6fef 100644 > --- a/drivers/clocksource/timer-oxnas-rps.c > +++ b/drivers/clocksource/timer-oxnas-rps.c > @@ -293,7 +293,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np) > return ret; > } > > -CLOCKSOURCE_OF_DECLARE(ox810se_rps, > +TIMER_OF_DECLARE(ox810se_rps, > "oxsemi,ox810se-rps-timer", oxnas_rps_timer_init); > -CLOCKSOURCE_OF_DECLARE(ox820_rps, > +TIMER_OF_DECLARE(ox820_rps, > "oxsemi,ox820se-rps-timer", oxnas_rps_timer_init); [...] For the timer-oxnas-rps driver, Acked-by: Neil Armstrong Thanks for the rework, Neil