Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932425AbeAIOMP (ORCPT + 1 other); Tue, 9 Jan 2018 09:12:15 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:55426 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757183AbeAIOMI (ORCPT ); Tue, 9 Jan 2018 09:12:08 -0500 Cc: Sudeep Holla , tomasz.figa@gmail.com, chanwoo@kernel.org, jh80.chung@samsung.com, inki.dae@samsung.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jonghwa Lee Subject: Re: [PATCH 3/9] soc: samsung: pmu: Add the PMU data of exynos5433 to support low-power state To: Chanwoo Choi , krzk@kernel.org, m.szyprowski@samsung.com, s.nawrocki@samsung.com, kgene@kernel.org References: <1515484746-10656-1-git-send-email-cw00.choi@samsung.com> <1515484746-10656-4-git-send-email-cw00.choi@samsung.com> From: Sudeep Holla Organization: ARM Message-ID: Date: Tue, 9 Jan 2018 14:11:57 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1515484746-10656-4-git-send-email-cw00.choi@samsung.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 09/01/18 07:59, Chanwoo Choi wrote: > This patch adds the PMU (Power Management Unit) data of exynos5433 SoC > in order to support the various power modes. Each power mode has > the different value for reducing the power-consumption. > > Signed-off-by: Jonghwa Lee > Signed-off-by: Chanwoo Choi > --- > arch/arm/mach-exynos/common.h | 2 - > drivers/soc/samsung/Makefile | 3 +- > drivers/soc/samsung/exynos-pmu.c | 1 + > drivers/soc/samsung/exynos-pmu.h | 2 + > drivers/soc/samsung/exynos5433-pmu.c | 286 ++++++++++++++++++++++++++++ > include/linux/soc/samsung/exynos-regs-pmu.h | 148 ++++++++++++++ > 6 files changed, 439 insertions(+), 3 deletions(-) > create mode 100644 drivers/soc/samsung/exynos5433-pmu.c > > diff --git a/drivers/soc/samsung/exynos5433-pmu.c b/drivers/soc/samsung/exynos5433-pmu.c > new file mode 100644 > index 000000000000..2571e61522f0 > --- /dev/null > +++ b/drivers/soc/samsung/exynos5433-pmu.c > @@ -0,0 +1,286 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// > +// Copyright (c) 2018 Samsung Electronics Co., Ltd. > +// Copyright (c) Jonghwa Lee > +// Copyright (c) Chanwoo Choi > +// > +// EXYNOS5433 - CPU PMU (Power Management Unit) support > + > +#include > +#include > + > +#include "exynos-pmu.h" > + > +static struct exynos_pmu_conf exynos5433_pmu_config[] = { > + /* { .offset = address, .val = { AFTR, LPA, SLEEP } } */ > + { EXYNOS5433_ATLAS_CPU0_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, > + { EXYNOS5433_DIS_IRQ_ATLAS_CPU0_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } }, > + { EXYNOS5433_ATLAS_CPU1_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, > + { EXYNOS5433_DIS_IRQ_ATLAS_CPU1_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } }, > + { EXYNOS5433_ATLAS_CPU2_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, > + { EXYNOS5433_DIS_IRQ_ATLAS_CPU2_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } }, > + { EXYNOS5433_ATLAS_CPU3_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, > + { EXYNOS5433_DIS_IRQ_ATLAS_CPU3_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } }, > + { EXYNOS5433_APOLLO_CPU0_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, > + { EXYNOS5433_DIS_IRQ_APOLLO_CPU0_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } }, > + { EXYNOS5433_APOLLO_CPU1_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, > + { EXYNOS5433_DIS_IRQ_APOLLO_CPU1_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } }, > + { EXYNOS5433_APOLLO_CPU2_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, > + { EXYNOS5433_DIS_IRQ_APOLLO_CPU2_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } }, > + { EXYNOS5433_APOLLO_CPU3_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, > + { EXYNOS5433_DIS_IRQ_APOLLO_CPU3_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } }, > + { EXYNOS5433_ATLAS_NONCPU_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, > + { EXYNOS5433_APOLLO_NONCPU_SYS_PWR_REG, { 0x0, 0x0, 0x8 } }, 1. First of all why do you need any of these CPU related PMU config registers in kernel ? From the information I gathered this is ARM64 SoC using PSCI. These are needed just in PSCI implementation and not in kernel. So can you elaborate on why there are present here ? 2. Are there any public documents that these names map to ? If there is none, please replace these codenames(ATLAS, APOLLO) with appropriately. Sorry if these are already answered, just point me to those threads. -- Regards, Sudeep