cgroup: add seq_file forward declaration for struct cftype
[deliverable/linux.git] / arch / arm / mach-rockchip / rockchip.c
CommitLineData
d63dc051
HS
1/*
2 * Device Tree support for Rockchip SoCs
3 *
4 * Copyright (c) 2013 MundoReader S.L.
5 * Author: Heiko Stuebner <heiko@sntech.de>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/of_platform.h>
21#include <linux/irqchip.h>
c9b75d51
HS
22#include <linux/clk-provider.h>
23#include <linux/clocksource.h>
24#include <linux/mfd/syscon.h>
25#include <linux/regmap.h>
d63dc051
HS
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/hardware/cache-l2x0.h>
a7a2b311 29#include "core.h"
9c1ec8e1 30#include "pm.h"
d63dc051 31
c9b75d51
HS
32#define RK3288_GRF_SOC_CON0 0x244
33
34static void __init rockchip_timer_init(void)
35{
36 if (of_machine_is_compatible("rockchip,rk3288")) {
37 struct regmap *grf;
38
39 /*
40 * Disable auto jtag/sdmmc switching that causes issues
41 * with the mmc controllers making them unreliable
42 */
43 grf = syscon_regmap_lookup_by_compatible("rockchip,rk3288-grf");
44 if (!IS_ERR(grf))
45 regmap_write(grf, RK3288_GRF_SOC_CON0, 0x10000000);
46 else
47 pr_err("rockchip: could not get grf syscon\n");
48 }
49
50 of_clk_init(NULL);
51 clocksource_of_init();
52}
53
47b06fc2
HS
54static void __init rockchip_dt_init(void)
55{
9c1ec8e1 56 rockchip_suspend_init();
47b06fc2 57 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
3eb79a5a 58 platform_device_register_simple("cpufreq-dt", 0, NULL, 0);
47b06fc2
HS
59}
60
d63dc051
HS
61static const char * const rockchip_board_dt_compat[] = {
62 "rockchip,rk2928",
63 "rockchip,rk3066a",
64 "rockchip,rk3066b",
65 "rockchip,rk3188",
7a1917ab 66 "rockchip,rk3288",
d63dc051
HS
67 NULL,
68};
69
8c421241 70DT_MACHINE_START(ROCKCHIP_DT, "Rockchip (Device Tree)")
2a2d2fff
RK
71 .l2c_aux_val = 0,
72 .l2c_aux_mask = ~0,
c9b75d51 73 .init_time = rockchip_timer_init,
d63dc051 74 .dt_compat = rockchip_board_dt_compat,
47b06fc2 75 .init_machine = rockchip_dt_init,
d63dc051 76MACHINE_END
This page took 0.124201 seconds and 5 git commands to generate.