2 * Copyright 2011 Freescale Semiconductor, Inc.
3 * Copyright 2011 Linaro Ltd.
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
13 #include <linux/init.h>
15 #include <asm/sizes.h>
16 #include <asm/mach/map.h>
20 #define IMX6Q_UART1_BASE_ADDR 0x02020000
21 #define IMX6Q_UART2_BASE_ADDR 0x021e8000
22 #define IMX6Q_UART3_BASE_ADDR 0x021ec000
23 #define IMX6Q_UART4_BASE_ADDR 0x021f0000
24 #define IMX6Q_UART5_BASE_ADDR 0x021f4000
27 * IMX6Q_UART_BASE_ADDR is put in the middle to force the expansion
28 * of IMX6Q_UART##n##_BASE_ADDR.
30 #define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR
31 #define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n)
32 #define IMX6Q_DEBUG_UART_BASE IMX6Q_UART_BASE(CONFIG_DEBUG_IMX6Q_UART_PORT)
34 static struct map_desc imx_lluart_desc
= {
35 #ifdef CONFIG_DEBUG_IMX6Q_UART
36 .virtual = IMX_IO_P2V(IMX6Q_DEBUG_UART_BASE
),
37 .pfn
= __phys_to_pfn(IMX6Q_DEBUG_UART_BASE
),
43 void __init
imx_lluart_map_io(void)
45 if (imx_lluart_desc
.virtual)
46 iotable_init(&imx_lluart_desc
, 1);