blob: 5f1510363ee76f469358be2c86a664eed70f9308 [file] [log] [blame]
Shawn Guobac89d72011-10-02 15:09:11 +08001/*
2 * Copyright 2011 Freescale Semiconductor, Inc.
3 * Copyright 2011 Linaro Ltd.
4 *
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:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13#include <linux/init.h>
14#include <asm/page.h>
15#include <asm/sizes.h>
16#include <asm/mach/map.h>
Shawn Guo50f2de62012-09-14 14:14:45 +080017
18#include "hardware.h"
Shawn Guobac89d72011-10-02 15:09:11 +080019
20static struct map_desc imx_lluart_desc = {
Dirk Behme785d7fa2012-04-27 10:15:45 +020021#ifdef CONFIG_DEBUG_IMX6Q_UART2
22 .virtual = MX6Q_IO_P2V(MX6Q_UART2_BASE_ADDR),
23 .pfn = __phys_to_pfn(MX6Q_UART2_BASE_ADDR),
24 .length = MX6Q_UART2_SIZE,
25 .type = MT_DEVICE,
26#endif
Dirk Behmecdaf29c2012-02-06 13:19:19 +010027#ifdef CONFIG_DEBUG_IMX6Q_UART4
Shawn Guobac89d72011-10-02 15:09:11 +080028 .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR),
29 .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR),
30 .length = MX6Q_UART4_SIZE,
31 .type = MT_DEVICE,
32#endif
33};
34
35void __init imx_lluart_map_io(void)
36{
37 if (imx_lluart_desc.virtual)
38 iotable_init(&imx_lluart_desc, 1);
39}