LKML Archive on lore.kernel.org
 help / Atom feed
* [PATCH] clocksource/drivers/timer-imx-tpm: Specify clock name for timer-of
@ 2018-12-07  6:05 Anson Huang
  2018-12-07  7:07 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Anson Huang @ 2018-12-07  6:05 UTC (permalink / raw)
  To: daniel.lezcano, tglx, linux-kernel; +Cc: dl-linux-imx

i.MX TPM needs "ipg" clock for register access and "per" clock for
timer function, the driver gets "ipg" clock by searching the clock
name, but timer-of initialization will get first clock in device
tree TPM node since no clock name specified in of_clk, that means
the "per" clock MUST be the first clock entry in device tree TPM
node, this patch specifies clock name for of_clk to avoid this
restriction, it makes TPM driver work properly with different sequence
of clock entries in device tree TPM node.

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

diff --git a/drivers/clocksource/timer-imx-tpm.c b/drivers/clocksource/timer-imx-tpm.c
index c3dd4d2..c1d52d5 100644
--- a/drivers/clocksource/timer-imx-tpm.c
+++ b/drivers/clocksource/timer-imx-tpm.c
@@ -139,6 +139,9 @@ static struct timer_of to_tpm = {
 		.handler		= tpm_timer_interrupt,
 		.flags			= IRQF_TIMER | IRQF_IRQPOLL,
 	},
+	.of_clk = {
+		.name = "per",
+	},
 };
 
 static int __init tpm_clocksource_init(void)
-- 
2.7.4


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

* Re: [PATCH] clocksource/drivers/timer-imx-tpm: Specify clock name for timer-of
  2018-12-07  6:05 [PATCH] clocksource/drivers/timer-imx-tpm: Specify clock name for timer-of Anson Huang
@ 2018-12-07  7:07 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2018-12-07  7:07 UTC (permalink / raw)
  To: Anson Huang, tglx, linux-kernel; +Cc: dl-linux-imx

On 07/12/2018 07:05, Anson Huang wrote:
> i.MX TPM needs "ipg" clock for register access and "per" clock for
> timer function, the driver gets "ipg" clock by searching the clock
> name, but timer-of initialization will get first clock in device
> tree TPM node since no clock name specified in of_clk, that means
> the "per" clock MUST be the first clock entry in device tree TPM
> node, this patch specifies clock name for of_clk to avoid this
> restriction, it makes TPM driver work properly with different sequence
> of clock entries in device tree TPM node.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---

Applied.

Thanks.

  -- Daniel


-- 
 <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] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07  6:05 [PATCH] clocksource/drivers/timer-imx-tpm: Specify clock name for timer-of Anson Huang
2018-12-07  7:07 ` Daniel Lezcano

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox