From patchwork Fri May 31 11:49:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 17360 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3D7A025DFA for ; Fri, 31 May 2013 12:03:18 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id f13sf1690843vbg.9 for ; Fri, 31 May 2013 05:03:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=uKMqRn0xsMYdpeX5RmX5gPrp+cCQkp0SyPZ1XC+2qEw=; b=CAnvheU15OQpPLhquaPkJ/VPym6fWH6K543sbJ8EWAOdrrK1Q3W12leeWCiCdqDaBK VInxTrOgAewt2U3mDMuH9ur7pFyyvGCsv0+0R6Ti2Lov8t9hw+isAgmZI0YcRTGEIwAO +u72BDbuyeZTNGeFcpTthQNuDbYLCPm5l8CEslR26SySLCyEyAHiA8STeVMpWb6hB8NY pkJjulxdByxStF/xBe0Qpm1soMRfz2RJ0xqwdeGDMEVABFcvJZzkH1ZvkTn4kbcMQgCy fhab+cMJakcOibyo2UJYxaqDdRYkf+REWV66+rekwkTddQmRQJobbWqcU0KGIQQMuwUj 3tuw== X-Received: by 10.224.205.138 with SMTP id fq10mr6579502qab.1.1370001797939; Fri, 31 May 2013 05:03:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.75.39 with SMTP id z7ls919391qev.35.gmail; Fri, 31 May 2013 05:03:17 -0700 (PDT) X-Received: by 10.220.188.201 with SMTP id db9mr9738642vcb.30.1370001797807; Fri, 31 May 2013 05:03:17 -0700 (PDT) Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [2607:f8b0:400c:c02::22e]) by mx.google.com with ESMTPS id p8si28171998vdv.135.2013.05.31.05.03.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 05:03:17 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22e; Received: by mail-vb0-f46.google.com with SMTP id 11so957815vbe.5 for ; Fri, 31 May 2013 05:03:17 -0700 (PDT) X-Received: by 10.52.233.34 with SMTP id tt2mr8277602vdc.70.1370001797709; Fri, 31 May 2013 05:03:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.229.199 with SMTP id jj7csp47133vcb; Fri, 31 May 2013 05:03:16 -0700 (PDT) X-Received: by 10.66.188.137 with SMTP id ga9mr13149837pac.9.1370001796583; Fri, 31 May 2013 05:03:16 -0700 (PDT) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by mx.google.com with ESMTPS id xl2si32607196pbc.181.2013.05.31.05.03.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 05:03:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.182 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.192.182; Received: by mail-pd0-f182.google.com with SMTP id g10so2089522pdj.13 for ; Fri, 31 May 2013 05:03:16 -0700 (PDT) X-Received: by 10.68.170.68 with SMTP id ak4mr12206715pbc.211.1370001796209; Fri, 31 May 2013 05:03:16 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ag4sm46445160pbc.20.2013.05.31.05.03.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 05:03:15 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: arnd@arndb.de, kgene.kim@samsung.com, olof@lixom.net, patches@linaro.org Subject: [PATCH 2/3] ARM: SAMSUNG: Consolidate uncompress subroutine Date: Fri, 31 May 2013 17:19:03 +0530 Message-Id: <1370000944-19786-3-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370000944-19786-1-git-send-email-tushar.behera@linaro.org> References: <1370000944-19786-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQk4NygKehF+GABuP1xWByJGT8jBcmwd/xE7qnDn81wOuQkeIOISkMI1JK7BlgyJUS7JKdCc X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , For mach-exynos, uart_base is a pointer and the value is calculated in the machine folder. For other machines, uart_base is defined as a macro in platform directory. For symmetry, the uart_base macro definition is removed and the uart_base calculation is moved to specific machine folders. This would help us consolidating uncompress subroutine for s5p64x0. Signed-off-by: Tushar Behera --- arch/arm/mach-exynos/include/mach/uncompress.h | 3 --- arch/arm/mach-s3c24xx/include/mach/uncompress.h | 7 +++++++ arch/arm/mach-s3c64xx/include/mach/uncompress.h | 7 +++++++ arch/arm/mach-s5pc100/include/mach/uncompress.h | 6 ++++++ arch/arm/mach-s5pv210/include/mach/uncompress.h | 6 ++++++ arch/arm/plat-samsung/include/plat/uncompress.h | 6 ++---- 6 files changed, 28 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h index 730f69f..30592fd 100644 --- a/arch/arm/mach-exynos/include/mach/uncompress.h +++ b/arch/arm/mach-exynos/include/mach/uncompress.h @@ -15,9 +15,6 @@ #include #include - -volatile u8 *uart_base; - #include static unsigned int __raw_readl(unsigned int ptr) diff --git a/arch/arm/mach-s3c24xx/include/mach/uncompress.h b/arch/arm/mach-s3c24xx/include/mach/uncompress.h index 8b283f8..638893e 100644 --- a/arch/arm/mach-s3c24xx/include/mach/uncompress.h +++ b/arch/arm/mach-s3c24xx/include/mach/uncompress.h @@ -49,6 +49,13 @@ static void arch_detect_cpu(void) fifo_mask = S3C2410_UFSTAT_TXMASK; fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT; } + +#ifdef CONFIG_DEBUG_LL + uart_base = (volatile u8 *) S3C_PA_UART + + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); +#else + uart_base = NULL; +#endif } #endif /* __ASM_ARCH_UNCOMPRESS_H */ diff --git a/arch/arm/mach-s3c64xx/include/mach/uncompress.h b/arch/arm/mach-s3c64xx/include/mach/uncompress.h index c6a82a2..d6f9188 100644 --- a/arch/arm/mach-s3c64xx/include/mach/uncompress.h +++ b/arch/arm/mach-s3c64xx/include/mach/uncompress.h @@ -23,6 +23,13 @@ static void arch_detect_cpu(void) /* we do not need to do any cpu detection here at the moment. */ fifo_mask = S3C2440_UFSTAT_TXMASK; fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; + +#ifdef CONFIG_DEBUG_LL + uart_base = (volatile u8 *)S3C_PA_UART + + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT); +#else + uart_base = NULL; +#endif } #endif /* __ASM_ARCH_UNCOMPRESS_H */ diff --git a/arch/arm/mach-s5pc100/include/mach/uncompress.h b/arch/arm/mach-s5pc100/include/mach/uncompress.h index 01ccf53..c1242df 100644 --- a/arch/arm/mach-s5pc100/include/mach/uncompress.h +++ b/arch/arm/mach-s5pc100/include/mach/uncompress.h @@ -23,6 +23,12 @@ static void arch_detect_cpu(void) /* we do not need to do any cpu detection here at the moment. */ fifo_mask = S3C2440_UFSTAT_TXMASK; fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; + +#ifdef CONFIG_DEBUG_LL + uart_base = (volatile u8 *)S5P_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT); +#else + uart_base = NULL; +#endif } #endif /* __ASM_ARCH_UNCOMPRESS_H */ diff --git a/arch/arm/mach-s5pv210/include/mach/uncompress.h b/arch/arm/mach-s5pv210/include/mach/uncompress.h index ef977ea..2193812 100644 --- a/arch/arm/mach-s5pv210/include/mach/uncompress.h +++ b/arch/arm/mach-s5pv210/include/mach/uncompress.h @@ -21,6 +21,12 @@ static void arch_detect_cpu(void) /* we do not need to do any cpu detection here at the moment. */ fifo_mask = S5PV210_UFSTAT_TXMASK; fifo_max = 63 << S5PV210_UFSTAT_TXSHIFT; + +#ifdef CONFIG_DEBUG_LL + uart_base = (volatile u8 *)S5P_PA_UART(CONFIG_S3C_LOWLEVEL_UART_PORT); +#else + uart_base = NULL; +#endif } #endif /* __ASM_ARCH_UNCOMPRESS_H */ diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h index 350032b..78274eb 100644 --- a/arch/arm/plat-samsung/include/plat/uncompress.h +++ b/arch/arm/plat-samsung/include/plat/uncompress.h @@ -21,6 +21,8 @@ typedef unsigned int upf_t; /* cannot include linux/serial_core.h */ unsigned int fifo_mask; unsigned int fifo_max; +volatile u8 *uart_base; + /* forward declerations */ static void arch_detect_cpu(void); @@ -37,10 +39,6 @@ static void arch_detect_cpu(void); /* how many bytes we allow into the FIFO at a time in FIFO mode */ #define FIFO_MAX (14) -#ifdef S3C_PA_UART -#define uart_base S3C_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT) -#endif - static __inline__ void uart_wr(unsigned int reg, unsigned int val) {