1a2e40710SArnd Bergmann/* 2a2e40710SArnd Bergmann * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 3a2e40710SArnd Bergmann * http://www.samsung.com 4a2e40710SArnd Bergmann * 5a2e40710SArnd Bergmann * This program is free software; you can redistribute it and/or modify 6a2e40710SArnd Bergmann * it under the terms of the GNU General Public License version 2 as 7a2e40710SArnd Bergmann * published by the Free Software Foundation. 8a2e40710SArnd Bergmann*/ 9a2e40710SArnd Bergmann 10a2e40710SArnd Bergmann/* pull in the relevant register and map files. */ 11a2e40710SArnd Bergmann 12a2e40710SArnd Bergmann#define S3C_ADDR_BASE 0xF6000000 13a2e40710SArnd Bergmann#define S3C_VA_UART S3C_ADDR_BASE + 0x01000000 14a2e40710SArnd Bergmann#define EXYNOS4_PA_UART 0x13800000 15a2e40710SArnd Bergmann#define EXYNOS5_PA_UART 0x12C00000 16a2e40710SArnd Bergmann 17a2e40710SArnd Bergmann /* note, for the boot process to work we have to keep the UART 18a2e40710SArnd Bergmann * virtual address aligned to an 1MiB boundary for the L1 19a2e40710SArnd Bergmann * mapping the head code makes. We keep the UART virtual address 20a2e40710SArnd Bergmann * aligned and add in the offset when we load the value here. 21a2e40710SArnd Bergmann */ 22a2e40710SArnd Bergmann 23a2e40710SArnd Bergmann .macro addruart, rp, rv, tmp 24a2e40710SArnd Bergmann mrc p15, 0, \tmp, c0, c0, 0 25a2e40710SArnd Bergmann and \tmp, \tmp, #0xf0 26a2e40710SArnd Bergmann teq \tmp, #0xf0 @@ A15 272f3428b5SJoonyoung Shim beq 100f 282f3428b5SJoonyoung Shim mrc p15, 0, \tmp, c0, c0, 5 292f3428b5SJoonyoung Shim and \tmp, \tmp, #0xf00 302f3428b5SJoonyoung Shim teq \tmp, #0x100 @@ A15 + A7 but boot to A7 312f3428b5SJoonyoung Shim100: ldreq \rp, =EXYNOS5_PA_UART 32a2e40710SArnd Bergmann movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4 33a2e40710SArnd Bergmann ldr \rv, =S3C_VA_UART 34a2e40710SArnd Bergmann#if CONFIG_DEBUG_S3C_UART != 0 35a2e40710SArnd Bergmann add \rp, \rp, #(0x10000 * CONFIG_DEBUG_S3C_UART) 36a2e40710SArnd Bergmann add \rv, \rv, #(0x10000 * CONFIG_DEBUG_S3C_UART) 37a2e40710SArnd Bergmann#endif 38a2e40710SArnd Bergmann .endm 39a2e40710SArnd Bergmann 40a2e40710SArnd Bergmann#define fifo_full fifo_full_s5pv210 41a2e40710SArnd Bergmann#define fifo_level fifo_level_s5pv210 42a2e40710SArnd Bergmann 43a2e40710SArnd Bergmann#include <debug/samsung.S> 44