From patchwork Fri Jun 14 19:32:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 2723391 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 05A0D9F8E4 for ; Fri, 14 Jun 2013 19:33:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE08920122 for ; Fri, 14 Jun 2013 19:33:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AAADA2036A for ; Fri, 14 Jun 2013 19:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753876Ab3FNTdY (ORCPT ); Fri, 14 Jun 2013 15:33:24 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:31659 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751648Ab3FNTdX (ORCPT ); Fri, 14 Jun 2013 15:33:23 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MOE00FZSE9PI770@mailout1.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 14 Jun 2013 20:33:20 +0100 (BST) X-AuditID: cbfec7f4-b7fd76d0000035e1-b2-51bb70005f4b Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 50.59.13793.0007BB15; Fri, 14 Jun 2013 20:33:20 +0100 (BST) Received: from amdc1227.digital.local ([106.116.147.199]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MOE00FXFEBEW970@eusync2.samsung.com>; Fri, 14 Jun 2013 20:33:20 +0100 (BST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Kukjin Kim , Arnd Bergmann , Olof Johansson , Marek Szyprowski , Sylwester Nawrocki , Thomas Abraham , Tomasz Figa , Kyungmin Park Subject: [PATCH 06/28] ARM: EXYNOS: common: Remove legacy UART initialization code Date: Fri, 14 Jun 2013 21:32:42 +0200 Message-id: <1371238384-1504-7-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.2.1 In-reply-to: <1371238384-1504-1-git-send-email-t.figa@samsung.com> References: <1371238384-1504-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkluLIzCtJLcpLzFFi42I5/e/4FV2Ggt2BBns/iVr8nXSM3aJ3wVU2 i7NNb9gtNj2+xmox4/w+Jou1R+6yW5y6/pnN4vCbdlaL9TNes1gcm7GE0YHL4/evSYwed67t YfPYvKTe48qJJlaPvi2rGD0+b5ILYIvisklJzcksSy3St0vgymi/84Cl4JRExev28gbGZpEu Rk4OCQETiRU981ghbDGJC/fWs3UxcnEICSxllLhzvIMRwuljkph09z4zSBWbgJrE54ZHbCC2 iICqxOe2BewgRcwCL5kk7jY+YAdJCAuESGz+dASsgQWo6MfXv0wgNq+Ao8Smj5vYIdYpSBzf vo0RxOYUcJI4u34L2FAhoJrpjUtYJjDyLmBkWMUomlqaXFCclJ5rqFecmFtcmpeul5yfu4kR EnxfdjAuPmZ1iFGAg1GJh3ei2u5AIdbEsuLK3EOMEhzMSiK8d1WBQrwpiZVVqUX58UWlOanF hxiZODilGhgb5NW2C4g3Pf8bWl4n5FR7N/+WF8/BnoOck9jun3iVlJ6w7Uosv6jRYbupt1Z6 iURKuqa5Prt4w/0VV7DGETm9FpGNfzzuPT/d5c+n3nNj7iGhbXdYNyuLfCqWalUX+uvJllI7 LcIm9IH/4zU/Uq3XuvU1RomHe/ns3BLrcXoZQ8KR7c6Vy5VYijMSDbWYi4oTAfVJl8ocAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 This patch removes legacy UART initialization code that was used to set up UART platform devices when booting with ATAGS, which is not supported on Exynos any more. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park --- arch/arm/mach-exynos/common.c | 17 ----------------- arch/arm/plat-samsung/init.c | 8 +++++--- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 488d9bd..598e4b8 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -69,7 +69,6 @@ static const char name_exynos5440[] = "EXYNOS5440"; static void exynos4_map_io(void); static void exynos5_map_io(void); static void exynos5440_map_io(void); -static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); static int exynos_init(void); unsigned long xxti_f = 0, xusbxti_f = 0; @@ -79,21 +78,18 @@ static struct cpu_table cpu_ids[] __initdata = { .idcode = EXYNOS4210_CPU_ID, .idmask = EXYNOS4_CPU_MASK, .map_io = exynos4_map_io, - .init_uarts = exynos4_init_uarts, .init = exynos_init, .name = name_exynos4210, }, { .idcode = EXYNOS4212_CPU_ID, .idmask = EXYNOS4_CPU_MASK, .map_io = exynos4_map_io, - .init_uarts = exynos4_init_uarts, .init = exynos_init, .name = name_exynos4212, }, { .idcode = EXYNOS4412_CPU_ID, .idmask = EXYNOS4_CPU_MASK, .map_io = exynos4_map_io, - .init_uarts = exynos4_init_uarts, .init = exynos_init, .name = name_exynos4412, }, { @@ -602,16 +598,3 @@ static int __init exynos_init(void) return device_register(&exynos4_dev); } - -/* uart registration process */ - -static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no) -{ - struct s3c2410_uartcfg *tcfg = cfg; - u32 ucnt; - - for (ucnt = 0; ucnt < no; ucnt++, tcfg++) - tcfg->has_fracval = 1; - - s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no); -} diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c index 79d10fc..3e5c461 100644 --- a/arch/arm/plat-samsung/init.c +++ b/arch/arm/plat-samsung/init.c @@ -87,7 +87,7 @@ void __init s3c24xx_init_clocks(int xtal) } /* uart management */ - +#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS) static int nr_uarts __initdata = 0; static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS]; @@ -134,11 +134,12 @@ void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no) if (cpu == NULL) return; - if (cpu->init_uarts == NULL) { + if (cpu->init_uarts == NULL && IS_ENABLED(CONFIG_SAMSUNG_ATAGS)) { printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n"); } else (cpu->init_uarts)(cfg, no); } +#endif static int __init s3c_arch_init(void) { @@ -152,8 +153,9 @@ static int __init s3c_arch_init(void) ret = (cpu->init)(); if (ret != 0) return ret; - +#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS) ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts); +#endif return ret; }