From patchwork Tue May 6 08:51:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4120051 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 E0F069F489 for ; Tue, 6 May 2014 08:36:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A4212012F for ; Tue, 6 May 2014 08:36:43 +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 217CB201FA for ; Tue, 6 May 2014 08:36:42 +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 1WhapE-0002nu-LD; Tue, 06 May 2014 08:34:08 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Whaon-0002Zo-G9 for linux-arm-kernel@lists.infradead.org; Tue, 06 May 2014 08:33:42 +0000 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5500AIZ93F0B40@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 06 May 2014 17:33:15 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.48]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 5B.C3.18501.B4E98635; Tue, 06 May 2014 17:33:15 +0900 (KST) X-AuditID: cbfee68d-b7f4e6d000004845-92-53689e4b878e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 7E.83.27725.B4E98635; Tue, 06 May 2014 17:33:15 +0900 (KST) Received: from localhost.localdomain ([12.36.165.191]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5500HCR939SX00@mmp2.samsung.com>; Tue, 06 May 2014 17:33:15 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/6] ARM: EXYNOS: remove soc_is_exynos4/5 from exynos.c Date: Tue, 06 May 2014 17:51:19 +0900 Message-id: <1399366282-4191-4-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1399366282-4191-1-git-send-email-pankaj.dubey@samsung.com> References: <1399366282-4191-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42I5/e+Zga73vIxgg+bXChZ/Jx1jt+hdcJXN YtPja6wWl3fNYbOYcX4fk8Xty7wWi7Z+YbdYP+M1i8WxGUsYHTg9Wpp72Dx+/5rE6HHn2h42 j81L6j36tqxi9Pi8SS6ALYrLJiU1J7MstUjfLoEr4938iewFa+Qr3mxdztTAeEyqi5GTQ0LA RGLui2OsELaYxIV769m6GLk4hASWMUr8XNTHBFN0/955qMR0Rokf3yczQThtTBKXm14yglSx CehKPHk/lxnEFhHIlrjSeJ8ZpIhZYB+jxMz2qSwgCWEBL4nWn//B9rEIqErs+HwQLM4r4C7R PPc0UAMH0DoFiTmTbEDCnAIeEm+uvQUrFwIq2XH/NtgVEgKb2CVO7nzCBjFHQOLb5EMsEL2y EpsOMENcLSlxcMUNlgmMwgsYGVYxiqYWJBcUJ6UXGeoVJ+YWl+al6yXn525ihM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MLHlpxP5dYpdT4o2T7ou+rLoi9yYk3F5j lXv5zLyUXMWFV7ec3G9t8c26mu3jfaXi8MpXISq+Ga+PrpEV/OblFcod+HeRgZ5lu2yMtBJL cUaioRZzUXEiAGoMzpr0AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140506_013341_719822_7247F976 X-CRM114-Status: GOOD ( 12.58 ) X-Spam-Score: -5.7 (-----) Cc: kgene.kim@samsung.com, Russell King , arnd@arndb.de, Pankaj Dubey , t.figa@samsung.com, Thomas Abraham X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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.5 required=5.0 tests=BAYES_00,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 usage of soc_is_exynos4/5 from exynos.c. For this we need to separate machine descriptors for exynos4 and exynos5. While doing this patch does some consolidation also. CC: Russell King CC: Thomas Abraham Signed-off-by: Pankaj Dubey --- arch/arm/mach-exynos/exynos.c | 52 +++++++++++++++++++----------- arch/arm/plat-samsung/include/plat/cpu.h | 3 -- 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 09063ee..9902e52 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -202,20 +202,6 @@ static const struct of_device_id exynos_dt_pmu_match[] = { {}, }; -/* - * exynos_map_io - * - * register the standard cpu IO areas - */ -static void __init exynos_map_io(void) -{ - if (soc_is_exynos4()) - iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); - - if (soc_is_exynos5()) - iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); -} - static void __init exynos_init_io(void) { debug_ll_io_init(); @@ -224,8 +210,18 @@ static void __init exynos_init_io(void) /* detect cpu id and rev. */ s5p_init_cpu(S5P_VA_CHIPID); +} + +static void __init exynos5_init_io(void) +{ + exynos_init_io(); + iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); +} - exynos_map_io(); +static void __init exynos4_init_io(void) +{ + exynos_init_io(); + iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); } struct bus_type exynos_subsys = { @@ -293,11 +289,15 @@ static void __init exynos_dt_machine_init(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } -static char const *exynos_dt_compat[] __initconst = { +static char const *exynos4_dt_compat[] __initconst = { "samsung,exynos4", "samsung,exynos4210", "samsung,exynos4212", "samsung,exynos4412", + NULL +}; + +static char const *exynos5_dt_compat[] __initconst = { "samsung,exynos5", "samsung,exynos5250", "samsung,exynos5420", @@ -321,15 +321,29 @@ static void __init exynos_reserve(void) #endif } -DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") +DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") + /* Maintainer: Thomas Abraham */ + /* Maintainer: Kukjin Kim */ + .smp = smp_ops(exynos_smp_ops), + .map_io = exynos5_init_io, + .init_early = exynos_firmware_init, + .init_machine = exynos_dt_machine_init, + .init_late = exynos_init_late, + .dt_compat = exynos5_dt_compat, + .restart = exynos_restart, + .reserve = exynos_reserve, +MACHINE_END + + +DT_MACHINE_START(EXYNOS4_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") /* Maintainer: Thomas Abraham */ /* Maintainer: Kukjin Kim */ .smp = smp_ops(exynos_smp_ops), - .map_io = exynos_init_io, + .map_io = exynos4_init_io, .init_early = exynos_firmware_init, .init_machine = exynos_dt_machine_init, .init_late = exynos_init_late, - .dt_compat = exynos_dt_compat, + .dt_compat = exynos4_dt_compat, .restart = exynos_restart, .reserve = exynos_reserve, MACHINE_END diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 5992b8d..18a9a00 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h @@ -166,9 +166,6 @@ IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK) # define soc_is_exynos5440() 0 #endif -#define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4212() || \ - soc_is_exynos4412()) -#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5420()) #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }