linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/imx-tpm: Add support for ARM64
@ 2020-04-01  4:27 Anson Huang
  2020-04-09 14:25 ` Daniel Lezcano
  2020-06-01 13:11 ` [tip: timers/core] " tip-bot2 for Anson Huang
  0 siblings, 2 replies; 3+ messages in thread
From: Anson Huang @ 2020-04-01  4:27 UTC (permalink / raw)
  To: daniel.lezcano, tglx, shawnguo, s.hauer, kernel, festevam,
	linux-kernel, linux-arm-kernel
  Cc: Linux-imx

Allows building and compile-testing the i.MX TPM driver also
for ARM64. The delay_timer is only supported on ARMv7.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/clocksource/timer-imx-tpm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/timer-imx-tpm.c b/drivers/clocksource/timer-imx-tpm.c
index 6334a35..2cdc077 100644
--- a/drivers/clocksource/timer-imx-tpm.c
+++ b/drivers/clocksource/timer-imx-tpm.c
@@ -61,17 +61,19 @@ static inline void tpm_irq_acknowledge(void)
 	writel(TPM_STATUS_CH0F, timer_base + TPM_STATUS);
 }
 
-static struct delay_timer tpm_delay_timer;
-
 static inline unsigned long tpm_read_counter(void)
 {
 	return readl(timer_base + TPM_CNT);
 }
 
+#if defined(CONFIG_ARM)
+static struct delay_timer tpm_delay_timer;
+
 static unsigned long tpm_read_current_timer(void)
 {
 	return tpm_read_counter();
 }
+#endif
 
 static u64 notrace tpm_read_sched_clock(void)
 {
@@ -144,9 +146,11 @@ static struct timer_of to_tpm = {
 
 static int __init tpm_clocksource_init(void)
 {
+#if defined(CONFIG_ARM)
 	tpm_delay_timer.read_current_timer = &tpm_read_current_timer;
 	tpm_delay_timer.freq = timer_of_rate(&to_tpm) >> 3;
 	register_current_timer_delay(&tpm_delay_timer);
+#endif
 
 	sched_clock_register(tpm_read_sched_clock, counter_width,
 			     timer_of_rate(&to_tpm) >> 3);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clocksource/drivers/imx-tpm: Add support for ARM64
  2020-04-01  4:27 [PATCH] clocksource/drivers/imx-tpm: Add support for ARM64 Anson Huang
@ 2020-04-09 14:25 ` Daniel Lezcano
  2020-06-01 13:11 ` [tip: timers/core] " tip-bot2 for Anson Huang
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2020-04-09 14:25 UTC (permalink / raw)
  To: Anson Huang, tglx, shawnguo, s.hauer, kernel, festevam,
	linux-kernel, linux-arm-kernel
  Cc: Linux-imx

On 01/04/2020 06:27, Anson Huang wrote:
> Allows building and compile-testing the i.MX TPM driver also
> for ARM64. The delay_timer is only supported on ARMv7.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---

Applied, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: timers/core] clocksource/drivers/imx-tpm: Add support for ARM64
  2020-04-01  4:27 [PATCH] clocksource/drivers/imx-tpm: Add support for ARM64 Anson Huang
  2020-04-09 14:25 ` Daniel Lezcano
@ 2020-06-01 13:11 ` tip-bot2 for Anson Huang
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Anson Huang @ 2020-06-01 13:11 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Anson Huang, Daniel Lezcano, x86, LKML

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     ac161f57b66dcf14b3339b1c5857c08a9ad4d833
Gitweb:        https://git.kernel.org/tip/ac161f57b66dcf14b3339b1c5857c08a9ad4d833
Author:        Anson Huang <Anson.Huang@nxp.com>
AuthorDate:    Wed, 01 Apr 2020 12:27:02 +08:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 09 Apr 2020 16:24:50 +02:00

clocksource/drivers/imx-tpm: Add support for ARM64

Allows building and compile-testing the i.MX TPM driver also
for ARM64. The delay_timer is only supported on ARMv7.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/1585715222-24489-1-git-send-email-Anson.Huang@nxp.com
---
 drivers/clocksource/timer-imx-tpm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/timer-imx-tpm.c b/drivers/clocksource/timer-imx-tpm.c
index 6334a35..2cdc077 100644
--- a/drivers/clocksource/timer-imx-tpm.c
+++ b/drivers/clocksource/timer-imx-tpm.c
@@ -61,17 +61,19 @@ static inline void tpm_irq_acknowledge(void)
 	writel(TPM_STATUS_CH0F, timer_base + TPM_STATUS);
 }
 
-static struct delay_timer tpm_delay_timer;
-
 static inline unsigned long tpm_read_counter(void)
 {
 	return readl(timer_base + TPM_CNT);
 }
 
+#if defined(CONFIG_ARM)
+static struct delay_timer tpm_delay_timer;
+
 static unsigned long tpm_read_current_timer(void)
 {
 	return tpm_read_counter();
 }
+#endif
 
 static u64 notrace tpm_read_sched_clock(void)
 {
@@ -144,9 +146,11 @@ static struct timer_of to_tpm = {
 
 static int __init tpm_clocksource_init(void)
 {
+#if defined(CONFIG_ARM)
 	tpm_delay_timer.read_current_timer = &tpm_read_current_timer;
 	tpm_delay_timer.freq = timer_of_rate(&to_tpm) >> 3;
 	register_current_timer_delay(&tpm_delay_timer);
+#endif
 
 	sched_clock_register(tpm_read_sched_clock, counter_width,
 			     timer_of_rate(&to_tpm) >> 3);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-01 13:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01  4:27 [PATCH] clocksource/drivers/imx-tpm: Add support for ARM64 Anson Huang
2020-04-09 14:25 ` Daniel Lezcano
2020-06-01 13:11 ` [tip: timers/core] " tip-bot2 for Anson Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).