2 * Device Tree support for Rockchip FPGA
4 * Copyright (C) 2014 ROCKCHIP, Inc.
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.
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.
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>
29 static struct map_desc rk3288_io_desc[] __initdata = {
31 .virtual = (unsigned long) RK_DEBUG_UART_VIRT,
32 .pfn = __phys_to_pfn(RK3288_UART_DBG_PHYS),
33 .length = RK3288_UART_SIZE,
38 static void __init rk3288_fpga_map_io(void)
40 iotable_init(rk3288_io_desc, ARRAY_SIZE(rk3288_io_desc));
43 rockchip_soc_id = ROCKCHIP_SOC_RK3288;
46 static void __init rk3288_fpga_init_timer(void)
48 clocksource_of_init();
51 static const char * const rk3288_fpga_compat[] __initconst = {
52 "rockchip,rk3288-fpga",
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,