Skip to content

Commit 4f352d1

Browse files
Anson-Huangdlezcano
authored andcommitted
clocksource/drivers/timer-imx-tpm: Specify clock name for timer-of
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 <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 86fe57f commit 4f352d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/clocksource/timer-imx-tpm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ static struct timer_of to_tpm = {
139139
.handler = tpm_timer_interrupt,
140140
.flags = IRQF_TIMER | IRQF_IRQPOLL,
141141
},
142+
.of_clk = {
143+
.name = "per",
144+
},
142145
};
143146

144147
static int __init tpm_clocksource_init(void)

0 commit comments

Comments
 (0)