From patchwork Fri Feb 22 10:47:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 159018 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1579162jaa; Fri, 22 Feb 2019 02:47:24 -0800 (PST) X-Google-Smtp-Source: AHgI3IbprfPOGO+FjO5GDQIiE8x3iK4iveHqp4U0hUJIx3TfnTjYKaJJ0Cs9x8nkbKHtt2HcGZPI X-Received: by 2002:a63:ed0b:: with SMTP id d11mr3335029pgi.435.1550832444806; Fri, 22 Feb 2019 02:47:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550832444; cv=none; d=google.com; s=arc-20160816; b=HL+I88UwL6/5xERIr+BKhixA5cdp6WNhGmcZfcZoS7qv7PCZ8/EVMvOYSCET7vShe2 Rozzhf7Bz/X4EF7xoExi2a/2cnreJNcmhiFu3vWozTQcAOwBbBqANpz7L/rRZNjTYDGl S+Yp4ouJM9AqB1nnNl/SZhipLOT4k++z8PFd3zTgvU6Bt3QNBYweZpoy8Vow2FS96ZFi qaY8G4eLZR1bd7juCUjSG45wkQpVeLpDN5CvPE2u8zMkrwTZNhAyQ72iN6eoOAAf9y/9 DZGT3ercxS+0+FYAMGocGBM74x8RUKbcIMWmeSviCTz7PcnJco4kJtyut7GcjzRLi/sN QGUw== 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=bp2ARXaKSPnd7lzT3gQ3vTXHroqhoJW4hmTV/G6nEiw=; b=frQHkGcvKEd+hhjFpSeqTpj6BLYCi69cyKHh2HTakUL/6LCa+7qOwugMPgGKz0J3po hl8P6I1HGXvrATL9llcKd6rnSCr+pW3JKv2pfiM+d3f1J0YHZzFTL6hPE3FfWLSJzrcd DXyZkIW7FUanF0FzkuU82LODgomfnHHA4zl+9TSJKuZyEKMeK/h+XfeZ7RSGKmYbQNlt HSOEZgvHUqR56AMdhDPA/v+ken+qZh0YEipHMFhQQ1XaC4vCOc6XnhRmRcU/d4MCXWnc p32hCg6yQR3DCjcq0CjzO6VhhPl1x7/U21WkG3kbhWX92RsOyxc/hLA7a4IctK6pAqBO QO8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=cnDhV9UP; 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 a89si1075385pla.362.2019.02.22.02.47.24; Fri, 22 Feb 2019 02:47:24 -0800 (PST) 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=cnDhV9UP; 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 S1726184AbfBVKrY (ORCPT + 3 others); Fri, 22 Feb 2019 05:47:24 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:54478 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726135AbfBVKrX (ORCPT ); Fri, 22 Feb 2019 05:47:23 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190222104721euoutp0102e51880dcdac3092f0e5cd7a1f6dee3~FqeOhiAen1488514885euoutp01q; Fri, 22 Feb 2019 10:47:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190222104721euoutp0102e51880dcdac3092f0e5cd7a1f6dee3~FqeOhiAen1488514885euoutp01q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550832441; bh=bp2ARXaKSPnd7lzT3gQ3vTXHroqhoJW4hmTV/G6nEiw=; h=From:To:Cc:Subject:Date:References:From; b=cnDhV9UPFKK8BOGvMzzd/e9dN3GhxWzrPpe02dS8QKT+p386PZmQZ8gAtSKZ5zVX/ J8RZ0IqtN3EJafYMVrq3zDRjD5IXdNxvl7xowJxfAqtrw+zXnNVliSbnR1omSbf9Gm 1842zxbydUTPMufvxzzrxU3dRB0gIsmL5+ORR2tY= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190222104721eucas1p2c510f4d9b3129239928a7e3628a04fe8~FqeN9WnJD3254832548eucas1p2L; Fri, 22 Feb 2019 10:47:21 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 9F.AE.04294.833DF6C5; Fri, 22 Feb 2019 10:47:20 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190222104720eucas1p24f14bfd053f6feea36c310e45f0cae42~FqeNT7VPs3253132531eucas1p2P; Fri, 22 Feb 2019 10:47:20 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-86-5c6fd338cc75 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 91.5B.04284.833DF6C5; Fri, 22 Feb 2019 10:47:20 +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 <0PNB001O3PYS8940@eusync1.samsung.com>; Fri, 22 Feb 2019 10:47:20 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Seung-Woo Kim Subject: [PATCH] ARM: exynos: Set MCPM as mandatory for Exynos542x/5800 SoCs Date: Fri, 22 Feb 2019 11:47:08 +0100 Message-id: <20190222104708.28447-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsWy7djP87oWl/NjDNZNsrbYOGM9q8X58xvY LWac38dksfbIXSBr8ks2B1aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7MstUjfLoErY23fLuaC s5IVR67MZWlgfC/axcjJISFgIvHk7EX2LkYuDiGBFYwSjxc9YgFJCAl8ZpRoniMJUzR9cTcr RNEyRomvDTtYIJwGJonNk9uZQarYBAwlut52sYHYIgKqEp/bFoCNZRbYwSjxYPkcdpCEsICP xJz1H8BsFqCiq2f/gdm8ArYSn+73M0Gsk5dYveEAM0izhMBZVom7N9cwQiRcJA7sXMwOYctI dHYcZIIoamaUaJ8xix3C6WGU2DpnBxtElbXE4eMXWUFsZgE+iUnbpgON5QCK80p0tAlBlHhI TPj2lh3i6ViJa/3XmSYwii9gZFjFKJ5aWpybnlpslJdarlecmFtcmpeul5yfu4kRGCun/x3/ soNx15+kQ4wCHIxKPLwWG/NihFgTy4orcw8xSnAwK4nw7jqZHyPEm5JYWZValB9fVJqTWnyI UZqDRUmct5rhQbSQQHpiSWp2ampBahFMlomDU6qBsWXVhKB91yW/+oTmtLXVO0z+EmlxKb7o wtZr+1f8/772kcK/25KntnVPeJmpcG75+a9fhX8XSEtGmnw2jnc7zLd829xN7B8kzhk/Spb/ U5pR8INJ0OTAi562Gx9n7HLI8FmyUmGTlsmfdRoh9qxeXRvN70qr39/l8kn05LodUW8rDc+X LHVv61diKc5INNRiLipOBAD+AwMAkQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDJMWRmVeSWpSXmKPExsVy+t/xy7oWl/NjDBa85bfYOGM9q8X58xvY LWac38dksfbIXSBr8ks2B1aPTas62Tz6tqxi9Pi8SS6AOYrLJiU1J7MstUjfLoErY23fLuaC s5IVR67MZWlgfC/axcjJISFgIjF9cTdrFyMXh5DAEkaJ41+fsUA4TUwSe1onMINUsQkYSnS9 7WIDsUUEVCU+ty1gByliFtjFKNG6/CQLSEJYwEdizvoP7CA2C1DR1bP/wGxeAVuJT/f7mSDW yUus3nCAeQIj1wJGhlWMIqmlxbnpucWGesWJucWleel6yfm5mxiBft527OfmHYyXNgYfYhTg YFTi4bXYmBcjxJpYVlyZe4hRgoNZSYR318n8GCHelMTKqtSi/Pii0pzU4kOM0hwsSuK85w0q o4QE0hNLUrNTUwtSi2CyTBycUg2MNhv2drYY5L4/27Jhq5Zey5J56fL7unbJzbjiqpH+83jr i2tnjHdl3HoQI2+u4PufX7wvpHnJWvv1ZjbLLjjIK015v1jR/QDf+dqd70z/ZfpeEguczjv5 pdPstRaHsk0a8+70nCj4V8Cbr3V7g3tdlftpn6NTHR8c23bz4levkwzL3iXq/n23W4mlOCPR UIu5qDgRAG2o6DfvAQAA X-CMS-MailID: 20190222104720eucas1p24f14bfd053f6feea36c310e45f0cae42 CMS-TYPE: 201P X-CMS-RootMailID: 20190222104720eucas1p24f14bfd053f6feea36c310e45f0cae42 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 --- 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 0850505ac78b..c94ffa5e542c 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -267,10 +267,8 @@ static int exynos5420_cpu_suspend(unsigned long arg) writel_relaxed(0x0, pm_state.sysram_base + EXYNOS5420_CPU_STATE); - 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"); @@ -345,8 +343,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; @@ -444,8 +441,7 @@ static void exynos3250_pm_resume(void) static void exynos5420_prepare_pm_resume(void) { - if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) - WARN_ON(mcpm_cpu_powered_up()); + WARN_ON(mcpm_cpu_powered_up()); } static void exynos5420_pm_resume(void)