ARM: dts: rockchip: enable vpu for rk3288-miniarm
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-rockchip / fpga.c
1 /*
2  * Device Tree support for Rockchip FPGA
3  *
4  * Copyright (C) 2014 ROCKCHIP, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  */
16
17 #include <linux/clocksource.h>
18 #include <linux/init.h>
19 #include <linux/irqchip.h>
20 #include <linux/kernel.h>
21 #include <linux/of_address.h>
22 #include <linux/of_platform.h>
23 #include <linux/rockchip/common.h>
24 #include <linux/rockchip/cpu.h>
25 #include <linux/rockchip/iomap.h>
26 #include <asm/mach/arch.h>
27 #include <asm/mach/map.h>
28
29 static struct map_desc rk3288_io_desc[] __initdata = {
30         {
31                 .virtual        = (unsigned long) RK_DEBUG_UART_VIRT,
32                 .pfn            = __phys_to_pfn(RK3288_UART_DBG_PHYS),
33                 .length         = RK3288_UART_SIZE,
34                 .type           = MT_DEVICE,
35         },
36 };
37
38 static void __init rk3288_fpga_map_io(void)
39 {
40         iotable_init(rk3288_io_desc, ARRAY_SIZE(rk3288_io_desc));
41         debug_ll_io_init();
42
43         rockchip_soc_id = ROCKCHIP_SOC_RK3288;
44 }
45
46 static void __init rk3288_fpga_init_timer(void)
47 {
48         clocksource_of_init();
49 }
50
51 static const char * const rk3288_fpga_compat[] __initconst = {
52         "rockchip,rk3288-fpga",
53         NULL,
54 };
55
56 DT_MACHINE_START(RK3288_FPGA_DT, "Rockchip RK3288 FPGA (Flattened Device Tree)")
57         .map_io         = rk3288_fpga_map_io,
58         .init_time      = rk3288_fpga_init_timer,
59         .dt_compat      = rk3288_fpga_compat,
60 MACHINE_END