From mboxrd@z Thu Jan 1 00:00:00 1970 From: kgene.kim@samsung.com (Kukjin Kim) Date: Thu, 22 Mar 2012 07:08:22 -0700 Subject: [PATCH v4 05/12] ARM: EXYNOS: add support uart for EXYNOS4 and EXYNOS5 In-Reply-To: <074401cd074f$c2946b90$47bd42b0$%szyprowski@samsung.com> References: <1331736138-28964-1-git-send-email-kgene.kim@samsung.com> <1331736138-28964-6-git-send-email-kgene.kim@samsung.com> <074401cd074f$c2946b90$47bd42b0$%szyprowski@samsung.com> Message-ID: <4F6B3256.40304@samsung.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 03/21/12 03:45, Marek Szyprowski wrote: > Hello, > > On Wednesday, March 21, 2012 10:14 AM Thomas Abraham wrote: > >> On 14 March 2012 20:12, Kukjin Kim wrote: >>> Actually, the base address of uart is different between EXYNOS4 >>> and EXYNOS5 and this patch enables to support uart for EXYNOS4 >>> and EXYNOS5 SoCs at runtime. >>> >>> Signed-off-by: Kukjin Kim >>> --- >> >> [...] >> >>> diff --git a/arch/arm/mach-exynos/include/mach/debug-macro.S b/arch/arm/mach- >> exynos/include/mach/debug-macro.S >>> index 6cacf16..6c857ff 100644 >>> --- a/arch/arm/mach-exynos/include/mach/debug-macro.S >>> +++ b/arch/arm/mach-exynos/include/mach/debug-macro.S >>> @@ -21,8 +21,13 @@ >>> */ >>> >>> .macro addruart, rp, rv, tmp >>> - ldr \rp, = S3C_PA_UART >>> - ldr \rv, = S3C_VA_UART >>> + mov \rp, #0x10000000 >> >> This is physical address of Exynos4/5 CPUID register which cannot be >> used here. And virtual address S5P_VA_CPUID also cannot be used here >> since this will be called before paging_init when earlyprintk boot >> param is used. So, with this change, earlyprintk does not work for >> both Exynos4 and Exynos5. > > I confirm, printascii freeze the system on EXYNOS4 after that patch, > tested on Exynos4210 Nuri board. > Hi, I think, it can be solved with following and if no problems, it will be fixed during v3.4-rcX. diff --git a/arch/arm/mach-exynos/include/mach/debug-macro.S b/arch/arm/mach-exynos/in index 6c857ff..a865417 100644 --- a/arch/arm/mach-exynos/include/mach/debug-macro.S +++ b/arch/arm/mach-exynos/include/mach/debug-macro.S @@ -21,10 +21,10 @@ */ .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 Thanks. Best regards, Kgene. -- Kukjin Kim , Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.