Barry Song | 31adb06 | 2011-07-08 02:40:13 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Static memory mapping for DEBUG_LL |
| 3 | * |
| 4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. |
| 5 | * |
| 6 | * Licensed under GPLv2 or later. |
| 7 | */ |
| 8 | |
| 9 | #include <linux/kernel.h> |
| 10 | #include <asm/page.h> |
| 11 | #include <asm/mach/map.h> |
Arnd Bergmann | cf82e0e | 2013-03-19 17:45:37 +0100 | [diff] [blame] | 12 | #include "common.h" |
Arnd Bergmann | 67bdb28 | 2013-03-19 13:52:14 +0100 | [diff] [blame] | 13 | |
| 14 | #if defined(CONFIG_DEBUG_SIRFPRIMA2_UART1) |
| 15 | #define SIRFSOC_UART1_PA_BASE 0xb0060000 |
| 16 | #elif defined(CONFIG_DEBUG_SIRFMARCO_UART1) |
| 17 | #define SIRFSOC_UART1_PA_BASE 0xcc060000 |
| 18 | #else |
| 19 | #define SIRFSOC_UART1_PA_BASE 0 |
| 20 | #endif |
| 21 | |
| 22 | #define SIRFSOC_UART1_VA_BASE SIRFSOC_VA(0x060000) |
| 23 | #define SIRFSOC_UART1_SIZE SZ_4K |
Barry Song | 31adb06 | 2011-07-08 02:40:13 -0700 | [diff] [blame] | 24 | |
| 25 | void __init sirfsoc_map_lluart(void) |
| 26 | { |
| 27 | struct map_desc sirfsoc_lluart_map = { |
| 28 | .virtual = SIRFSOC_UART1_VA_BASE, |
| 29 | .pfn = __phys_to_pfn(SIRFSOC_UART1_PA_BASE), |
| 30 | .length = SIRFSOC_UART1_SIZE, |
| 31 | .type = MT_DEVICE, |
| 32 | }; |
| 33 | |
| 34 | iotable_init(&sirfsoc_lluart_map, 1); |
| 35 | } |