]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: EXYNOS: fix CONFIG_DEBUG_LL
authorColin Cross <ccross@android.com>
Wed, 4 Apr 2012 16:27:19 +0000 (09:27 -0700)
committerKukjin Kim <kgene.kim@samsung.com>
Wed, 4 Apr 2012 16:27:19 +0000 (09:27 -0700)
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: Colin Cross <ccross@android.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos/include/mach/debug-macro.S

index 6c857ff0b5d84670f65287230801a7bf2cf5d974..e0c86ea475e7bccd6f1e7b598fe6da69b78abc0f 100644 (file)
         */
 
        .macro addruart, rp, rv, tmp
-               mov     \rp, #0x10000000
-               ldr     \rp, [\rp, #0x0]
-               and     \rp, \rp, #0xf00000
-               teq     \rp, #0x500000          @@ EXYNOS5
+               mrc     p15, 0, \tmp, c0, c0, 0
+               and     \tmp, \tmp, #0xf0
+               teq     \tmp, #0xf0             @@ A15
                ldreq   \rp, =EXYNOS5_PA_UART
                movne   \rp, #EXYNOS4_PA_UART   @@ EXYNOS4
                ldr     \rv, =S3C_VA_UART