From patchwork Sat May 10 07:20:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4147261 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 412429F23C for ; Sat, 10 May 2014 07:05:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5DCBB20263 for ; Sat, 10 May 2014 07:05:04 +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 80932201BB for ; Sat, 10 May 2014 07:05:03 +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 1Wj1J3-0002Re-BX; Sat, 10 May 2014 07:02:49 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wj1Im-0002MD-WE for linux-arm-kernel@lists.infradead.org; Sat, 10 May 2014 07:02:33 +0000 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5C00DGAJJJEU90@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Sat, 10 May 2014 16:02:07 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.51]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 2A.48.11496.FEECD635; Sat, 10 May 2014 16:02:07 +0900 (KST) X-AuditID: cbfee691-b7f3e6d000002ce8-72-536dceef9f06 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F5.F6.27725.EEECD635; Sat, 10 May 2014 16:02:07 +0900 (KST) Received: from localhost.localdomain ([12.36.165.191]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5C00A3FJJBOO70@mmp1.samsung.com>; Sat, 10 May 2014 16:02:06 +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 v3 3/6] ARM: EXYNOS: Remove soc_is_exynos4/5 from exynos.c Date: Sat, 10 May 2014 16:20:16 +0900 Message-id: <1399706419-13976-4-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1399706419-13976-1-git-send-email-pankaj.dubey@samsung.com> References: <1399706287-13919-1-git-send-email-y@samsung.com> <1399706419-13976-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42I5/e+Zse77c7nBBs+/cFr8nXSM3aJ3wVU2 i02Pr7FaXN41h81ixvl9TBa3L/NaLNr6hd1i/YzXLBbHZixhdOD0aGnuYfP4/WsSo8eda3vY PDYvqffo27KK0ePzJrkAtigum5TUnMyy1CJ9uwSujHfzJ7IXrJGveLN1OVMD4zGpLkZODgkB E4l5j78wQdhiEhfurWfrYuTiEBJYxijRMLebEabo3sy1rBCJRYwSM18dhnLamCTaF79mBali E9CVePJ+LjOILSKQLXGl8T4zSBGzwD6gjvapLCAJYQEvie3vb4AVsQioSqx7+htsBa+Ah8TO OxOA4hxA6xQk5kyyAQlzCnhK7PjRxQZiCwnUSCxveMEIMlNCYBu7xNo3b9kg5ghIfJt8iAWi V1Zi0wFmiKslJQ6uuMEygVF4ASPDKkbR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yQy01 LpzhPCs51ftaus5HRqUXU12qzrqc8In7fquvI3LD1pCXqv/FVHL+lPDNED0ckty74nHYNL6y lXJ/Xyb12rDcTL7AOLnTXyk0szRu9a0ln5bdleF2NHeJ/uB575f65paXaz/G3dgkmmIaLabE UpyRaKjFXFScCADZoVst9AIAAA== 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-20140510_000233_201497_5BA00357 X-CRM114-Status: GOOD ( 12.74 ) 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 }