Skip to content

Commit

Permalink
clocksource/drivers/timer-imx-tpm: Specify clock name for timer-of
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
  • Loading branch information
Anson Huang authored and Daniel Lezcano committed Dec 18, 2018
1 parent 86fe57f commit 4f352d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/clocksource/timer-imx-tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4f352d1

Please sign in to comment.