|
@@ -16,6 +16,7 @@
|
|
|
#include <linux/interrupt.h>
|
|
|
#include <linux/irq.h>
|
|
|
#include <linux/irqreturn.h>
|
|
|
+#include <linux/reset.h>
|
|
|
#include <linux/sched_clock.h>
|
|
|
#include <linux/of.h>
|
|
|
#include <linux/of_address.h>
|
|
@@ -143,6 +144,7 @@ static u64 sun5i_timer_sched_read(void)
|
|
|
|
|
|
static void __init sun5i_timer_init(struct device_node *node)
|
|
|
{
|
|
|
+ struct reset_control *rstc;
|
|
|
unsigned long rate;
|
|
|
struct clk *clk;
|
|
|
int ret, irq;
|
|
@@ -162,6 +164,10 @@ static void __init sun5i_timer_init(struct device_node *node)
|
|
|
clk_prepare_enable(clk);
|
|
|
rate = clk_get_rate(clk);
|
|
|
|
|
|
+ rstc = of_reset_control_get(node, NULL);
|
|
|
+ if (!IS_ERR(rstc))
|
|
|
+ reset_control_deassert(rstc);
|
|
|
+
|
|
|
writel(~0, timer_base + TIMER_INTVAL_LO_REG(1));
|
|
|
writel(TIMER_CTL_ENABLE | TIMER_CTL_RELOAD,
|
|
|
timer_base + TIMER_CTL_REG(1));
|