From patchwork Thu Nov 15 15:11:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10684605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25B3F109C for ; Thu, 15 Nov 2018 15:15:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 155972CA6C for ; Thu, 15 Nov 2018 15:15:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 096882CABF; Thu, 15 Nov 2018 15:15:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 475622CAB0 for ; Thu, 15 Nov 2018 15:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=OVtn3nC2aXkIqeWkHI+MtR73xStv7XFs2oAfQbybXew=; b=iGXQFZtwPSPPd9KpB1cdXLFMt6 k2yCPjRi7+CjQzpz1+hZVUum0mzv9O9JNUSDjRWCCmwDxQuqpihfZTWAUa4OHQYUhSdRDonm9oJs/ 4aMBe+URBCVoJGddDaRFyOyiXEHuCEv01T0jcy5CCE0vHZaf1oB5DWrgib4NFQfHxgNf/2BeIl4PJ xCVoJp2/s1EHlAFoZaKYnPypi9lxMvUUrvT5OnhIebDYo7Kyl+DEUv/ExrOFeClsBEJvBrZ9hgOuM 0vnK49ByVgjogmwJ/Ny5PKRul7OYHNdBaXLgJLGVrJ3Z039d5KvlSWSOXphzmoBjClb3UO1SFQxWj Z3L84KYg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNJMB-0000pc-JJ; Thu, 15 Nov 2018 15:14:59 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNJKL-0007d5-Ua for linux-arm-kernel@bombadil.infradead.org; Thu, 15 Nov 2018 15:13:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-reply-to:Message-id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JBJR81GnQ7cDGFh+5OLXFWkoCbExnC+5nkP6rmhEZgg=; b=QZ/waVelN2v5nq6XlkHBa4LBc ZwABHZ/nkv2dfD4nNNigXqWqOZfC8P8v3j2AWJHWUKtrLFlCTdOmP6OYtu8lF1efeTC/0nRIc8ihS pvPgQ+etPiLclwv8E4cnADxhXpAc84LOSHVjQc5hswReCW8melOKpguoA37TRLU29O3YwDxoW4YNZ p+jgcP+7xUkUHT+UzUVcYU+INOJ/Lwa4u670N44IkFf8kx8i+rzE72eBY5/n1brQptKlbX1CWn0V4 2GW53pgMVhdEu6g9Hxct76+Yd8FRKIW8loFMbIfKbPGQiYqXgHZaSWApCF5KUnaBZaIpo2UTtFPEH NUlcjREqw==; Received: from mailout1.samsung.com ([203.254.224.24]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNJKI-0001sd-NA for linux-arm-kernel@lists.infradead.org; Thu, 15 Nov 2018 15:13:04 +0000 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20181115151241epoutp019cd3cc2d2447bf64356a4496d8fcb06e~nVOoKZ5w-0617906179epoutp01R; Thu, 15 Nov 2018 15:12:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20181115151241epoutp019cd3cc2d2447bf64356a4496d8fcb06e~nVOoKZ5w-0617906179epoutp01R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1542294761; bh=JBJR81GnQ7cDGFh+5OLXFWkoCbExnC+5nkP6rmhEZgg=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=Kbm/FROGASnyGfp1S9Nj4TD/gDK79qsdqdHXvmdea5qwARcP+vJNQPOEc+BYoM0q3 iI3aVLIW3HjsZ2UnydjUa0LMC974zLT7LXw0sVl1/uq4bpYmaJooFh+81DEfac4KDj EJmRNt3AQG5R91erUfsIBj/Q11gsV5+QG1ZB4c10= Received: from epsmges2p2.samsung.com (unknown [182.195.42.70]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20181115151240epcas2p3b99ee0c45bb26570563668924f0217cd~nVOm1GJvK2217522175epcas2p3L; Thu, 15 Nov 2018 15:12:40 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 32.2C.04407.8EC8DEB5; Fri, 16 Nov 2018 00:12:40 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20181115151238epcas2p1dd0da525c3cd2a7a4d153ced264b5b8f~nVOlpdmNH3092430924epcas2p1G; Thu, 15 Nov 2018 15:12:38 +0000 (GMT) X-AuditID: b6c32a46-7a1ff70000001137-4f-5bed8ce82408 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id F4.28.03702.6EC8DEB5; Fri, 16 Nov 2018 00:12:38 +0900 (KST) Received: from AMDC3058.DIGITAL.local ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PI8006WJQ7YQ380@mmp2.samsung.com>; Fri, 16 Nov 2018 00:12:38 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Krzysztof Kozlowski Subject: [PATCH 7/9] ARM: SAMSUNG: remove samsung_rev() Date: Thu, 15 Nov 2018 16:11:36 +0100 Message-id: <1542294698-17470-8-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1542294698-17470-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHIsWRmVeSWpSXmKPExsWy7bCmue6LnrfRBt/2slncWneO1eLvpGPs FhtnrGe1uP7lOavFwmnLGS36H79mtjh/fgO7xabH11gtLu+aw2Yx4/w+JouXR34wWqw9cpfd YtHWL+wOvB6/f01i9Lh1p95j06pONo/NS+o93u+7yubRt2UVo8fnTXIB7FFcNimpOZllqUX6 dglcGZsndjEWzFOpuDBrGlsD4065LkZODgkBE4kpr7YzdjFycQgJ7GCUeP94IxOE851R4saF T4wwVU/XfoWq2sAocXnGahaQhJDAL0aJxom1IDabgJXExPZVYA0iApoS1/9+ZwWxmQWOMkss uSIBYgsLmEs8fLSWGcRmEVCV2P1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zsCiJ8/LnH4sUEkhPLEnNTk0tSC2CyTJxcEo1MK6b ePRx2NcSFYkP6bYvTJYLqwjLrPA+ErM59eM2X50SP5/rSwKOeOr+9Uu4uayhJeCHWMSS/XcF w2969WwNy/f//vXy3qi362T3lfruNAkV1DkoLtv3+uvhKH12nU+pT1SmfpnPMuXd0sCF1zc4 1izve7qucZ0x9/F2+6KX4YnsVZfT9vIfSlBiKc5INNRiLipOBADMn1QpRgIAAA== X-CMS-MailID: 20181115151238epcas2p1dd0da525c3cd2a7a4d153ced264b5b8f X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20181115151238epcas2p1dd0da525c3cd2a7a4d153ced264b5b8f References: <1542294698-17470-1-git-send-email-b.zolnierkie@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181115_151303_226184_B25162EF X-CRM114-Status: GOOD ( 21.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Arnd Bergmann , Chanwoo Choi , Pankaj Dubey , b.zolnierkie@samsung.com, Javier Martinez Canillas , linux-kernel@vger.kernel.org, Markus Reichl , Andrzej Hajda , Kukjin Kim , linux-arm-kernel@lists.infradead.org, Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP * Add soc_dev_is_exynos4210_rev11() helper. * Convert exynos_boot_vector_{addr,flag}() to use chipid driver. * Remove no longer needed samsung_rev() & co. Signed-off-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/common.h | 6 +----- arch/arm/mach-exynos/exynos.c | 6 ++++++ arch/arm/mach-exynos/pm.c | 8 ++++---- arch/arm/plat-samsung/cpu.c | 10 ---------- arch/arm/plat-samsung/include/plat/cpu.h | 2 -- 5 files changed, 11 insertions(+), 21 deletions(-) diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 1dfd434..322d6eb 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -13,14 +13,11 @@ #include extern bool soc_dev_is_exynos3250(void); +extern bool soc_dev_is_exynos4210_rev10(void); extern bool soc_dev_is_exynos4210_rev11(void); extern bool soc_dev_is_exynos4412(void); extern bool soc_dev_is_exynos542x(void); -#define EXYNOS4210_REV_0 (0x0) -#define EXYNOS4210_REV_1_0 (0x10) -#define EXYNOS4210_REV_1_1 (0x11) - extern u32 cp15_save_diag; extern u32 cp15_save_power; @@ -81,7 +78,6 @@ static inline void exynos_scu_enable(void) { } extern void exynos_set_delayed_reset_assertion(bool enable); -extern unsigned int samsung_rev(void); extern void exynos_core_restart(u32 core_id); extern int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr); extern int exynos_get_boot_addr(u32 core_id, unsigned long *boot_addr); diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 463e457..ca367b7 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -29,6 +29,11 @@ { /* sentinel */ } }; +static const struct soc_device_attribute exynos4210_rev10_soc_id[] = { + { .soc_id = "EXYNOS4210", .revision = "10" }, + { /* sentinel */ } +}; + static const struct soc_device_attribute exynos4210_rev11_soc_id[] = { { .soc_id = "EXYNOS4210", .revision = "11" }, { /* sentinel */ } @@ -59,6 +64,7 @@ } SOC_DEV_IS_EXYNOS(3250); +SOC_DEV_IS_EXYNOS(4210_rev10); SOC_DEV_IS_EXYNOS(4210_rev11); SOC_DEV_IS_EXYNOS(4412); SOC_DEV_IS_EXYNOS(542x); diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 88c1bce..0109dc4 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -26,18 +26,18 @@ static inline void __iomem *exynos_boot_vector_addr(void) { - if (samsung_rev() == EXYNOS4210_REV_1_1) + if (soc_dev_is_exynos4210_rev11()) return pmu_base_addr + S5P_INFORM7; - else if (samsung_rev() == EXYNOS4210_REV_1_0) + else if (soc_dev_is_exynos4210_rev10()) return sysram_base_addr + 0x24; return pmu_base_addr + S5P_INFORM0; } static inline void __iomem *exynos_boot_vector_flag(void) { - if (samsung_rev() == EXYNOS4210_REV_1_1) + if (soc_dev_is_exynos4210_rev11()) return pmu_base_addr + S5P_INFORM6; - else if (samsung_rev() == EXYNOS4210_REV_1_0) + else if (soc_dev_is_exynos4210_rev10()) return sysram_base_addr + 0x20; return pmu_base_addr + S5P_INFORM1; } diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/plat-samsung/cpu.c index e1ba88b..c633a24 100644 --- a/arch/arm/plat-samsung/cpu.c +++ b/arch/arm/plat-samsung/cpu.c @@ -14,13 +14,6 @@ #include unsigned long samsung_cpu_id; -static unsigned int samsung_cpu_rev; - -unsigned int samsung_rev(void) -{ - return samsung_cpu_rev; -} -EXPORT_SYMBOL(samsung_rev); void __init s3c64xx_init_cpu(void) { @@ -34,15 +27,12 @@ void __init s3c64xx_init_cpu(void) samsung_cpu_id = readl_relaxed(S3C_VA_SYS + 0xA1C); } - samsung_cpu_rev = 0; - pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id); } void __init s5p_init_cpu(const void __iomem *cpuid_addr) { samsung_cpu_id = readl_relaxed(cpuid_addr); - samsung_cpu_rev = samsung_cpu_id & 0xFF; pr_info("Samsung CPU ID: 0x%08lx\n", samsung_cpu_id); } diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index fadcddb..02d7f99 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h @@ -111,8 +111,6 @@ extern void s3c_init_cpu(unsigned long idcode, extern void s3c64xx_init_cpu(void); extern void s5p_init_cpu(const void __iomem *cpuid_addr); -extern unsigned int samsung_rev(void); - extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no); extern void s3c24xx_init_clocks(int xtal);