3 * Copyright (C) 2013 ROCKCHIP, Inc.
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
16 #include <linux/kernel.h>
17 #include <linux/init.h>
20 #include <asm/mach/map.h>
21 #include <mach/debug_uart.h>
23 #define RK319X_DEVICE(name) { \
24 .virtual = (unsigned long) RK319X_##name##_BASE, \
25 .pfn = __phys_to_pfn(RK319X_##name##_PHYS), \
26 .length = RK319X_##name##_SIZE, \
30 static struct map_desc rk319x_io_desc[] __initdata = {
33 RK319X_DEVICE(CPU_AXI_BUS),
34 #if CONFIG_RK_DEBUG_UART == 0
36 #elif CONFIG_RK_DEBUG_UART == 1
38 #elif CONFIG_RK_DEBUG_UART == 2
40 #elif CONFIG_RK_DEBUG_UART == 3
44 RK319X_DEVICE(BB_GRF),
55 RK319X_DEVICE(DDR_PCTL),
56 RK319X_DEVICE(DDR_PUBL),
59 void __init rk30_map_common_io(void)
61 iotable_init(rk319x_io_desc, ARRAY_SIZE(rk319x_io_desc));