From patchwork Thu Dec 27 18:27:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kim Kukjin X-Patchwork-Id: 1913521 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 286463FC66 for ; Thu, 27 Dec 2012 18:30:36 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1ToIB7-0007hk-1Y; Thu, 27 Dec 2012 18:27:37 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1ToIB2-0007hQ-L8 for linux-arm-kernel@lists.infradead.org; Thu, 27 Dec 2012 18:27:34 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MFP00IUOCLRA9L0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 28 Dec 2012 03:27:27 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.48]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 31.FA.12699.F039CD05; Fri, 28 Dec 2012 03:27:27 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-b8-50dc930f6c3e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 11.FA.12699.F039CD05; Fri, 28 Dec 2012 03:27:27 +0900 (KST) Received: from localhost.localdomain ([105.128.18.183]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MFP00HIJCLN2UA0@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 28 Dec 2012 03:27:27 +0900 (KST) From: Kukjin Kim To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] ARM: EXYNOS: fix uncompress.h and debug-macro.S for EXYNOS5440 Date: Thu, 27 Dec 2012 10:27:14 -0800 Message-id: <1356632834-8934-1-git-send-email-kgene.kim@samsung.com> X-Mailer: git-send-email 1.7.10.4 DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsVy+t8zA13+yXcCDGZ91LPY9PgaqwOjx+Yl 9QGMUVw2Kak5mWWpRfp2CVwZt28fZS3YIVHxs3U+UwPjP+EuRk4OCQETiRt7FzFB2GISF+6t ZwOxhQSWMUp0TBKCqWlqPwEU5wKKT2eUmNh/hB3C2cAkcXnRO3aQKjYBDYnD758B2RwcIgLe EsuvKYKEmQXUJG4cessMYgsL+Et8P3WXFcRmEVCVeLd0ByOIzSvgIjH98DVmiGWKEt3PJrBB 1AhIfJt8iAVkpISArMSmA8wgayUEdrBJLP+4FepoSYmDK26wTGAUXMDIsIpRNLUguaA4KT3X SK84Mbe4NC9dLzk/dxMjJKCkdzCuarA4xCjAwajEw7uo506AEGtiWXFl7iFGCQ5mJRHe7/FA Id6UxMqq1KL8+KLSnNTiQ4w+QJdMZJYSTc4HBnteSbyhsbGJmYmpibmlqbkpDmElcd5mj5QA IYH0xJLU7NTUgtQimHFMHJxSDYxy1jKnvBwu2Il9Nbdm+B0xM0U24+XEBat+L9xmYyD7XSxF Ka/mg93GomorjXnrFivL3ykWzFljxtSs3fiG6eyDvxLm/3Ma+yMqUz1v+pbeEp7JXL3ZLWra jtjr3ZeWdk0LC8m9LPDAU1HKjmXpA6ljK6/9kJ1Z1HT7z4rqqfYmD61qlj7Te6fEUpyRaKjF XFScCADyUQloVQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRmVeSWpSXmKPExsVy+t9jQV3+yXcCDD4f0LLY9PgaqwOjx+Yl 9QGMUQ2MNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlA U5UUyhJzSoFCAYnFxUr6dpgmhIa46VrANEbo+oYEwfUYGaCBhHWMGbdvH2Ut2CFR8bN1PlMD 4z/hLkZODgkBE4mm9hNsELaYxIV764FsLg4hgemMEhP7j7BDOBuYJC4vescOUsUmoCFx+P0z IJuDQ0TAW2L5NUWQMLOAmsSNQ2+ZQWxhAX+J76fusoLYLAKqEu+W7mAEsXkFXCSmH77GDLFM UaL72QS2CYzcCxgZVjGKphYkFxQnpeca6RUn5haX5qXrJefnbmIEB+wz6R2MqxosDjEKcDAq 8fAu6rkTIMSaWFZcmXuIUYKDWUmE93s8UIg3JbGyKrUoP76oNCe1+BCjD9D2icxSosn5wGjK K4k3NDYxM7I0MrMwMjE3xyGsJM7b7JESICSQnliSmp2aWpBaBDOOiYNTqoGRVbb2KWvQp9JT OwQWrntQ7H73oWrqQUPN2lmnuZ4JmHQfP7g2ZYWyWGN6Vvj5hbESdxu0qkLutfttmd9todEr VDqhx8Z5iUbi4YWbH3ery77mKrXUDXn966SLypH96wPv71OZt2PPdeF3MR5ut/5suKrY42Tx 4LdbjeN+7cv9fLv787MatyUpsRRnJBpqMRcVJwIAQiKamoUCAAA= X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121227_132733_061078_81425A91 X-CRM114-Status: GOOD ( 11.81 ) X-Spam-Score: -7.5 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.25 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 HDRS_LCASE Odd capitalization of message header Cc: Kukjin Kim X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch fixes uart base address for uncompress and debug-macro on EXYNOS5440. Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/include/mach/debug-macro.S | 25 +++++++++++++++++------ arch/arm/mach-exynos/include/mach/map.h | 1 + arch/arm/mach-exynos/include/mach/uncompress.h | 20 +++++++++++------- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-exynos/include/mach/debug-macro.S b/arch/arm/mach-exynos/include/mach/debug-macro.S index e0c86ea..69e3e52 100644 --- a/arch/arm/mach-exynos/include/mach/debug-macro.S +++ b/arch/arm/mach-exynos/include/mach/debug-macro.S @@ -21,12 +21,25 @@ */ .macro addruart, rp, rv, tmp - 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 + mov \rp, #0x10000000 + ldr \rp, [\rp, #0] + and \rp, \rp, #0x0ff00000 + teq \rp, #0x03200000 @ EXYNOS4210, EXYNOS4212 + beq 4f + teq \rp, #0x04400000 @ EXYNOS4412 + beq 4f + teq \rp, #0x03500000 @ EXYNOS5250 + beq 5f + b 54f + +4: mov \rp, #EXYNOS4_PA_UART + b 99f +5: mov \rp, #EXYNOS5_PA_UART + b 99f +54: mov \rp, #EXYNOS5440_PA_UART + b 99f +99: ldr \rv, =S3C_VA_UART + #if CONFIG_DEBUG_S3C_UART != 0 add \rp, \rp, #(0x10000 * CONFIG_DEBUG_S3C_UART) add \rv, \rv, #(0x10000 * CONFIG_DEBUG_S3C_UART) diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 1df6abb..cba083e 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -203,6 +203,7 @@ #define EXYNOS4_PA_UART 0x13800000 #define EXYNOS5_PA_UART 0x12C00000 +#define EXYNOS5440_PA_UART 0x000B0000 #define EXYNOS4_PA_VP 0x12C00000 #define EXYNOS4_PA_MIXER 0x12C10000 diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h index 2979995..ace9be2 100644 --- a/arch/arm/mach-exynos/include/mach/uncompress.h +++ b/arch/arm/mach-exynos/include/mach/uncompress.h @@ -31,16 +31,22 @@ static void arch_detect_cpu(void) /* * product_id is bits 31:12 - * bits 23:20 describe the exynosX family - * + * bits 27:20 describe the exynosX family */ chip_id >>= 20; - chip_id &= 0xf; - - if (chip_id == 0x5) - uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); + chip_id &= 0xff; + + if (chip_id == 0x32 || chip_id == 0x44) + /* EXYNOS4210, EXYNOS4212 and EXYNOS4412 */ + uart_base = (volatile u8 *)EXYNOS4_PA_UART; + else if (chip_id == 0x35) + /* EXYNOS5250 */ + uart_base = (volatile u8 *)EXYNOS5_PA_UART; else - uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); + /* EXYNOS5440 */ + uart_base = (volatile u8 *)EXYNOS5440_PA_UART; + + uart_base += S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT; /* * For preventing FIFO overrun or infinite loop of UART console,