From patchwork Wed Mar 20 08:19:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 160653 Delivered-To: patch@linaro.org Received: by 2002:a02:1cc4:0:0:0:0:0 with SMTP id c187csp495967jac; Wed, 20 Mar 2019 01:20:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxqh0khabrlNUt6uH8jEwtDcCN98JsduwYfaEasCt+Is0rrvZP3nOvbPpVEmoljXLyUEY3 X-Received: by 2002:a17:902:681:: with SMTP id 1mr6702715plh.31.1553070003922; Wed, 20 Mar 2019 01:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553070003; cv=none; d=google.com; s=arc-20160816; b=oiR+9alccq0QkxjcPoPZdO9nlAIJgGjR6rc/6COpOtcaJgfvFQt/ob1pR3HnWxlwUr YFFvYHv7QZMpmTKssif+BwlKrZTDfNV9OB/6PogedVKsIedNHl6cSuFgcHbrg/aAYx1M KCbm+5rY87X5i+yMIOQu8hfjmAMBrdGrxMM6v+09ky3XahGeBrgqeoA9mqF+N0/h/oL8 dKamLNOG6Z+0p+VZsSSJMnvraLHOZnPUigttToDnpfKsE9P7MwK3ICDrZ8aSGJtEbb4M Aneh1e4pE0CxbaS5xqgJZNLpP25ItXpraXKx84B/irTpDvsYbDdMXr1k6+AEy2AQGXX/ k3rw== 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=r54xcfAnprlZiR85YvV1PngDro5r+JjbMKFWPgi7F0o=; b=K4qS24y1csyUuNeP5yJCoxRkLHkyLfYN4kMnTg3BfIhz0hpP3T+xhLJHFx0zaCccsK cKIavWYvP2FjdRug4nUDmd+RcgpaDsI2UMd8iesovdjcnDcAOlzLY807mNCGOE7piSDx LT1K6GnLPxkwZ/wevX7vfa88OFeBjmhYhiwMlU8tdL07vMV+qQc0/50KIuuG85KEbMax GlzWy3/IluLHZV4o/r9mbOLetuEQ7dgMIQXeDvWUEo4YuhJmxMwZHhCghQz0ciqwTg9k uPQa9ZZMQzxHdXS4Wb1EGnVSvJj5zuNIw8a9k3L+7YH5D/WcZssjOM2IkSFMKUTJDOPm rIOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=gqBNP2hn; 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 j26si1163166pfe.175.2019.03.20.01.20.03; Wed, 20 Mar 2019 01:20:03 -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=gqBNP2hn; 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 S1726123AbfCTIUD (ORCPT + 3 others); Wed, 20 Mar 2019 04:20:03 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55544 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbfCTIUD (ORCPT ); Wed, 20 Mar 2019 04:20:03 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190320082001euoutp01c3abbe2462871466a1c1637f6863926e~NnPAZmboZ0236102361euoutp01L; Wed, 20 Mar 2019 08:20:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190320082001euoutp01c3abbe2462871466a1c1637f6863926e~NnPAZmboZ0236102361euoutp01L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553070001; bh=r54xcfAnprlZiR85YvV1PngDro5r+JjbMKFWPgi7F0o=; h=From:To:Cc:Subject:Date:References:From; b=gqBNP2hnjgyICYK5B+qzKiy1MMG8mc94WmtHh1HFiKXb1GEUWv+7ZqfeJ0MQIDdBi TWr7VZteI1N+37qzZO72iZqM/lj4hTu7wp+G2ql+kzq7Jd+A/X3R8h54F7GFzUoHB1 GDnPtrp/gwnYOV4sUnhDzpmPPjw5PRXje5FODME8= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190320082001eucas1p294c8dfbb948b7e7684fd08eedf790037~NnO-8i4EK0648406484eucas1p2i; Wed, 20 Mar 2019 08:20:01 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 05.B7.04441.0B7F19C5; Wed, 20 Mar 2019 08:20:00 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190320082000eucas1p2420d171a017e4fc92dae89121d662aba~NnO-FlYF31652716527eucas1p2A; Wed, 20 Mar 2019 08:20:00 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-e9-5c91f7b0bba2 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 33.24.04284.FA7F19C5; Wed, 20 Mar 2019 08:19:59 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PON00CYVOH7CV70@eusync1.samsung.com>; Wed, 20 Mar 2019 08:19:59 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Seung-Woo Kim Subject: [PATCH v2] ARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs Date: Wed, 20 Mar 2019 09:19:43 +0100 Message-id: <20190320081943.11800-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLLMWRmVeSWpSXmKPExsWy7djPc7obvk+MMXj/yMRi44z1rBbnz29g t5hxfh+Txdojd4GsyS/ZHFg9Nq3qZPPo27KK0ePzJrkA5igum5TUnMyy1CJ9uwSujLZpn9kK 7klVbN50gbGB8aFYFyMnh4SAiUTnsh+MILaQwApGia07BboYuYDsz4wSz+9NYoUp2vPkPxtE YhmjxNU3C6CcBiaJCXM+MoNUsQkYSnS97WIDsUUEVCU+ty1gByliFtjBKPFg+Rx2kISwQKBE 1/33LCA2C1DRw67fYCt4BWwlmo+fYIRYJy+xesMBZpBmCYGzrBL7/u4CSnAAOS4Sv1oVIGpk JDo7DjJB1DQzSjw8t5YdwulhlLjcNANqkrXE4eMXwTYwC/BJTNo2nRliEK9ER5sQRImHxKOf t5khARAr8aDtJeMERvEFjAyrGMVTS4tz01OLDfNSy/WKE3OLS/PS9ZLzczcxAiPl9L/jn3Yw fr2UdIhRgINRiYe34c2EGCHWxLLiytxDjBIczEoivEWJE2OEeFMSK6tSi/Lji0pzUosPMUpz sCiJ81YzPIgWEkhPLEnNTk0tSC2CyTJxcEo1MO56dn9jXUH7Boa+qIJs8cwnt6Yn3z+7xmlm 4n2WllklFa+qTlU6iezfrHbMZmHT5onvJwmZ/dH6XMl4SX9FVP9/ExazhMxfeQeF1b6w+nhO b0pLO2+hIbFOpEknWYTdjmF7ZFDK8d2LFva5TggOK5y6idVWZmVG8sxfy0/liSaVeJxbmZp1 WYmlOCPRUIu5qDgRAADKRByQAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDJMWRmVeSWpSXmKPExsVy+t/xy7rrv0+MMZj81MRi44z1rBbnz29g t5hxfh+Txdojd4GsyS/ZHFg9Nq3qZPPo27KK0ePzJrkA5igum5TUnMyy1CJ9uwSujLZpn9kK 7klVbN50gbGB8aFYFyMnh4SAicSeJ//Zuhi5OIQEljBKTJk6nQnCaWKSmNB4iB2kik3AUKLr bRcbiC0ioCrxuW0BO0gRs8AuRonW5SdZQBLCAv4SVy4cYwSxWYCKHnb9ZgWxeQVsJZqPn2CE WCcvsXrDAeYJjFwLGBlWMYqklhbnpucWG+oVJ+YWl+al6yXn525iBPp527Gfm3cwXtoYfIhR gINRiYe34umEGCHWxLLiytxDjBIczEoivEWJE2OEeFMSK6tSi/Lji0pzUosPMUpzsCiJ8543 qIwSEkhPLEnNTk0tSC2CyTJxcEo1MGrKiSUESpxLurJInctE7czj78KWicn+P2rWeHLP/sAz /e3HSruN5rfTJnUmGhxc3ZG7dZvGpbmyeuEXORzaS9pOuqj4xPPzt4jJWXvIOhY03hDU8WL+ 7LQx7RhvXPPHQ1W3rz5IP986N35T6NmHMrYO1wU1JUWyOKMDJd46MV+tTnj2gzlKiaU4I9FQ i7moOBEApSUnO+8BAAA= X-CMS-MailID: 20190320082000eucas1p2420d171a017e4fc92dae89121d662aba CMS-TYPE: 201P X-CMS-RootMailID: 20190320082000eucas1p2420d171a017e4fc92dae89121d662aba 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 --- v2: rebased on top of the current exynos-next --- arch/arm/mach-exynos/Kconfig | 12 +++--------- arch/arm/mach-exynos/Makefile | 2 +- arch/arm/mach-exynos/suspend.c | 12 ++++-------- 3 files changed, 8 insertions(+), 18 deletions(-) -- 2.17.1 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 6975feeae2be..63996b3b5014 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -269,10 +269,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"); @@ -352,8 +350,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; @@ -456,8 +453,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) { /*