packages: enable AP mode on r8188eu
[openwrt.git] / target / linux / sunxi / patches-3.13 / 107-sunxi-register-a31-reset.patch
1 From dae0e37c2df466f5eb6459d05f392e86b4236666 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 Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
13 ---
14  arch/arm/mach-sunxi/sunxi.c | 11 +++++++++++
15  1 file changed, 11 insertions(+)
16
17 --- a/arch/arm/mach-sunxi/sunxi.c
18 +++ b/arch/arm/mach-sunxi/sunxi.c
19 @@ -10,6 +10,8 @@
20   * warranty of any kind, whether express or implied.
21   */
22  
23 +#include <linux/clk-provider.h>
24 +#include <linux/clocksource.h>
25  #include <linux/delay.h>
26  #include <linux/kernel.h>
27  #include <linux/init.h>
28 @@ -132,8 +134,17 @@ static const char * const sun6i_board_dt
29         NULL,
30  };
31  
32 +extern void __init sun6i_reset_init(void);
33 +static void __init sun6i_timer_init(void)
34 +{
35 +       of_clk_init(NULL);
36 +       sun6i_reset_init();
37 +       clocksource_of_init();
38 +}
39 +
40  DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
41         .init_machine   = sunxi_dt_init,
42 +       .init_time      = sun6i_timer_init,
43         .dt_compat      = sun6i_board_dt_compat,
44         .restart        = sun6i_restart,
45  MACHINE_END