Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-17 Thread Daniel Lezcano
On 12/16/2014 03:38 PM, Arnd Bergmann wrote: On Tuesday 16 December 2014 15:12:22 Daniel Lezcano wrote: At the beginning, all that become from not including mach files from the drivers directory which make sense. Perhaps it is time to write a similar mechanism for the cpuidle drivers where we

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-17 Thread Lorenzo Pieralisi
On Wed, Dec 17, 2014 at 01:15:28PM +, Daniel Lezcano wrote: [...] I would assume that the same can be done for most other platforms. There are probably cases where the same piece of hardware is responsible for both cpuidle and cpufreq, but what that means is really that you should

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-17 Thread Lina Iyer
On Tue, Dec 16 2014 at 12:18 -0700, Stephen Boyd wrote: On 12/16/2014 06:38 AM, Arnd Bergmann wrote: On Tuesday 16 December 2014 15:12:22 Daniel Lezcano wrote: At the beginning, all that become from not including mach files from the drivers directory which make sense. Perhaps it is time to

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-16 Thread Daniel Lezcano
On 12/04/2014 07:20 PM, Arnd Bergmann wrote: On Thursday 04 December 2014 09:28:34 Lina Iyer wrote: On Thu, Dec 04 2014 at 02:02 -0700, Arnd Bergmann wrote: On Thursday 04 December 2014 09:52:39 Daniel Lezcano wrote: On 12/03/2014 09:35 PM, Arnd Bergmann wrote: On Wednesday 03 December 2014

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-16 Thread Arnd Bergmann
On Tuesday 16 December 2014 15:12:22 Daniel Lezcano wrote: At the beginning, all that become from not including mach files from the drivers directory which make sense. Perhaps it is time to write a similar mechanism for the cpuidle drivers where we can still separate the low level PM code

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-16 Thread Arnd Bergmann
On Friday 05 December 2014 08:45:26 Lina Iyer wrote: On Thu, Dec 04 2014 at 11:20 -0700, Arnd Bergmann wrote: On Thursday 04 December 2014 09:28:34 Lina Iyer wrote: Having all cpuidle code generally live in drivers/cpuidle is still a good idea IMO, but using a platform device just for the

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-16 Thread Stephen Boyd
On 12/16/2014 06:38 AM, Arnd Bergmann wrote: On Tuesday 16 December 2014 15:12:22 Daniel Lezcano wrote: At the beginning, all that become from not including mach files from the drivers directory which make sense. Perhaps it is time to write a similar mechanism for the cpuidle drivers where

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-16 Thread Arnd Bergmann
On Tuesday 16 December 2014 11:18:18 Stephen Boyd wrote: On 12/16/2014 06:38 AM, Arnd Bergmann wrote: On Tuesday 16 December 2014 15:12:22 Daniel Lezcano wrote: At the beginning, all that become from not including mach files from the drivers directory which make sense. Perhaps it is

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-05 Thread Lina Iyer
On Thu, Dec 04 2014 at 11:20 -0700, Arnd Bergmann wrote: On Thursday 04 December 2014 09:28:34 Lina Iyer wrote: On Thu, Dec 04 2014 at 02:02 -0700, Arnd Bergmann wrote: On Thursday 04 December 2014 09:52:39 Daniel Lezcano wrote: On 12/03/2014 09:35 PM, Arnd Bergmann wrote: On Wednesday 03

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-04 Thread Daniel Lezcano
On 12/03/2014 09:35 PM, Arnd Bergmann wrote: On Wednesday 03 December 2014 07:31:22 Lina Iyer wrote: +static int __init qcom_spm_init(void) +{ +int ret; + +/* + * cpuidle driver need to registered before the cpuidle device + * for any cpu. Register the device for the the cpuidle

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-04 Thread Arnd Bergmann
On Thursday 04 December 2014 09:52:39 Daniel Lezcano wrote: On 12/03/2014 09:35 PM, Arnd Bergmann wrote: On Wednesday 03 December 2014 07:31:22 Lina Iyer wrote: +static int __init qcom_spm_init(void) +{ +int ret; + +/* + * cpuidle driver need to registered before the

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-04 Thread Lina Iyer
On Thu, Dec 04 2014 at 02:02 -0700, Arnd Bergmann wrote: On Thursday 04 December 2014 09:52:39 Daniel Lezcano wrote: On 12/03/2014 09:35 PM, Arnd Bergmann wrote: On Wednesday 03 December 2014 07:31:22 Lina Iyer wrote: +static int __init qcom_spm_init(void) +{ +int ret; + +/* +

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-04 Thread Arnd Bergmann
On Thursday 04 December 2014 09:28:34 Lina Iyer wrote: On Thu, Dec 04 2014 at 02:02 -0700, Arnd Bergmann wrote: On Thursday 04 December 2014 09:52:39 Daniel Lezcano wrote: On 12/03/2014 09:35 PM, Arnd Bergmann wrote: On Wednesday 03 December 2014 07:31:22 Lina Iyer wrote: +static int

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-03 Thread Daniel Lezcano
On 12/03/2014 12:05 AM, Lina Iyer wrote: On Tue, Dec 02 2014 at 10:40 -0700, Lina Iyer wrote: + [...] [ ... ] +static int __init qcom_spm_init(void) +{ +int ret; + +/* + * cpuidle driver need to registered before the cpuidle device + * for any cpu. Register the device for the

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-03 Thread Lina Iyer
On Wed, Dec 03 2014 at 02:11 -0700, Daniel Lezcano wrote: On 12/03/2014 12:05 AM, Lina Iyer wrote: On Tue, Dec 02 2014 at 10:40 -0700, Lina Iyer wrote: + [...] [ ... ] +static int __init qcom_spm_init(void) +{ +int ret; + +/* + * cpuidle driver need to registered before the

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-03 Thread Lina Iyer
On Wed, Dec 03 2014 at 07:31 -0700, Lina Iyer wrote: On Wed, Dec 03 2014 at 02:11 -0700, Daniel Lezcano wrote: On 12/03/2014 12:05 AM, Lina Iyer wrote: On Tue, Dec 02 2014 at 10:40 -0700, Lina Iyer wrote: + [...] [ ... ] +static int __init qcom_spm_init(void) +{ +int ret; + +/* +

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-03 Thread Arnd Bergmann
On Wednesday 03 December 2014 07:31:22 Lina Iyer wrote: +static int __init qcom_spm_init(void) +{ +int ret; + +/* + * cpuidle driver need to registered before the cpuidle device + * for any cpu. Register the device for the the cpuidle driver. + */ +ret =

[PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-02 Thread Lina Iyer
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 interrupt at the GIC, which then completes the rest

Re: [PATCH v14 03/10] qcom: spm: Add Subsystem Power Manager driver

2014-12-02 Thread Lina Iyer
On Tue, Dec 02 2014 at 10:40 -0700, Lina Iyer wrote: + [...] +static int spm_dev_probe(struct platform_device *pdev) +{ + struct spm_driver_data *drv; + struct resource *res; + const struct of_device_id *match_id; + void __iomem *addr; + int cpu; + struct