485364729813ead6fe77b0106ba75c818cca0d2a
[openwrt.git] / target / linux / sunxi / patches-3.12 / 142-register-a31-reset.patch
1 From ba9cb86c174603252ee5b5f2b277dab46a99cf02 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime.ripard@free-electrons.com>
3 Date: Sat, 5 Oct 2013 14:53:48 +0200
4 Subject: [PATCH] ARM: sunxi: Register the A31 reset IP in init_time
5
6 The A31 has a reset IP that maintains a few other IPs in reset by
7 default. Among these IPs are the UARTs, and most notably the timers. We
8 thus need to register the reset driver before initializing the timers so
9 that the reset timer can use the reset framework.
10
11 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
12 ---
13  arch/arm/mach-sunxi/sunxi.c | 10 +++++++++-
14  1 file changed, 9 insertions(+), 1 deletion(-)
15
16 diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
17 index f184f6c..2e79736 100644
18 --- a/arch/arm/mach-sunxi/sunxi.c
19 +++ b/arch/arm/mach-sunxi/sunxi.c
20 @@ -142,9 +142,17 @@ static void __init sunxi_dt_init(void)
21         NULL,
22  };
23  
24 +extern void __init sun6i_reset_init(void);
25 +static void __init sun6i_timer_init(void)
26 +{
27 +       sunxi_init_clocks();
28 +       sun6i_reset_init();
29 +       clocksource_of_init();
30 +}
31 +
32  DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
33         .init_machine   = sunxi_dt_init,
34 -       .init_time      = sunxi_timer_init,
35 +       .init_time      = sun6i_timer_init,
36         .dt_compat      = sun6i_board_dt_compat,
37         .restart        = sun6i_restart,
38  MACHINE_END
39 -- 
40 1.8.4
41