Shawn Guo | bac89d7 | 2011-10-02 15:09:11 +0800 | [diff] [blame] | 1 | /* |
| 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> |
| 17 | #include <mach/hardware.h> |
| 18 | |
| 19 | static struct map_desc imx_lluart_desc = { |
Dirk Behme | 785d7fa | 2012-04-27 10:15:45 +0200 | [diff] [blame] | 20 | #ifdef CONFIG_DEBUG_IMX6Q_UART2 |
| 21 | .virtual = MX6Q_IO_P2V(MX6Q_UART2_BASE_ADDR), |
| 22 | .pfn = __phys_to_pfn(MX6Q_UART2_BASE_ADDR), |
| 23 | .length = MX6Q_UART2_SIZE, |
| 24 | .type = MT_DEVICE, |
| 25 | #endif |
Dirk Behme | cdaf29c | 2012-02-06 13:19:19 +0100 | [diff] [blame] | 26 | #ifdef CONFIG_DEBUG_IMX6Q_UART4 |
Shawn Guo | bac89d7 | 2011-10-02 15:09:11 +0800 | [diff] [blame] | 27 | .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR), |
| 28 | .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR), |
| 29 | .length = MX6Q_UART4_SIZE, |
| 30 | .type = MT_DEVICE, |
| 31 | #endif |
| 32 | }; |
| 33 | |
| 34 | void __init imx_lluart_map_io(void) |
| 35 | { |
| 36 | if (imx_lluart_desc.virtual) |
| 37 | iotable_init(&imx_lluart_desc, 1); |
| 38 | } |