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: 160753 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp443767jan; Wed, 20 Mar 2019 23:32:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqycdbPGzNMGbo8rO8PkOByTuyCdUXIZFSgnyF2EPw7rnJXjoDtV70C6OeCqGMspevFCQ5yu X-Received: by 2002:a17:902:274a:: with SMTP id j10mr1875006plg.277.1553149925376; Wed, 20 Mar 2019 23:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553149925; cv=none; d=google.com; s=arc-20160816; b=rQal5l0VRyG4K9/ew/pLzrhdA2iabgvOQnVJ8zBCuzboplV65nPMpwoT3xW1aY83OG Jgx7WgKpQJFQwjvLfuI9xy1goGkHOmZ6GjdB+ty0QQx/UZJ+sWNv318naF4RmD3npoop gyehA7sguCAagXM96eakkQsTU/yIfpO6M1Kb99Jlo4cDlL3lKXNT8MhjffdpMhHSVLff 0MXI431epP2II6xzDsTDAcLfXz+1dWGg/Uxw/CAHb9Rn6KmVD319OrOI7v76JYw30Btj nqe8zetevVzt3RellDPsaKUazyqyqZ8NXGgIjtSG9whxHt13TqHkqR3SCso4WZBIPAXa 9FLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=mHAHxhOoyyPwrK22Udyur017m6ry0+BLz7mjNDVZoQ0=; b=XgRwoN15Q71W+M8vjfGT223c9GqoA7XlA3ucEwaoqoqI0/mtSGogxH8gZesoB2HKKY lz+zOGLFzDUAkdRgoVYMEvzRAdTZzd2r8Vz/F/PDQac68JKMLAWyDD69YjFDZrNB4gLZ Mq5ZVwZnZNCz+S/9g8Z6H6FdOAaFgNSqmM1JzM9DOVG3vR9ptwo/5XZ2e0voO+N/tx/t Ca4Cm+f3J2plv2T4n09CSHDYscOe2TuLOvVUwgChyp+PzLNrki7cCzaL3vlWqTohnd5L 0L87gpV3TnpdanQ11ggaR56Xy6Tb1vX/qYFM1wFAuuFzmA42VLeck2dlvGq52GWWYa9L elOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="Dl/6gXiR"; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n19si3045695pgj.426.2019.03.20.23.32.05; Wed, 20 Mar 2019 23:32:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="Dl/6gXiR"; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726212AbfCUGcE (ORCPT + 3 others); 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 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(-) -- 2.17.1 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) { /*