From patchwork Tue Apr 9 09:56:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 161964 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4741274jan; Tue, 9 Apr 2019 02:56:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqx467dIfbss/mfOsEXOu3Um5QmviFv4GRSJ71GTxdwe5qVofYJx6MXeQ6EWskUX4rd74j9o X-Received: by 2002:a62:6e05:: with SMTP id j5mr34522432pfc.5.1554803781310; Tue, 09 Apr 2019 02:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554803781; cv=none; d=google.com; s=arc-20160816; b=MNZrdLv4CsGy6RNtORL+CvW70YSWv5ItPBmCMaHw6mlYwzRCGsacv0/WXlqg4PCLU1 V8l74mpDlFeUm3veUG/OfKfQdH4Z4iw7M37v+InzgjvjsIxFLMZE7T1jiip+db+LN67o rzJqRHIY4+RVHojosa1funuyRQVZqHHnhXkfXsIn4R8xtxPA3e3OjMUWCvHMNog3fT71 2l6PBYpg1RQhD8U0OHuMJwq9zIPiJtppecGiWJ5iHeiWBfx4PGw48vwlhI64hyjoDh8e NapuiKmlmaoVnn8z8O7vUxMQXtVXhotjLG5s+GAVmasbH1Dn9J8p4OH64vogPbMbEyxg XYcA== 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=ctIC9+vlo7JRiMFsUDtEx5VGTQ3ef5E9hV7X7SjG6bE=; b=ZEWNk4aFW5/PNUiFnCl0yaO5uOlnNB4ua9wC/YjoCP4T+3gfDplTsIW5NzYu5gORrm SVnKJ9vfqE+9im2ig0iLebZQHzaELdbF/NlKT6nU1qhA1Y6mSpQYA0zWW+mr4dDdmDnH stXt9Uwv6eIlNd6LkfWJC+5DMxZVueIsHuZzbAP8hnFsvPp0p0oDhbpEC3xmKT8bhUdD NZ2sGUEjZnx1hk2VA3NGv+n6hSbPcdYZ2pUXrv/hTvrbrhIlyYLp9nHoqeZpDc1HQlY6 99WnB0OC44IV3qACt8vYNHKIQCcq3UMfbm35fobc/U+x2uUH9AHgxE8KE0x6sb+1s9o7 A1Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=PmkJwS1J; 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 r184si27715451pgr.24.2019.04.09.02.56.21; Tue, 09 Apr 2019 02:56:21 -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=PmkJwS1J; 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 S1726091AbfDIJ4U (ORCPT + 3 others); Tue, 9 Apr 2019 05:56:20 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:43900 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726079AbfDIJ4U (ORCPT ); Tue, 9 Apr 2019 05:56:20 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190409095618euoutp0222bebcd252b465bb5ddb4f2da409fa11~TxcydMaqe2449224492euoutp02Q; Tue, 9 Apr 2019 09:56:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190409095618euoutp0222bebcd252b465bb5ddb4f2da409fa11~TxcydMaqe2449224492euoutp02Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554803779; bh=ctIC9+vlo7JRiMFsUDtEx5VGTQ3ef5E9hV7X7SjG6bE=; h=From:To:Cc:Subject:Date:References:From; b=PmkJwS1JaorBoeFssjPJQkOx6XfMvice1ptxCgUQwAnnOT/tdlEu1oDQb4nhdwxvu I0TiFkf6UmPc2waSpKqV9rvT/zVBGpYG3RpRLF6qq6pCDnriSo9HPGDJqjCTFT3cqz 4PI/zSud8Hwv2gFm6+UcleOZQRHR3Sii3xMyDsVc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190409095618eucas1p2f991684cedd42fb1d8744a97f5fcfa01~Txcx8Eg2B1568915689eucas1p2W; Tue, 9 Apr 2019 09:56:18 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id D2.B6.04377.24C6CAC5; Tue, 9 Apr 2019 10:56:18 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190409095617eucas1p1f670765d5e452dee6e22068a7e48d114~TxcxNou_K0550605506eucas1p1Z; Tue, 9 Apr 2019 09:56:17 +0000 (GMT) X-AuditID: cbfec7f4-113ff70000001119-da-5cac6c421731 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id C9.95.04146.14C6CAC5; Tue, 9 Apr 2019 10:56:17 +0100 (BST) 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 <0PPO00H9PU9KWG60@eusync4.samsung.com>; Tue, 09 Apr 2019 10:56:17 +0100 (BST) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Seung-Woo Kim Subject: [PATCH v4] ARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs Date: Tue, 09 Apr 2019 11:56:02 +0200 Message-id: <20190409095602.31846-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsWy7djP87pOOWtiDK6dY7XYOGM9q8X58xvY LWac38dksfbIXSBr8ks2B1aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7MstUjfLoErY+uSDraC I4oV/87/ZGxgvCbTxcjJISFgIvFz836WLkYuDiGBFYwSfQdbWCGcz4wSW/++Z4OpuvnzOSNE YhmjxONbl5ghnP+MEvsPtzGDVLEJGEp0ve0C6xARUJX43LaAHaSIWWAHo8SD5XPYQRLCAoES zy6tArI5OFiAiva8sgcJ8wrYSvQdnswMsU1eYvWGA2ALJATOskqcO7mdFSLhInGo4xYLhC0j 0dlxkAmiqJlR4uG5tewQTg+jxOWmGYwQVdYSh49fBOtmFuCTmLRtOjPIZgkBXomONiGIEg+J wyf+gh0nJBAr0XlkA/sERvEFjAyrGMVTS4tz01OLjfJSy/WKE3OLS/PS9ZLzczcxAmPl9L/j X3Yw7vqTdIhRgINRiYdXwXF1jBBrYllxZe4hRgkOZiURXs74NTFCvCmJlVWpRfnxRaU5qcWH GKU5WJTEeasZHkQLCaQnlqRmp6YWpBbBZJk4OKUaGM2nVRhXn/30guuLosHvM11Hra7xnjHk Pu19dKGs59T/16zOXq2Z8eDv1+grb+TEonL645trrNYKvLfXnJM7n+WsqMSh6XxpxQ8cj3u2 X7iTE/6wLS16Rkhx2JVzPoKrguN5fS161iq0/E7wluIzvisbbRw2rdtxq+EL4TSnk59KFr7i X+p/V4mlOCPRUIu5qDgRAAx3fN6RAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNJMWRmVeSWpSXmKPExsVy+t/xa7qOOWtiDE7sF7bYOGM9q8X58xvY LWac38dksfbIXSBr8ks2B1aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7MstUjfLoErY+uSDraC I4oV/87/ZGxgvCbTxcjJISFgInHz53PGLkYuDiGBJYwSO4/egHIamSQebr/JBlLFJmAo0fW2 C8wWEVCV+Ny2gB2kiFlgF6NE6/KTLCAJYQF/ieaNJ5m7GDk4WICK9ryyBwnzCthK9B2ezAyx TV5i9YYDzBMYuRYwMqxiFEktLc5Nzy021CtOzC0uzUvXS87P3cQI9PK2Yz8372C8tDH4EKMA B6MSD6+C4+oYIdbEsuLK3EOMEhzMSiK8nPFrYoR4UxIrq1KL8uOLSnNSiw8xSnOwKInznjeo jBISSE8sSc1OTS1ILYLJMnFwSjUwNu/K+sC5VYt/uaZv2J1zs2PXl+vfvfNI2zhqSaZ77y+l ghePHL7HtlllxCUvDjt0clpTebHv5m/nOUorjZ+tuqPgWpYhq1a2f9u+w2cEo9t2pfNcfl9+ dsdxi6u6PfeWm107fiSe4a7Lz80/bkb6lzNNdd+1Peb5kbAbBWf+lT/aF3jYvT/qpBJLcUai oRZzUXEiAAS6y97uAQAA X-CMS-MailID: 20190409095617eucas1p1f670765d5e452dee6e22068a7e48d114 CMS-TYPE: 201P X-CMS-RootMailID: 20190409095617eucas1p1f670765d5e452dee6e22068a7e48d114 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 --- v4: fixed build if !SMP (as suggested by Olof) 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 | 6 +++--- 5 files changed, 7 insertions(+), 15 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 f2e8eb66f501..78b077444f7a 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..1c518b8ee520 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 if SMP + 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..264dbaa89c3d 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_MCPM) += 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 64a57e703fc2..be122af0de8f 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -268,7 +268,7 @@ 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)) { + if (IS_ENABLED(CONFIG_MCPM)) { mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume); mcpm_cpu_suspend(); } @@ -351,7 +351,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)) + if (IS_ENABLED(CONFIG_MCPM)) pmu_raw_writel(__pa_symbol(mcpm_entry_point), S5P_INFORM0); tmp = pmu_raw_readl(EXYNOS_L2_OPTION(0)); @@ -455,7 +455,7 @@ static void exynos5420_prepare_pm_resume(void) mpidr = read_cpuid_mpidr(); cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); - if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) + if (IS_ENABLED(CONFIG_MCPM)) WARN_ON(mcpm_cpu_powered_up()); if (IS_ENABLED(CONFIG_HW_PERF_EVENTS) && cluster != 0) {