Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-26 Thread Daniel Lezcano
On 11/19/2014 06:43 PM, Lina Iyer wrote: On Fri, Nov 14 2014 at 08:56 -0700, Daniel Lezcano wrote: On 10/25/2014 01:40 AM, Lina Iyer wrote: +/** + * spm_set_low_power_mode() - Configure SPM start address for low power mode + * @mode: SPM LPM mode to enter + */ +int

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-26 Thread Lina Iyer
On Wed, Nov 26 2014 at 04:19 -0700, Daniel Lezcano wrote: On 11/19/2014 06:43 PM, Lina Iyer wrote: On Fri, Nov 14 2014 at 08:56 -0700, Daniel Lezcano wrote: On 10/25/2014 01:40 AM, Lina Iyer wrote: + +if ((cpu -1) !cpuidle_drv_init) { +

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-26 Thread Lina Iyer
On Wed, Nov 26 2014 at 08:20 -0700, Lina Iyer wrote: On Wed, Nov 26 2014 at 04:19 -0700, Daniel Lezcano wrote: On 11/19/2014 06:43 PM, Lina Iyer wrote: On Fri, Nov 14 2014 at 08:56 -0700, Daniel Lezcano wrote: On 10/25/2014 01:40 AM, Lina Iyer wrote: + +if ((cpu -1)

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-26 Thread Kevin Hilman
Oops, I thought I had sent this, but it was sitting in the drafts folder. Sending anyways because it looks like most of these issues still exist in v10. Lina Iyer lina.i...@linaro.org writes: SPM is a hardware block that controls the peripheral logic surrounding the application cores

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-26 Thread Daniel Lezcano
On 11/26/2014 07:04 PM, Kevin Hilman wrote: Oops, I thought I had sent this, but it was sitting in the drafts folder. Sending anyways because it looks like most of these issues still exist in v10. [ ... ] +* On some SoC's if the control registers are written first and if the +

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-19 Thread Lina Iyer
On Fri, Nov 14 2014 at 08:56 -0700, Daniel Lezcano wrote: On 10/25/2014 01:40 AM, Lina Iyer wrote: +/** + * spm_set_low_power_mode() - Configure SPM start address for low power mode + * @mode: SPM LPM mode to enter + */ +int qcom_spm_set_low_power_mode(enum pm_sleep_mode mode) +{ +

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-18 Thread Lina Iyer
On Fri, Nov 14 2014 at 15:46 -0700, Stephen Boyd wrote: On 10/24, Lina Iyer wrote: diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c new file mode 100644 index 000..ee2e3ca --- /dev/null +++ b/drivers/soc/qcom/spm.c +#include linux/module.h +#include linux/kernel.h +#include

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-18 Thread Lina Iyer
On Mon, Nov 17 2014 at 14:32 -0700, Daniel Lezcano wrote: On 10/25/2014 01:40 AM, Lina Iyer wrote: Hi Lina, [ ... ] +static inline void spm_register_write(struct spm_driver_data *drv, + enum spm_reg reg, u32 val) +{ + if

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-18 Thread Bjorn Andersson
On Mon, Nov 17, 2014 at 1:32 PM, Daniel Lezcano daniel.lezc...@linaro.org wrote: On 10/25/2014 01:40 AM, Lina Iyer wrote: Hi Lina, [ ... ] +static inline void spm_register_write(struct spm_driver_data *drv, + enum spm_reg reg, u32 val) +{ + if

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-18 Thread Stephen Boyd
On 11/18/2014 08:56 AM, Lina Iyer wrote: On Fri, Nov 14 2014 at 15:46 -0700, Stephen Boyd wrote: On 10/24, Lina Iyer wrote: +{ +struct spm_driver_data *drv = this_cpu_ptr(cpu_spm_drv); +u32 start_index; +u32 ctl_val; + +if (!drv-available) +return -ENXIO; It

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-17 Thread Daniel Lezcano
On 10/25/2014 01:40 AM, Lina Iyer wrote: Hi Lina, [ ... ] +static inline void spm_register_write(struct spm_driver_data *drv, + enum spm_reg reg, u32 val) +{ + if (drv-reg_data-reg_offset[reg]) + writel_relaxed(val, drv-reg_base + +

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-14 Thread Daniel Lezcano
On 10/25/2014 01:40 AM, Lina Iyer wrote: SPM is a hardware block that controls the peripheral logic surrounding the application cores (cpu/l$). When the core executes WFI instruction, the SPM takes over the putting the core in low power state as configured. The wake up for the SPM is an

Re: [PATCH v9 2/9] qcom: spm: Add Subsystem Power Manager driver

2014-11-14 Thread Stephen Boyd
On 10/24, Lina Iyer wrote: diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c new file mode 100644 index 000..ee2e3ca --- /dev/null +++ b/drivers/soc/qcom/spm.c +#include linux/module.h +#include linux/kernel.h +#include linux/delay.h Is this used? +#include linux/init.h