From patchwork Thu Mar 21 06:31:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10862961 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 5D13B13B5 for ; Thu, 21 Mar 2019 06:32:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37EFB29FFD for ; Thu, 21 Mar 2019 06:32:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 265172A017; Thu, 21 Mar 2019 06:32:06 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 650CB29FFD for ; Thu, 21 Mar 2019 06:32:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726212AbfCUGcE (ORCPT ); Thu, 21 Mar 2019 02:32:04 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:53351 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725800AbfCUGcE (ORCPT ); Thu, 21 Mar 2019 02:32:04 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190321063202euoutp02ff83329d76e3b76074abed4bce65c5f9~N5aA4ELFa0068200682euoutp02R; Thu, 21 Mar 2019 06:32:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190321063202euoutp02ff83329d76e3b76074abed4bce65c5f9~N5aA4ELFa0068200682euoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553149922; bh=mHAHxhOoyyPwrK22Udyur017m6ry0+BLz7mjNDVZoQ0=; h=From:To:Cc:Subject:Date:References:From; b=Dl/6gXiR/o2XV9VLu1Jq2HVvDN5Odz4IK3s+IBSu+KHV4So1hN54ef6QYN5LQMXbo t5jsjLscrQb5HaPYBe4JgaQUkF/Bd450cBRuG3MZakqCVjUXe8ZgVIgTUbkIpJMo+O JO/HNY2CAW/TO2r62DnTpNN8SRUGTc9ezdHTFGM4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190321063202eucas1p103da4b33c8776eab2ae9d23935d9c0eb~N5aAPChw12110321103eucas1p1x; Thu, 21 Mar 2019 06:32:02 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id EC.A3.04441.1EF239C5; Thu, 21 Mar 2019 06:32:01 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190321063201eucas1p28bcd6bd50cf70e92ba07db5f0424677f~N5Z-oIbcq1276012760eucas1p2W; Thu, 21 Mar 2019 06:32:01 +0000 (GMT) X-AuditID: cbfec7f2-5e3ff70000001159-3e-5c932fe1d896 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 7D.F5.04128.1EF239C5; Thu, 21 Mar 2019 06:32:01 +0000 (GMT) Received: from AMDC2765.digital.local ([106.120.51.73]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0POP00HO7E58VX10@eusync4.samsung.com>; Thu, 21 Mar 2019 06:32:01 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Seung-Woo Kim Subject: [PATCH v3] ARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs Date: Thu, 21 Mar 2019 07:31:52 +0100 Message-id: <20190321063152.4819-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsWy7djP87oP9SfHGPQdMrbYOGM9q8X58xvY LWac38dksfbIXSBr8ks2B1aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7MstUjfLoEr49rsk6wF 55QqPkxbwN7AeEO2i5GTQ0LAROLV2evsXYxcHEICKxgl1rW8YoRwPjNK7J/9ggmm6sCNbqjE MkaJ7fduMkM4/xklzu2azQZSxSZgKNH1tgvMFhFQlfjctgBsLrPADkaJB8vnsIMkhAUCJY5P awArYgEquvtyMiOIzStgI/F3VwcbxDp5idUbDjBD2CdZJT49FoawXSTmTvzAAmHLSFye3M0C skBCoJlR4uG5tewQTg+jxOWmGYwQVdYSh49fZAWxmQX4JCZtmw40lQMozivR0SYEUeIhcej7 H7DFQgKxEjuvXmeZwCi+gJFhFaN4amlxbnpqsWFearlecWJucWleul5yfu4mRmCsnP53/NMO xq+Xkg4xCnAwKvHwRjhMihFiTSwrrsw9xCjBwawkwhuhBBTiTUmsrEotyo8vKs1JLT7EKM3B oiTOW83wIFpIID2xJDU7NbUgtQgmy8TBKdXAGPPIfb6/7ILcmV/vCCfvPmAwbXt+9MaagJmn lu27z7F+1o0u4bnhctbW3zpmhc1veOZ/239Te2y80Ytlm/Lvuyhmbnz9bKugeWbu20teJcck AtWSvsx7bOPItNPw8BFbh67rz7XLip9Pa47Jt6rfUem8ok9w9bL/frMsF/voq3YetmYJV7l0 WomlOCPRUIu5qDgRAJlS0YWRAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDJMWRmVeSWpSXmKPExsVy+t/xa7oP9SfHGKy/zW2xccZ6Vovz5zew W8w4v4/JYu2Ru0DW5JdsDqwem1Z1snn0bVnF6PF5k1wAcxSXTUpqTmZZapG+XQJXxrXZJ1kL zilVfJi2gL2B8YZsFyMnh4SAicSBG92MXYxcHEICSxglHq3/zQrhNDJJTHh5gAWkik3AUKLr bRcbiC0ioCrxuW0BO0gRs8AuRonW5SfBioQF/CWe/t/HDGKzABXdfTmZEcTmFbCR+Lurgw1i nbzE6g0HmCcwci1gZFjFKJJaWpybnltspFecmFtcmpeul5yfu4kR6Odtx35u2cHY9S74EKMA B6MSD+8Ck0kxQqyJZcWVuYcYJTiYlUR4I5SAQrwpiZVVqUX58UWlOanFhxilOViUxHnPG1RG CQmkJ5akZqemFqQWwWSZODilGhgtzzaq7dPov1P+//+Df792O6pOZuNc7uR4YW6Ym0L1r0RO s4jTZwPLDqwItA0oXn1w255YrpshDYtVgpJeZSgnRdvb8X/851tdMrdb2+ToYu+utVwq1wxZ irsbRdlKmpd3ZCXGK5o/rOGRs1R/GD5jwh07yXm7bLjtWxkL1mzoSv/Bf7+LVYmlOCPRUIu5 qDgRAOx9/ADvAQAA X-CMS-MailID: 20190321063201eucas1p28bcd6bd50cf70e92ba07db5f0424677f CMS-TYPE: 201P X-CMS-RootMailID: 20190321063201eucas1p28bcd6bd50cf70e92ba07db5f0424677f References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Support for Exynos5420/5422/5800 SoCs requires MCPM to properly boot all CPU cores on all currectly supported platforms: Peach Pit (Exynos5420), Odroid XU3/XU3lite/XU4/HC1 (Exynos5422) and Peach Pi (Exynos5800). Without it some CPU cores fail to come online. Remove then the ability to disable MCPM and make it mandatory when Exynos542x/5800 support is enabled. Signed-off-by: Marek Szyprowski --- v3: remove CONFIG_EXYNOS5420_MCPM symbol from defconfigs too v2: rebased on top of the current exynos-next --- arch/arm/configs/exynos_defconfig | 1 - arch/arm/configs/multi_v7_defconfig | 1 - arch/arm/mach-exynos/Kconfig | 12 +++--------- arch/arm/mach-exynos/Makefile | 2 +- arch/arm/mach-exynos/suspend.c | 12 ++++-------- 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig index d635edfb6ff2..c95c54284da2 100644 --- a/arch/arm/configs/exynos_defconfig +++ b/arch/arm/configs/exynos_defconfig @@ -9,7 +9,6 @@ CONFIG_MODULE_UNLOAD=y CONFIG_PARTITION_ADVANCED=y CONFIG_ARCH_EXYNOS=y CONFIG_ARCH_EXYNOS3=y -CONFIG_EXYNOS5420_MCPM=y CONFIG_SMP=y CONFIG_BIG_LITTLE=y CONFIG_NR_CPUS=8 diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index c75051b9392c..e4b5fd46fdef 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -33,7 +33,6 @@ CONFIG_MACH_BERLIN_BG2CD=y CONFIG_MACH_BERLIN_BG2Q=y CONFIG_ARCH_DIGICOLOR=y CONFIG_ARCH_EXYNOS=y -CONFIG_EXYNOS5420_MCPM=y CONFIG_ARCH_HIGHBANK=y CONFIG_ARCH_HISI=y CONFIG_ARCH_HI3xxx=y diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index b40963cf91c7..62b734a8092b 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -106,21 +106,15 @@ config SOC_EXYNOS5420 bool "SAMSUNG EXYNOS5420" default y depends on ARCH_EXYNOS5 + select MCPM + select ARM_CCI400_PORT_CTRL + select ARM_CPU_SUSPEND config SOC_EXYNOS5800 bool "SAMSUNG EXYNOS5800" default y depends on SOC_EXYNOS5420 -config EXYNOS5420_MCPM - bool "Exynos5420 Multi-Cluster PM support" - depends on MCPM && SOC_EXYNOS5420 - select ARM_CCI400_PORT_CTRL - select ARM_CPU_SUSPEND - help - This is needed to provide CPU and cluster power management - on Exynos5420 implementing big.LITTLE. - config EXYNOS_CPU_SUSPEND bool select ARM_CPU_SUSPEND diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index cd00c82a1add..fb381d69f8d1 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -18,5 +18,5 @@ plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_exynos-smc.o :=-Wa,-march=armv7-a$(plus_sec) AFLAGS_sleep.o :=-Wa,-march=armv7-a$(plus_sec) -obj-$(CONFIG_EXYNOS5420_MCPM) += mcpm-exynos.o +obj-$(CONFIG_SOC_EXYNOS5420) += mcpm-exynos.o CFLAGS_mcpm-exynos.o += -march=armv7-a diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index c521af625e40..712669e648c4 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -268,10 +268,8 @@ static int exynos5420_cpu_suspend(unsigned long arg) unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); - if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) { - mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume); - mcpm_cpu_suspend(); - } + mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume); + mcpm_cpu_suspend(); pr_info("Failed to suspend the system\n"); @@ -351,8 +349,7 @@ static void exynos5420_pm_prepare(void) exynos_pm_enter_sleep_mode(); /* ensure at least INFORM0 has the resume address */ - if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) - pmu_raw_writel(__pa_symbol(mcpm_entry_point), S5P_INFORM0); + pmu_raw_writel(__pa_symbol(mcpm_entry_point), S5P_INFORM0); tmp = pmu_raw_readl(EXYNOS_L2_OPTION(0)); tmp &= ~EXYNOS_L2_USE_RETENTION; @@ -455,8 +452,7 @@ static void exynos5420_prepare_pm_resume(void) mpidr = read_cpuid_mpidr(); cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); - if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) - WARN_ON(mcpm_cpu_powered_up()); + WARN_ON(mcpm_cpu_powered_up()); if (IS_ENABLED(CONFIG_HW_PERF_EVENTS) && cluster != 0) { /*