1*f947153fSKrzysztof Kozlowski/* SPDX-License-Identifier: GPL-2.0 */ 2a2e40710SArnd Bergmann/* 3a2e40710SArnd Bergmann * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. 4a2e40710SArnd Bergmann * http://www.samsung.com 5a2e40710SArnd Bergmann */ 6a2e40710SArnd Bergmann 7a2e40710SArnd Bergmann/* pull in the relevant register and map files. */ 8a2e40710SArnd Bergmann 9a2e40710SArnd Bergmann#define S3C_ADDR_BASE 0xF6000000 10a2e40710SArnd Bergmann#define S3C_VA_UART S3C_ADDR_BASE + 0x01000000 11a2e40710SArnd Bergmann#define EXYNOS4_PA_UART 0x13800000 12a2e40710SArnd Bergmann#define EXYNOS5_PA_UART 0x12C00000 13a2e40710SArnd Bergmann 14a2e40710SArnd Bergmann /* note, for the boot process to work we have to keep the UART 15a2e40710SArnd Bergmann * virtual address aligned to an 1MiB boundary for the L1 16a2e40710SArnd Bergmann * mapping the head code makes. We keep the UART virtual address 17a2e40710SArnd Bergmann * aligned and add in the offset when we load the value here. 18a2e40710SArnd Bergmann */ 19a2e40710SArnd Bergmann 20a2e40710SArnd Bergmann .macro addruart, rp, rv, tmp 21a2e40710SArnd Bergmann mrc p15, 0, \tmp, c0, c0, 0 22a2e40710SArnd Bergmann and \tmp, \tmp, #0xf0 23a2e40710SArnd Bergmann teq \tmp, #0xf0 @@ A15 242f3428b5SJoonyoung Shim beq 100f 252f3428b5SJoonyoung Shim mrc p15, 0, \tmp, c0, c0, 5 262f3428b5SJoonyoung Shim and \tmp, \tmp, #0xf00 272f3428b5SJoonyoung Shim teq \tmp, #0x100 @@ A15 + A7 but boot to A7 282f3428b5SJoonyoung Shim100: ldreq \rp, =EXYNOS5_PA_UART 29a2e40710SArnd Bergmann movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4 30a2e40710SArnd Bergmann ldr \rv, =S3C_VA_UART 31a2e40710SArnd Bergmann#if CONFIG_DEBUG_S3C_UART != 0 32a2e40710SArnd Bergmann add \rp, \rp, #(0x10000 * CONFIG_DEBUG_S3C_UART) 33a2e40710SArnd Bergmann add \rv, \rv, #(0x10000 * CONFIG_DEBUG_S3C_UART) 34a2e40710SArnd Bergmann#endif 35a2e40710SArnd Bergmann .endm 36a2e40710SArnd Bergmann 37a2e40710SArnd Bergmann#define fifo_full fifo_full_s5pv210 38a2e40710SArnd Bergmann#define fifo_level fifo_level_s5pv210 39a2e40710SArnd Bergmann 40a2e40710SArnd Bergmann#include <debug/samsung.S> 41