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