[PATCH v1 2/2] drivers: soc: qcom: rpmh-rsc: Correct check for slot number

2019-02-21 Thread Raju P.L.S.S.S.N
From: Maulik Shah The return index value from bitmap_find_next_zero_area can be higher than available slot. So correct the check to return error in such case. Signed-off-by: Maulik Shah Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/rpmh-rsc.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v1 1/2] drivers: qcom: rpmh: avoid sending sleep/wake sets immediately

2019-02-21 Thread Raju P.L.S.S.S.N
or suspend. [1] https://patchwork.kernel.org/patch/10477533/ Signed-off-by: Raju P.L.S.S.S.N Reviewed-by: Lina Iyer Reviewed-by: Evan Green --- drivers/soc/qcom/rpmh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c index

[PATCH v1 0/2] drivers: qcom: Fixes in RPMh driver

2019-02-21 Thread Raju P.L.S.S.S.N
Hi, This series consists of couple of fixes identified in RPMh driver. Please consider reviewing the patches. Maulik Shah (1): drivers: soc: qcom: rpmh-rsc: Correct check for slot number Raju P.L.S.S.S.N (1): drivers: qcom: rpmh: avoid sending sleep/wake sets immediately drivers/soc/qcom

[PATCH RESEND v3 3/3] drivers: qcom: rpmh: disallow active requests in solver mode

2019-02-21 Thread Raju P.L.S.S.S.N
such mode, disallow requests from platform drivers for state change using the RSC. Signed-off-by: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/rpmh-internal.h | 5 drivers/soc/qcom/rpmh-rsc.c | 30 +++ drivers/soc/qcom/rpmh.c

[PATCH RESEND v3 0/3] add some more functionality to RPMH

2019-02-21 Thread Raju P.L.S.S.S.N
/2019/2/18/714 Lina Iyer (2): drivers: qcom: rpmh-rsc: return if the controller is idle drivers: qcom: rpmh: disallow active requests in solver mode Raju P.L.S.S.S.N (1): drivers: qcom: rpmh-rsc: simplify TCS locking drivers/soc/qcom/rpmh-internal.h | 8 ++- drivers/soc/qcom/rpmh-rsc.c

[PATCH RESEND v3 2/3] drivers: qcom: rpmh-rsc: return if the controller is idle

2019-02-21 Thread Raju P.L.S.S.S.N
: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/rpmh-internal.h | 1 + drivers/soc/qcom/rpmh-rsc.c | 24 drivers/soc/qcom/rpmh.c | 13 + include/soc/qcom/rpmh.h | 5 + 4 files changed, 43 insertions(+) diff --git a

[PATCH RESEND v3 1/3] drivers: qcom: rpmh-rsc: simplify TCS locking

2019-02-21 Thread Raju P.L.S.S.S.N
read of TCS registers. - Use spin_lock instead of _irq variants as the locks are not held in interrupt context Suggested-by: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/rpmh-internal.h | 2 -- drivers/soc/qcom/rpmh-rsc.c | 37 +++- driv

[PATCH RESEND v1 1/2] drivers: qcom: rpmh-rsc: clear active mode configuration for wake TCS

2019-02-18 Thread Raju P.L.S.S.S.N
gned-off-by: Raju P.L.S.S.S.N Reviewed-by: Matthias Kaehlcke --- drivers/soc/qcom/rpmh-rsc.c | 77 ++--- 1 file changed, 54 insertions(+), 23 deletions(-) diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index 75bd9a83aef0..6cc7f219ce48 10

[PATCH RESEND v1 2/2] drivers: qcom: rpmh: write PDC data

2019-02-18 Thread Raju P.L.S.S.S.N
-on power domain. Programming the wakeup value is done through a separate register on the RSC. Signed-off-by: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N Reviewed-by: Matthias Kaehlcke --- drivers/soc/qcom/rpmh-internal.h | 4 +++- drivers/soc/qcom/rpmh-rsc.c | 35

[PATCH RESEND v1 0/2] drivers/qcom: add additional functionality to RPMH

2019-02-18 Thread Raju P.L.S.S.S.N
5/ [4] https://patchwork.kernel.org/patch/10546857/ Lina Iyer (1): drivers: qcom: rpmh: write PDC data Raju P.L.S.S.S.N (1): drivers: qcom: rpmh-rsc: clear active mode configuration for wake TCS drivers/soc/qcom/rpmh-internal.h | 4 +- drivers/soc/qcom/r

[PATCH RFC 5/5] arm64: dts: msm: add PDC timer for apps_rsc for SDM845

2018-12-21 Thread Raju P.L.S.S.S.N
Add PDC timer node for apps_rsc to program next wake-up timer value. Signed-off-by: Raju P.L.S.S.S.N --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index

[PATCH RFC 4/5] drivers: qcom: rpmh-pdc-timer: Add power management ops

2018-12-21 Thread Raju P.L.S.S.S.N
Add suspend power management ops so that the PDC timer is programmed to highest match value when system is suspended. Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/Kconfig | 2 +- drivers/soc/qcom/rpmh-pdc-timer.c | 24 2 files changed, 25 insertions

[PATCH RFC 3/5] dt-bindings: Add PDC timer bindings for Qualcomm SoCs

2018-12-21 Thread Raju P.L.S.S.S.N
Add device binding documentation for Qualcomm Technology Inc's PDC timer. The driver is used for programming next wake-up timer value when processor enters SoC level deepest low power state. Cc: devicet...@vger.kernel.org Signed-off-by: Raju P.L.S.S.S.N --- .../devicetree/bindings/soc/qcom

[PATCH RFC 1/5] drivers: qcom: rpmh-rsc: Add regmap for RSC controller

2018-12-21 Thread Raju P.L.S.S.S.N
The RSC controller has dedicated control registers to send next wakeup timer vale to PDC. The timer value needs to be programmed by sleep driver client. So add regmap for the controller. Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/rpmh-rsc.c | 14 ++ 1 file changed, 14

[PATCH RFC 2/5] drivers: qcom: rpmh-pdc-timer: add PDC timer support for RPMH based SoCs

2018-12-21 Thread Raju P.L.S.S.S.N
interrupt. Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/Kconfig | 9 ++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/rpmh-pdc-timer.c | 181 ++ 3 files changed, 191 insertions(+) create mode 100644 drivers/soc/qcom/rpmh-pdc-timer.c diff

[PATCH RFC 0/5] Add support for PDC timer for wake-ups

2018-12-21 Thread Raju P.L.S.S.S.N
/patch/1019432/ Raju P.L.S.S.S.N (5): drivers: qcom: rpmh-rsc: Add regmap for RSC controller drivers: qcom: rpmh-pdc-timer: add PDC timer support for RPMH based SoCs dt-bindings: Add PDC timer bindings for Qualcomm SoCs drivers: qcom: rpmh-pdc-timer: Add power management ops arm64: dts

[PATCH v2] arm64: dts: sdm845: Add PSCI cpuidle low power states

2018-10-30 Thread Raju P.L.S.S.S.N
Add device bindings for cpuidle states for cpu devices. Cc: Signed-off-by: Raju P.L.S.S.S.N --- Changes in v2 - Address comments from Doug --- --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 62 1 file changed, 62 insertions(+) diff --git a/arch/arm64/boot/dts

[PATCH RESEND] drivers: qcom: rpmh: avoid sending sleep/wake sets immediately

2018-10-23 Thread Raju P.L.S.S.S.N
or suspend. [1]https://patchwork.kernel.org/patch/10477533/ Signed-off-by: Raju P.L.S.S.S.N Reviewed-by: Lina Iyer --- drivers/soc/qcom/rpmh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c index e6e98d4..877fe78 100644

[PATCH] arm64: dts: sdm845: Add PSCI cpuidle low power states

2018-10-15 Thread Raju P.L.S.S.S.N
Add device bindings for cpuidle states for cpu devices. Cc: Signed-off-by: Raju P.L.S.S.S.N --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 62 1 file changed, 62 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845

[PATCH RFC v1 5/8] dt-bindings: introduce cpu power domain bindings for Qualcomm SoCs

2018-10-10 Thread Raju P.L.S.S.S.N
Add device binding documentation for Qualcomm Technology Inc's cpu domain driver. The driver is used for managing system sleep activities that are required when application processor is going to deepest low power mode. Cc: devicet...@vger.kernel.org Signed-off-by: Raju P.L.S.

[PATCH RFC v1 8/8] arm64: dtsi: sdm845: Add cpu power domain support

2018-10-10 Thread Raju P.L.S.S.S.N
Add cpu power domain support Signed-off-by: Raju P.L.S.S.S.N --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index d3662a8..aadaa20 100644 --- a/arch/arm64

[PATCH RFC v1 4/8] drivers: qcom: cpu_pd: add cpu power domain support using genpd

2018-10-10 Thread Raju P.L.S.S.S.N
low power mode. So add cpu power domain using Linux generic power domain infrastructure to perform necessary tasks as part of domain power down. Suggested-by: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/Kconfig | 9 drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom

[PATCH RFC v1 7/8] drivers: qcom: cpu_pd: Handle cpu hotplug in the domain

2018-10-10 Thread Raju P.L.S.S.S.N
Use cpu hotplug callback mechanism to attach/dettach the cpu in the cpu power domain. During cpu hotplug callback registration, the starting callback is invoked on all online cpus. So there is no need to attach from device probe. Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/cpu_pd.c

[PATCH RFC v1 6/8] drivers: qcom: cpu_pd: program next wakeup to PDC timer

2018-10-10 Thread Raju P.L.S.S.S.N
provided in RSC address space for this purpose. PDC wakes-up the RSC and sets up the resources back in active state before the processor is woken up by a timer interrupt. Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/Kconfig | 2 +- drivers/soc/qcom/cpu_pd.c | 79

[PATCH RFC v1 1/8] PM / Domains: Add helper functions to attach/detach CPUs to/from genpd

2018-10-10 Thread Raju P.L.S.S.S.N
that the CPU device has a valid PM domain pointer assigned, as to make sure it belongs to genpd. Cc: Lina Iyer Co-developed-by: Lina Iyer Signed-off-by: Ulf Hansson [rpls...@codeaurora.org: Fix compilation issue] Signed-off-by: Raju P.L.S.S.S.N (am from https://patchwork.kernel.org/patch/10478167

[PATCH RFC v1 2/8] kernel/cpu_pm: Manage runtime PM in the idle path for CPUs

2018-10-10 Thread Raju P.L.S.S.S.N
uct device, via calling pm_runtime_put_sync_suspend(). Then, at the point when the CPU resumes from idle, let's increase the runtime PM usage count, via calling pm_runtime_get_sync(). Cc: Lina Iyer Co-developed-by: Lina Iyer Signed-off-by: Ulf Hansson Signed-off-by: Raju P.L.S.S.S.N

[PATCH RFC v1 3/8] timer: Export next wakeup time of a CPU

2018-10-10 Thread Raju P.L.S.S.S.N
d-off-by: Raju P.L.S.S.S.N (am from https://patchwork.kernel.org/patch/10478021/) --- include/linux/tick.h | 8 kernel/time/tick-sched.c | 10 ++ 2 files changed, 18 insertions(+) diff --git a/include/linux/tick.h b/include/linux/tick.h index 55388ab..e48f6b2 100644 --- a/in

[PATCH RFC v1 0/8] drivers: qcom: Add cpu power domain for SDM845

2018-10-10 Thread Raju P.L.S.S.S.N
0478153/ [7]. https://patchwork.kernel.org/patch/10478021/ [8]. https://lkml.org/lkml/2018/6/20/807 Lina Iyer (1): timer: Export next wakeup time of a CPU Raju P.L.S.S.S.N (5): drivers: qcom: cpu_pd: add cpu power domain support using genpd dt-bindings: introduce cpu power domain bindings for Qual

[PATCH RESEND v3 0/3] drivers/qcom: add additional functionality to RPMH

2018-10-08 Thread Raju P.L.S.S.S.N
/20/519 [2] https://lkml.org/lkml/2018/10/3/422 Lina Iyer (2): drivers: qcom: rpmh-rsc: return if the controller is idle drivers: qcom: rpmh: disallow active requests in solver mode Raju P.L.S.S.S.N (1): drivers: qcom: rpmh-rsc: simplify TCS locking drivers/soc/qcom/rpmh-internal.h | 8 +++

[PATCH RESEND v3 2/3] drivers: qcom: rpmh-rsc: return if the controller is idle

2018-10-08 Thread Raju P.L.S.S.S.N
: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- changes in v3 - Add lock check to avoid potential race as suggested by Matthias --- drivers/soc/qcom/rpmh-internal.h | 1 + drivers/soc/qcom/rpmh-rsc.c | 24 drivers/soc/qcom/rpmh.c | 13 + include/soc

[PATCH RESEND v3 1/3] drivers: qcom: rpmh-rsc: simplify TCS locking

2018-10-08 Thread Raju P.L.S.S.S.N
read of TCS registers. - Use spin_lock instead of _irq variants as the locks are not held in interrupt context Suggested-by: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- This patch is based on https://lkml.org/lkml/2018/10/3/422 --- drivers/soc/qcom/rpmh-internal.h | 2 -- drivers/soc/qco

[PATCH RESEND v3 3/3] drivers: qcom: rpmh: disallow active requests in solver mode

2018-10-08 Thread Raju P.L.S.S.S.N
such mode, disallow requests from platform drivers for state change using the RSC. Signed-off-by: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- Chanages in v3 - Add functionality to set solver mode for RSC controller - return -EINVAL if active requests are sent in solver mode --- drivers/soc

[PATCH v3 3/3] drivers: qcom: rpmh: disallow active requests in solver mode

2018-10-08 Thread Raju P.L.S.S.S.N
such mode, disallow requests from platform drivers for state change using the RSC. Signed-off-by: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- Chanages in v3 - Add functionality to set solver mode for RSC controller - return -EINVAL if active requests are sent in solver mode --- drivers/soc

[PATCH v3 2/3] drivers: qcom: rpmh-rsc: return if the controller is idle

2018-10-08 Thread Raju P.L.S.S.S.N
: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- changes in v3 - Add lock check to avoid potential race as suggested by Matthias --- drivers/soc/qcom/rpmh-internal.h | 1 + drivers/soc/qcom/rpmh-rsc.c | 24 drivers/soc/qcom/rpmh.c | 13 + include/soc

[PATCH v3 1/3] drivers: qcom: rpmh-rsc: simplify TCS locking

2018-10-08 Thread Raju P.L.S.S.S.N
read of TCS registers. - Use spin_lock instead of _irq variants as the locks are not held in interrupt context Suggested-by: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N --- This patch is based on https://lkml.org/lkml/2018/10/3/422 --- drivers/soc/qcom/rpmh-internal.h | 2 -- drivers/soc/qco

[PATCH v3 0/3] drivers/qcom: add additional functionality to RPMH

2018-10-08 Thread Raju P.L.S.S.S.N
vers: qcom: rpmh-rsc: return if the controller is idle drivers: qcom: rpmh: disallow active requests in solver mode Raju P.L.S.S.S.N (1): drivers: qcom: rpmh-rsc: simplify TCS locking drivers/soc/qcom/rpmh-internal.h | 8 +++- drivers/soc/qcom/rpmh-rsc.c

[PATCH v1 2/2] drivers: qcom: rpmh: write PDC data

2018-10-03 Thread Raju P.L.S.S.S.N
-on power domain. Programming the wakeup value is done through a separate register on the RSC. Signed-off-by: Lina Iyer Signed-off-by: Raju P.L.S.S.S.N Reviewed-by: Matthias Kaehlcke --- drivers/soc/qcom/rpmh-internal.h | 4 +++- drivers/soc/qcom/rpmh-rsc.c | 35

[PATCH v1 1/2] drivers: qcom: rpmh-rsc: clear active mode configuration for wake TCS

2018-10-03 Thread Raju P.L.S.S.S.N
gned-off-by: Raju P.L.S.S.S.N Reviewed-by: Matthias Kaehlcke --- drivers/soc/qcom/rpmh-rsc.c | 77 +++-- 1 file changed, 54 insertions(+), 23 deletions(-) diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index 75bd9a8..6cc7f21 10

[PATCH v1 0/2] drivers/qcom/rpmh: program wakeup timer

2018-10-03 Thread Raju P.L.S.S.S.N
patchwork.kernel.org/patch/10589385/ Lina Iyer (1): drivers: qcom: rpmh: write PDC data Raju P.L.S.S.S.N (1): drivers: qcom: rpmh-rsc: clear active mode configuration for wake TCS drivers/soc/qcom/rpmh-internal.h | 4 +- drivers/soc/qcom/rpmh-rsc.c | 112 +---

[PATCH RFC 4/6] drivers: qcom: system_pm: program next wakeup to PDC timer

2018-08-24 Thread Raju P.L.S.S.S.N
provided in RSC address space for this purpose. PDC wakes-up the RSC and sets up the resources back in active state before the processor is woken up by a timer interrupt. Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/system_pm.c | 61 1 file

[PATCH RFC 3/6] drivers: qcom: system_pm: Add power management ops

2018-08-24 Thread Raju P.L.S.S.S.N
Add suspend power management ops so that the sleep & wake resource requests are flushed to corresponding TCS. The firmware would ensure that the buffered requests in TCS are sent to Resource Power Manager during entry to deepest low power modes. Signed-off-by: Raju P.L.S.S.S.N --- drivers

[PATCH RFC 5/6] drivers: qcom: rpmh: force flush new sleep/wake requests during suspend

2018-08-24 Thread Raju P.L.S.S.S.N
ff-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/rpmh-internal.h | 1 + drivers/soc/qcom/rpmh.c | 17 + include/soc/qcom/rpmh.h | 5 + 3 files changed, 23 insertions(+) diff --git a/drivers/soc/qcom/rpmh-internal.h b/drivers/soc/qcom/rpmh-internal.h index f5

[PATCH RFC 0/6] drivers: qcom: enable system low power modes for SDM845

2018-08-24 Thread Raju P.L.S.S.S.N
/2018/6/20/519 [2]. https://lkml.org/lkml/2018/7/27/326 [3]. https://lkml.org/lkml/2018/7/13/358 [4]. https://lkml.org/lkml/2018/7/19/84 [5]. https://lkml.org/lkml/2018/8/24/641 [6]. https://lkml.org/lkml/2018/6/20/800 Raju P.L.S.S.S.N (6): drivers: qcom: system_pm: add system PM client for RPMH

[PATCH RFC 6/6] drivers: soc: system_pm: Add suspend notifier

2018-08-24 Thread Raju P.L.S.S.S.N
needs to manage such new requests if any. A notification is sent to controller to indicate the same. Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/system_pm.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/system_pm.c b/drivers/soc/qcom/system

[PATCH RFC 2/6] dt-bindings: introduce System PM bindings for Qualcomm SoCs

2018-08-24 Thread Raju P.L.S.S.S.N
Add device binding documentation for Qualcomm Technology Inc's System PM driver. The driver is used for managing system sleep activities that are required when application processor is going to deepest low power mode. Cc: devicet...@vger.kernel.org Signed-off-by: Raju P.L.S.

[PATCH RFC 1/6] drivers: qcom: system_pm: add system PM client for RPMH based SoCs

2018-08-24 Thread Raju P.L.S.S.S.N
add system power manager client for RPMH client and invoke RPMH flush when last core is being powered off by listening to cpu_pm_notifications. Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/Kconfig | 11 ++ drivers/soc/qcom/Makefile| 1 + drivers/soc/qcom/system_pm.c | 82

[PATCH] drivers: qcom: rpmh: avoid sending sleep/wake sets immediately

2018-08-24 Thread Raju P.L.S.S.S.N
or suspend. [1]https://patchwork.kernel.org/patch/10477533/ Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/rpmh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c index f81488b..390e779 100644 --- a/drivers/soc/qcom