From patchwork Wed Oct 1 16:42:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhilash Kesavan X-Patchwork-Id: 5013401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3A4599F32B for ; Wed, 1 Oct 2014 16:45:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66BA92026D for ; Wed, 1 Oct 2014 16:45:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FBC420279 for ; Wed, 1 Oct 2014 16:45:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XZN04-00010l-KE; Wed, 01 Oct 2014 16:43:36 +0000 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XZN01-0000oh-1v for linux-arm-kernel@lists.infradead.org; Wed, 01 Oct 2014 16:43:33 +0000 Received: by mail-pa0-f46.google.com with SMTP id fa1so567993pad.19 for ; Wed, 01 Oct 2014 09:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=KMoqHFSlKeFtRCMkrjUnHMdm7cRideVJfLqj+7cuy8w=; b=tX0SeAA9OoVc2jyxwn1vZmk5JUkckvJzJiFb/+pfn1QNVFFir+J33UNZO7uEj34UQr saQrvu4g+xW6cDBQMzzTUw72YlDc3ZGxiec9/jGgIB3CGbgdiENCU5lGd9S4JvWM6O+g awZUtMQgWrCMf63/KHl4U++/j4p6Nk/ENp704wHUjLqJdqCBrWmTfn/8wc48NyA07xrQ cHAAdT7TKPYstOqp/BOUYv5J5cK22TCtKigNXbFVzuyCLWsF4kk/e+LG5hb8JrCy3lF9 W5bmeZIdLorDXsMhyuQ3tNXej5ZpQk85b9/zPpp5PVZza/rU1ZnYuZQw4M/xGRIpUbSO qANg== X-Received: by 10.66.102.105 with SMTP id fn9mr81623359pab.105.1412181791421; Wed, 01 Oct 2014 09:43:11 -0700 (PDT) Received: from localhost.localdomain ([122.172.104.240]) by mx.google.com with ESMTPSA id dh14sm1483621pac.17.2014.10.01.09.43.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Oct 2014 09:43:10 -0700 (PDT) From: Abhilash Kesavan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/2] arch: arm: samsung: Clean-up usage of CONFIG_SERIAL_SAMSUNG_UARTS symbol Date: Wed, 1 Oct 2014 22:12:56 +0530 Message-Id: <1412181777-6388-1-git-send-email-a.kesavan@samsung.com> X-Mailer: git-send-email 2.1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141001_094333_141904_8D358FBF X-CRM114-Status: GOOD ( 11.18 ) X-Spam-Score: -0.7 (/) Cc: gregkh@linuxfoundation.org, linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com, arnd@arndb.de, tomasz.figa@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove usage of CONFIG_SERIAL_SAMSUNG_UARTS symbol from platform specific code. Signed-off-by: Abhilash Kesavan Reviewed-by: Tomasz Figa --- Changes in v2: - Re-ordered the patches - Added a define for number of uart ports in arch/arm/plat-samsung/init.c - Removed CONFIG_SERIAL_SAMSUNG #ifdef in arch/arm/plat-samsung/init.c Build tested using s3c2410_defconfig, s3c6400_defconfig, exynos_defconfig and arm64's defconfig with and without the serial driver enabled. Boot tested on Exynos5420 and Exynos7. arch/arm/mach-s3c64xx/irq-pm.c | 6 +++--- arch/arm/plat-samsung/init.c | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-s3c64xx/irq-pm.c b/arch/arm/mach-s3c64xx/irq-pm.c index ae4ea76..b20024e 100644 --- a/arch/arm/mach-s3c64xx/irq-pm.c +++ b/arch/arm/mach-s3c64xx/irq-pm.c @@ -55,10 +55,10 @@ static struct irq_grp_save { u32 mask; } eint_grp_save[5]; -#ifndef CONFIG_SERIAL_SAMSUNG_UARTS -#define SERIAL_SAMSUNG_UARTS 0 +#ifndef CONFIG_SERIAL_SAMSUNG +#define SERIAL_SAMSUNG_UARTS 0 #else -#define SERIAL_SAMSUNG_UARTS CONFIG_SERIAL_SAMSUNG_UARTS +#define SERIAL_SAMSUNG_UARTS 4 #endif static u32 irq_uart_mask[SERIAL_SAMSUNG_UARTS]; diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c index 11fbbc2..6114942 100644 --- a/arch/arm/plat-samsung/init.c +++ b/arch/arm/plat-samsung/init.c @@ -92,10 +92,9 @@ void __init s3c24xx_init_clocks(int xtal) /* uart management */ #if IS_ENABLED(CONFIG_SAMSUNG_ATAGS) static int nr_uarts __initdata = 0; +#define MAX_UART_PORTS 4 -#ifdef CONFIG_SERIAL_SAMSUNG_UARTS -static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS]; -#endif +static struct s3c2410_uartcfg uart_cfgs[MAX_UART_PORTS]; /* s3c24xx_init_uartdevs * @@ -110,7 +109,6 @@ void __init s3c24xx_init_uartdevs(char *name, struct s3c24xx_uart_resources *res, struct s3c2410_uartcfg *cfg, int no) { -#ifdef CONFIG_SERIAL_SAMSUNG_UARTS struct platform_device *platdev; struct s3c2410_uartcfg *cfgptr = uart_cfgs; struct s3c24xx_uart_resources *resp; @@ -133,7 +131,6 @@ void __init s3c24xx_init_uartdevs(char *name, } nr_uarts = no; -#endif } void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)