Skip to content

Commit

Permalink
clocksource/drivers/timer-atmel-pit: Enable mck clock
Browse files Browse the repository at this point in the history
mck is needed to get the PIT working. Explicitly prepare_enable it instead
of assuming it is enabled.

This solves an issue where the system is freezing when the ETM/ETB drivers
are enabled.

Reported-by: Olivier Schonken <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
  • Loading branch information
alexandrebelloni authored and dlezcano committed Aug 26, 2016
1 parent aa8c0f1 commit 699e36e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/clocksource/timer-atmel-pit.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ static int __init at91sam926x_pit_dt_init(struct device_node *node)
return PTR_ERR(data->mck);
}

ret = clk_prepare_enable(data->mck);
if (ret) {
pr_err("Unable to enable mck\n");
return ret;
}

/* Get the interrupts property */
data->irq = irq_of_parse_and_map(node, 0);
if (!data->irq) {
Expand Down

0 comments on commit 699e36e

Please sign in to comment.