aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/lluart.c
blob: eb74a41241685c95020c9ecd1b578c0fcf30c765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * Copyright 2011 Freescale Semiconductor, Inc.
 * Copyright 2011 Linaro Ltd.
 *
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 */

#include <linux/init.h>
#include <linux/kernel.h>
#include <asm/page.h>
#include <asm/sizes.h>
#include <asm/mach/map.h>
#include <mach/hardware.h>

static struct map_desc imx_lluart_desc[] = {
#ifdef CONFIG_DEBUG_IMX6Q_UART
	{
		.virtual	= MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR),
		.pfn		= __phys_to_pfn(MX6Q_UART4_BASE_ADDR),
		.length		= MX6Q_UART_SIZE,
		.type		= MT_DEVICE,
	},
	{
		.virtual	= MX6Q_IO_P2V(MX6Q_UART2_BASE_ADDR),
		.pfn		= __phys_to_pfn(MX6Q_UART2_BASE_ADDR),
		.length		= MX6Q_UART_SIZE,
		.type		= MT_DEVICE,
	},

#endif
};

void __init imx_lluart_map_io(void)
{
	if (ARRAY_SIZE(imx_lluart_desc))
		iotable_init(imx_lluart_desc, ARRAY_SIZE(imx_lluart_desc));
}