提交 fd9abe1b 编写于 作者: C Colin Cross 提交者: Kukjin Kim

ARM: EXYNOS: fix CONFIG_DEBUG_LL

addruart cannot read from the physical address of the chipid
register, that will fail as soon as the mmu is turned on.
Fixing it to read from the physical or virtual address depending
on the mmu state also does not work, because there is a period
between head.S and exynos_map_io where the mmu is on, the uart
is mapped and used, but the chipid mapping is not yet present.

Fix addruart to use the ARM Main ID cp15 register to determine
if the core is Cortex A15 (EXYNOS5) or not (EXYNOS4).
Signed-off-by: NColin Cross <ccross@android.com>
Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Tested-by: NThomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: NKukjin Kim <kgene.kim@samsung.com>
上级 8551f3ff
...@@ -21,10 +21,9 @@ ...@@ -21,10 +21,9 @@
*/ */
.macro addruart, rp, rv, tmp .macro addruart, rp, rv, tmp
mov \rp, #0x10000000 mrc p15, 0, \tmp, c0, c0, 0
ldr \rp, [\rp, #0x0] and \tmp, \tmp, #0xf0
and \rp, \rp, #0xf00000 teq \tmp, #0xf0 @@ A15
teq \rp, #0x500000 @@ EXYNOS5
ldreq \rp, =EXYNOS5_PA_UART ldreq \rp, =EXYNOS5_PA_UART
movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4 movne \rp, #EXYNOS4_PA_UART @@ EXYNOS4
ldr \rv, =S3C_VA_UART ldr \rv, =S3C_VA_UART
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册