[PATCH V2 RESEND 1/4] PM / devfreq: Use more accurate returned new_freq as resume_freq

2021-03-23 Thread Dong Aisheng
Use the more accurate returned new_freq as resume_freq. It's the same as how devfreq->previous_freq was updated. Fixes: 83f8ca45afbf0 ("PM / devfreq: add support for suspend/resume of a devfreq device") Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 2 +- 1 fi

[PATCH V2 RESEND 3/4] PM / devfreq: bail out early if no freq changes in devfreq_set_target

2021-03-23 Thread Dong Aisheng
It's unnecessary to set the same freq again and run notifier calls. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 85927bd7ee76..a6ee91dd17bd

[PATCH V2 RESEND 4/4] PM / devfreq: imx8m-ddrc: remove imx8m_ddrc_get_dev_status

2021-03-23 Thread Dong Aisheng
-ondemand governor. Signed-off-by: Dong Aisheng --- drivers/devfreq/imx8m-ddrc.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/devfreq/imx8m-ddrc.c b/drivers/devfreq/imx8m-ddrc.c index bc82d3653bff..ecb9375aa877 100644 --- a/drivers/devfreq/imx8m-ddrc.c +++ b/drivers/devfreq

[PATCH V2 RESEND 2/4] PM / devfreq: Remove the invalid description for get_target_freq

2021-03-23 Thread Dong Aisheng
is invalid description now to avoid confusing. Signed-off-by: Dong Aisheng --- Documentation/ABI/testing/sysfs-class-devfreq | 5 + drivers/devfreq/governor.h| 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Doc

[PATCH V2 RESEND 0/4] PM / devfreq: a few small fixes and improvements

2021-03-23 Thread Dong Aisheng
A few small fixes and improvements ChangeLog: v2 Resend: * rebase to devfreq-next * drop original patch 1 & 5. Patch 5 will be re-sent later when dependent patches merged. v1->v2: * squash a few patches * rebase to devfreq-testing Dong Aisheng (4): PM / devfreq: Use more a

Re: [PATCH V2 0/6] PM / devfreq: a few small fixes and improvements

2021-03-22 Thread Dong Aisheng
Hi Chanwoo, On Tue, Mar 23, 2021 at 11:13 AM Dong Aisheng wrote: > > A few small fixes and improvements > > ChangeLog: > v1->v2: > * squash a few patches > * rebase to devfreq-testing I have to rebase to devfreq-testing instead of devfreq-next because below two patch

[PATCH V2 6/6] PM / devfreq: imx8m-ddrc: remove imx8m_ddrc_get_dev_status

2021-03-22 Thread Dong Aisheng
-ondemand governor. Signed-off-by: Dong Aisheng --- drivers/devfreq/imx8m-ddrc.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/devfreq/imx8m-ddrc.c b/drivers/devfreq/imx8m-ddrc.c index bc82d3653bff..ecb9375aa877 100644 --- a/drivers/devfreq/imx8m-ddrc.c +++ b/drivers/devfreq

[PATCH V2 5/6] PM / devfreq: governor: optimize simpleondemand get_target_freq

2021-03-22 Thread Dong Aisheng
it one time during DEVFREQ_GOV_START. This also helps check data validability in advance during DEVFREQ_GOV_START rather than checking it later when running .get_target_freq(). Signed-off-by: Dong Aisheng --- Change Log: v1->v2: * rebase to devfreq-testing --- drivers/devfreq/devfre

[PATCH V2 1/6] PM / devfreq: fix build error when DEVFREQ_GOV_PASSIVE enabled

2021-03-22 Thread Dong Aisheng
ame, | ^ | governor Fixes: 5cc75e9252e9 ("PM / devfreq: Add devfreq_transitions debugfs file") Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/de

[PATCH V2 3/6] PM / devfreq: Remove the invalid description for get_target_freq

2021-03-22 Thread Dong Aisheng
is invalid description now to avoid confusing. Signed-off-by: Dong Aisheng --- Documentation/ABI/testing/sysfs-class-devfreq | 5 + drivers/devfreq/governor.h| 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Doc

[PATCH V2 0/6] PM / devfreq: a few small fixes and improvements

2021-03-22 Thread Dong Aisheng
A few small fixes and improvements ChangeLog: v1->v2: * squash a few patches * rebase to devfreq-testing * drop two patches which are already in devfreq-next Dong Aisheng (6): PM / devfreq: fix build error when DEVFREQ_GOV_PASSIVE enabled PM / devfreq: Use more accurate returned new_f

[PATCH V2 2/6] PM / devfreq: Use more accurate returned new_freq as resume_freq

2021-03-22 Thread Dong Aisheng
Use the more accurate returned new_freq as resume_freq. It's the same as how devfreq->previous_freq was updated. Fixes: 83f8ca45afbf0 ("PM / devfreq: add support for suspend/resume of a devfreq device") Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 2 +- 1 fi

[PATCH V2 4/6] PM / devfreq: bail out early if no freq changes in devfreq_set_target

2021-03-22 Thread Dong Aisheng
It's unnecessary to set the same freq again and run notifier calls. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index b537fd9602cd..cacda7d1f858

Re: [PATCH 07/11] PM / devfreq: check get_dev_status before start monitor

2021-03-18 Thread Dong Aisheng
On Thu, Mar 18, 2021 at 5:42 PM Chanwoo Choi wrote: > > On 3/18/21 6:54 PM, Chanwoo Choi wrote: > > On 3/18/21 5:03 PM, Dong Aisheng wrote: > >> Hi Chanwoo, > >> > >> On Sat, Mar 13, 2021 at 2:45 PM Dong Aisheng wrote: > >>> > &g

Re: [PATCH 07/11] PM / devfreq: check get_dev_status before start monitor

2021-03-18 Thread Dong Aisheng
Hi Chanwoo, On Sat, Mar 13, 2021 at 2:45 PM Dong Aisheng wrote: > > On Sat, Mar 13, 2021 at 12:09 AM Chanwoo Choi wrote: > > > > On 21. 3. 12. 오후 7:57, Dong Aisheng wrote: > > > On Thu, Mar 11, 2021 at 2:54 PM Chanwoo Choi > > > wrote: > > >&g

Re: [PATCH 07/11] PM / devfreq: check get_dev_status before start monitor

2021-03-12 Thread Dong Aisheng
On Sat, Mar 13, 2021 at 12:09 AM Chanwoo Choi wrote: > > On 21. 3. 12. 오후 7:57, Dong Aisheng wrote: > > On Thu, Mar 11, 2021 at 2:54 PM Chanwoo Choi wrote: > >> > >> On 3/10/21 1:56 PM, Dong Aisheng wrote: > >>> On Wed, Mar 10, 2021 at 11:08 AM Chanwoo

Re: [PATCH 07/11] PM / devfreq: check get_dev_status before start monitor

2021-03-12 Thread Dong Aisheng
On Thu, Mar 11, 2021 at 2:54 PM Chanwoo Choi wrote: > > On 3/10/21 1:56 PM, Dong Aisheng wrote: > > On Wed, Mar 10, 2021 at 11:08 AM Chanwoo Choi wrote: > >> > >> On 3/10/21 11:56 AM, Dong Aisheng wrote: > >>> On Wed, Mar 10, 2021 at 12:12 AM Chanwoo C

Re: [PATCH 07/11] PM / devfreq: check get_dev_status before start monitor

2021-03-09 Thread Dong Aisheng
On Wed, Mar 10, 2021 at 11:08 AM Chanwoo Choi wrote: > > On 3/10/21 11:56 AM, Dong Aisheng wrote: > > On Wed, Mar 10, 2021 at 12:12 AM Chanwoo Choi wrote: > >> > >> On 21. 3. 10. 오전 12:58, Chanwoo Choi wrote: > >>> On 21. 3. 9. 오후 9:58, Dong Aisheng

Re: [PATCH 05/11] PM / devfreq: use more accurate returned new_freq as resume_freq

2021-03-09 Thread Dong Aisheng
On Wed, Mar 10, 2021 at 10:50 AM Chanwoo Choi wrote: > > On 3/10/21 11:43 AM, Dong Aisheng wrote: > > On Tue, Mar 9, 2021 at 11:53 PM Chanwoo Choi wrote: > >> > >> On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > >>> Use the more accurate returned new_freq

Re: [PATCH 11/11] PM / devfreq: imx8m-ddrc: drop polling_ms

2021-03-09 Thread Dong Aisheng
On Wed, Mar 10, 2021 at 12:23 AM Chanwoo Choi wrote: > > On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > > polling_ms is only used by simple ondemand governor which > > this driver can't support. Drop it to avoid confusing. > > > > Signed-off-by: Dong Aisheng >

Re: [PATCH 09/11] PM / devfreq: governor: optimize simpleondemand get_target_freq

2021-03-09 Thread Dong Aisheng
On Wed, Mar 10, 2021 at 12:09 AM Chanwoo Choi wrote: > > On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > > devfreq_simple_ondemand_data only needs to be initialized once when > > calling devm_devfreq_add_device. It's unnecessary to put the data > > check logic in the ho

Re: [PATCH 08/11] PM / devfreq: check get_dev_status in devfreq_update_stats

2021-03-09 Thread Dong Aisheng
On Wed, Mar 10, 2021 at 12:20 AM Chanwoo Choi wrote: > > On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > > Check .get_dev_status() in devfreq_update_stats in case it's abused > > when a device does not provide it. > > > > Signed-off-by: Dong Aisheng > > ---

Re: [PATCH 07/11] PM / devfreq: check get_dev_status before start monitor

2021-03-09 Thread Dong Aisheng
On Wed, Mar 10, 2021 at 12:12 AM Chanwoo Choi wrote: > > On 21. 3. 10. 오전 12:58, Chanwoo Choi wrote: > > On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > >> The devfreq monitor depends on the device to provide load information > >> by .get_dev_status() to

Re: [PATCH 07/11] PM / devfreq: check get_dev_status before start monitor

2021-03-09 Thread Dong Aisheng
On Tue, Mar 9, 2021 at 11:58 PM Chanwoo Choi wrote: > > On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > > The devfreq monitor depends on the device to provide load information > > by .get_dev_status() to calculate the next target freq. > > > > And this will cause changi

Re: [PATCH 05/11] PM / devfreq: use more accurate returned new_freq as resume_freq

2021-03-09 Thread Dong Aisheng
On Tue, Mar 9, 2021 at 11:53 PM Chanwoo Choi wrote: > > On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > > Use the more accurate returned new_freq as resume_freq. > > It's the same as how devfreq->previous_freq was updated. > > > > Signed-off-by: Dong Aisheng > &

Re: [PATCH 04/11] PM / devfreq: bail out early if no freq changes in devfreq_set_target

2021-03-09 Thread Dong Aisheng
On Tue, Mar 9, 2021 at 11:47 PM Chanwoo Choi wrote: > > On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > > It's unnecessary to set the same freq again and run notifier calls. > > > > Signed-off-by: Dong Aisheng > > --- > > drivers/devfreq/devfreq.c | 5 - >

Re: [PATCH 03/11] PM / devfreq: fix the wrong set_freq path for userspace governor

2021-03-09 Thread Dong Aisheng
On Tue, Mar 9, 2021 at 11:13 PM Chanwoo Choi wrote: > > On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > > Fix the wrong set_freq path for userspace governor. > > > > Signed-off-by: Dong Aisheng > > --- > > drivers/devfreq/Kconfig | 2 +- > >

Re: [PATCH 02/11] PM / devfreq: remove the invalid description for get_target_freq

2021-03-09 Thread Dong Aisheng
On Tue, Mar 9, 2021 at 11:02 PM Chanwoo Choi wrote: > > On 21. 3. 9. 오후 9:58, Dong Aisheng wrote: > > First of all, no_central_polling was removed since > > commit 7e6fdd4bad03 ("PM / devfreq: Core updates to support devices > > which can idle") > > Second

Re: [RFC 05/19] devfreq: imx8m-ddrc: Change governor to powersave

2021-03-09 Thread Dong Aisheng
On Sat, Feb 20, 2021 at 12:03 AM Abel Vesa wrote: > > By switching to powersave governor, we allow the imx8m-ddrc to always > run at minimum rate needed by all the running masters. > > Signed-off-by: Abel Vesa Would you please help clarify a bit more why need use powersave by default? Regards

[PATCH 11/11] PM / devfreq: imx8m-ddrc: drop polling_ms

2021-03-09 Thread Dong Aisheng
polling_ms is only used by simple ondemand governor which this driver can't support. Drop it to avoid confusing. Signed-off-by: Dong Aisheng --- drivers/devfreq/imx8m-ddrc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/devfreq/imx8m-ddrc.c b/drivers/devfreq/imx8m-ddrc.c index

[PATCH 06/11] PM / devfreq: drop the unnecessary low variable initialization

2021-03-09 Thread Dong Aisheng
drop the unnecessary low variable initialization and make the return more straightforward. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index ce569bd9adfa

[PATCH 07/11] PM / devfreq: check get_dev_status before start monitor

2021-03-09 Thread Dong Aisheng
The devfreq monitor depends on the device to provide load information by .get_dev_status() to calculate the next target freq. And this will cause changing governor to simple ondemand fail if device can't support. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 10

[PATCH 08/11] PM / devfreq: check get_dev_status in devfreq_update_stats

2021-03-09 Thread Dong Aisheng
Check .get_dev_status() in devfreq_update_stats in case it's abused when a device does not provide it. Signed-off-by: Dong Aisheng --- drivers/devfreq/governor.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h index 31af6d072a10

[PATCH 09/11] PM / devfreq: governor: optimize simpleondemand get_target_freq

2021-03-09 Thread Dong Aisheng
DEVFREQ_GOV_START. This also helps check data validability in advance during DEVFREQ_GOV_START rather than checking it later when running .get_target_freq(). Signed-off-by: Dong Aisheng --- drivers/devfreq/governor_simpleondemand.c | 50 +++ 1 file changed, 34 insertions(+), 16

[PATCH 10/11] PM / devfreq: imx8m-ddrc: remove imx8m_ddrc_get_dev_status

2021-03-09 Thread Dong Aisheng
Current driver actually does not support simple ondemand governor as it's unable to provide device load information. So removing the unnecessary callback to avoid confusing. Right now the driver is using userspace governor by default. Signed-off-by: Dong Aisheng --- drivers/devfreq/imx8m-ddrc.c

[PATCH 05/11] PM / devfreq: use more accurate returned new_freq as resume_freq

2021-03-09 Thread Dong Aisheng
Use the more accurate returned new_freq as resume_freq. It's the same as how devfreq->previous_freq was updated. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfre

[PATCH 04/11] PM / devfreq: bail out early if no freq changes in devfreq_set_target

2021-03-09 Thread Dong Aisheng
It's unnecessary to set the same freq again and run notifier calls. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index bf3047896e41..6e80bf70e7b3 100644

[PATCH 11/11] PM / devfreq: imx8m-ddrc: drop polling_ms

2021-03-09 Thread Dong Aisheng
polling_ms is only used by simple ondemand governor which this driver can't support. Drop it to avoid confusing. Signed-off-by: Dong Aisheng --- drivers/devfreq/imx8m-ddrc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/devfreq/imx8m-ddrc.c b/drivers/devfreq/imx8m-ddrc.c index

[PATCH 01/11] doc: ABI: devfreq: remove invalid central_polling description

2021-03-09 Thread Dong Aisheng
no_central_polling has been removed since commit 7e6fdd4bad03 ("PM / devfreq: Core updates to support devices which can idle") Signed-off-by: Dong Aisheng --- Documentation/ABI/testing/sysfs-class-devfreq | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Documen

[PATCH 02/11] PM / devfreq: remove the invalid description for get_target_freq

2021-03-09 Thread Dong Aisheng
is invalid description now to avoid confusing. Signed-off-by: Dong Aisheng --- drivers/devfreq/governor.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h index 70f44b3ca42e..5cee3f64fe2b 100644 --- a/drivers/devfreq/governor.h +++ b/drive

[PATCH 00/11] PM / devfreq: a few small fixes and improvements

2021-03-09 Thread Dong Aisheng
A few small fixes and improvements Dong Aisheng (11): doc: ABI: devfreq: remove invalid central_polling description PM / devfreq: remove the invalid description for get_target_freq PM / devfreq: fix the wrong set_freq path for userspace governor PM / devfreq: bail out early if no freq

[PATCH 03/11] PM / devfreq: fix the wrong set_freq path for userspace governor

2021-03-09 Thread Dong Aisheng
Fix the wrong set_freq path for userspace governor. Signed-off-by: Dong Aisheng --- drivers/devfreq/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig index 00704efe6398..20373a893b44 100644 --- a/drivers/devfreq/Kconfig

[PATCH 10/11] PM / devfreq: imx8m-ddrc: remove imx8m_ddrc_get_dev_status

2021-03-09 Thread Dong Aisheng
Current driver actually does not support simple ondemand governor as it's unable to provide device load information. So removing the unnecessary callback to avoid confusing. Right now the driver is using userspace governor by default. Signed-off-by: Dong Aisheng --- drivers/devfreq/imx8m-ddrc.c

[PATCH 08/11] PM / devfreq: check get_dev_status in devfreq_update_stats

2021-03-09 Thread Dong Aisheng
Check .get_dev_status() in devfreq_update_stats in case it's abused when a device does not provide it. Signed-off-by: Dong Aisheng --- drivers/devfreq/governor.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h index 31af6d072a10

[PATCH 07/11] PM / devfreq: check get_dev_status before start monitor

2021-03-09 Thread Dong Aisheng
The devfreq monitor depends on the device to provide load information by .get_dev_status() to calculate the next target freq. And this will cause changing governor to simple ondemand fail if device can't support. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 10

[PATCH 09/11] PM / devfreq: governor: optimize simpleondemand get_target_freq

2021-03-09 Thread Dong Aisheng
DEVFREQ_GOV_START. This also helps check data validability in advance during DEVFREQ_GOV_START rather than checking it later when running .get_target_freq(). Signed-off-by: Dong Aisheng --- drivers/devfreq/governor_simpleondemand.c | 50 +++ 1 file changed, 34 insertions(+), 16

[PATCH 06/11] PM / devfreq: drop the unnecessary low variable initialization

2021-03-09 Thread Dong Aisheng
drop the unnecessary low variable initialization and make the return more straightforward. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index ce569bd9adfa

[PATCH 04/11] PM / devfreq: bail out early if no freq changes in devfreq_set_target

2021-03-09 Thread Dong Aisheng
It's unnecessary to set the same freq again and run notifier calls. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index bf3047896e41..6e80bf70e7b3 100644

[PATCH 05/11] PM / devfreq: use more accurate returned new_freq as resume_freq

2021-03-09 Thread Dong Aisheng
Use the more accurate returned new_freq as resume_freq. It's the same as how devfreq->previous_freq was updated. Signed-off-by: Dong Aisheng --- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfre

[PATCH 02/11] PM / devfreq: remove the invalid description for get_target_freq

2021-03-09 Thread Dong Aisheng
is invalid description now to avoid confusing. Signed-off-by: Dong Aisheng --- drivers/devfreq/governor.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h index 70f44b3ca42e..5cee3f64fe2b 100644 --- a/drivers/devfreq/governor.h +++ b/drive

[PATCH 03/11] PM / devfreq: fix the wrong set_freq path for userspace governor

2021-03-09 Thread Dong Aisheng
Fix the wrong set_freq path for userspace governor. Signed-off-by: Dong Aisheng --- drivers/devfreq/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig index 00704efe6398..20373a893b44 100644 --- a/drivers/devfreq/Kconfig

[PATCH 01/11] doc: ABI: devfreq: remove invalid central_polling description

2021-03-09 Thread Dong Aisheng
no_central_polling has been removed since commit 7e6fdd4bad03 ("PM / devfreq: Core updates to support devices which can idle") Signed-off-by: Dong Aisheng --- Documentation/ABI/testing/sysfs-class-devfreq | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Documen

[PATCH 00/11] PM / devfreq: a few small fixes and improvements

2021-03-09 Thread Dong Aisheng
A few small fixes and improvements Dong Aisheng (11): doc: ABI: devfreq: remove invalid central_polling description PM / devfreq: remove the invalid description for get_target_freq PM / devfreq: fix the wrong set_freq path for userspace governor PM / devfreq: bail out early if no freq

[PATCH 2/3] of: property: add debug info for supplier devices still unavailable

2020-11-19 Thread Dong Aisheng
It's normal that supplier devices may still unavaiable when parse DT to create dependency. e.g. supplier devices populated by drivers. Add debug info for this case. Cc: devicet...@vger.kernel.org Cc: Saravana Kannan Cc: Rob Herring Cc: Greg Kroah-Hartman Signed-off-by: Dong Aisheng

[PATCH 3/3] of: property: fix document of of_get_next_parent_dev

2020-11-19 Thread Dong Aisheng
Fix document of of_get_next_parent_dev. Cc: devicet...@vger.kernel.org Cc: Saravana Kannan Cc: Rob Herring Cc: Greg Kroah-Hartman Signed-off-by: Dong Aisheng --- drivers/of/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/property.c b/drivers

[PATCH 1/3] driver core: simply go out if the same device_link is added again

2020-11-19 Thread Dong Aisheng
It's possible that the same device link may be added by parsing the function dependecy in DT. e.g. clock/gpio/regulators. Simply go out for this case. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Saravana Kannan Signed-off-by: Dong Aisheng --- drivers/base/core.c | 3 +

Re: [PATCH v5 10/14] clk: imx: Add generic blk-ctl driver

2020-11-11 Thread Dong Aisheng
On Tue, Nov 3, 2020 at 7:22 PM Abel Vesa wrote: ... > +static int imx_blk_ctl_reset_set(struct reset_controller_dev *rcdev, > + unsigned long id, bool assert) > +{ > + struct imx_blk_ctl_drvdata *drvdata = container_of(rcdev, > + struct

Re: [PATCH v3 10/14] clk: imx: Add generic blk-ctl driver

2020-09-11 Thread Dong Aisheng
On Tue, Sep 8, 2020 at 6:27 PM Abel Vesa wrote: > > The i.MX8MP platform introduces a new type of IP which is called BLK_CTL in > RM and usually is comprised of some GPRs that are considered too > generic to be part of any dedicated IP from that specific subsystem. > > In general, some of the

Re: [PATCH v1] driver core: Fix device_pm_lock() locking for device links

2020-09-01 Thread Dong Aisheng
Hi Saravana On Tue, Sep 1, 2020 at 6:10 AM Saravana Kannan wrote: > > This commit fixes two issues: > > 1. The lockdep warning reported by Dong Aisheng [1]. > > It is a warning about a cycle (dpm_list_mtx --> kn->active#3 --> fw_lock) > that was introduced when

Re: [PATCH 21/22] arm64: dts: imx8qxp: Remove i.MX7 compatible from USDHC

2020-08-24 Thread Dong Aisheng
On Mon, Aug 24, 2020 at 6:32 PM Krzysztof Kozlowski wrote: > > On Mon, Aug 24, 2020 at 10:31:31AM +, Bough Chen wrote: > > > -Original Message----- > > > From: Dong Aisheng [mailto:donga...@gmail.com] > > > Sent: 2020年8月24日 17:45 > > > To: K

Re: [PATCH 21/22] arm64: dts: imx8qxp: Remove i.MX7 compatible from USDHC

2020-08-24 Thread Dong Aisheng
On Mon, Aug 24, 2020 at 5:15 PM Krzysztof Kozlowski wrote: > > On Mon, Aug 24, 2020 at 09:00:19AM +, Aisheng Dong wrote: > > > From: Krzysztof Kozlowski > > > Sent: Monday, August 24, 2020 12:16 AM > > > > > > The USDHC on i.MX 8QXP has its own compatible described in bindings and > > > used

Lockdep warning caused by "driver core: Fix sleeping in invalid context during device link deletion"

2020-08-20 Thread Dong Aisheng
Hi ALL, We met the below WARNING during system suspend on an iMX6Q SDB board with the latest linus/master branch (v5.9-rc1+) and next-20200820. v5.8 kernel is ok. So i did bisect and finally found it's caused by the patch below. Reverting it can get rid of the warning, but I wonder if there may

Re: [PATCH v2 11/17] clk: imx: Add blk_ctrl combo driver

2020-08-19 Thread Dong Aisheng
On Thu, Aug 20, 2020 at 4:31 AM Abel Vesa wrote: > > > +extern const struct imx_blk_ctrl_dev_data imx8mp_audio_blk_ctrl_dev_data > > > __initconst; > > > +extern const struct imx_blk_ctrl_dev_data imx8mp_media_blk_ctrl_dev_data > > > __initconst; > > > +extern const struct

Re: [PATCH v2 16/17] arm64: dts: imx8mp: Add media_blk_ctrl node

2020-08-19 Thread Dong Aisheng
Hi Rob, Stephen, On Thu, Aug 20, 2020 at 4:37 AM Abel Vesa wrote: > > On 20-08-18 19:34:14, Dong Aisheng wrote: > > On Fri, Aug 14, 2020 at 8:12 PM Abel Vesa wrote: > > > > > > Some of the features of the media_ctrl will be used by some > > > different d

Re: [PATCH v2 16/17] arm64: dts: imx8mp: Add media_blk_ctrl node

2020-08-18 Thread Dong Aisheng
trl: clock-controller@32ec { For this combo device, maybe we can directly name it as blk-ctrl@32ec. Rob, do you think if we can do that? > + compatible = "fsl,imx8mp-media-blk-ctrl", > "syscon"; > +

Re: [PATCH v2 15/17] arm64: dts: imx8mp: Add audio_blk_ctrl node

2020-08-18 Thread Dong Aisheng
audio_blk_ctrl: clock-controller@30e2 { > + compatible = "fsl,imx8mp-audio-blk-ctrl", > "syscon"; > + reg = <0x30e2 0x50C>; 0x50c > + remove unnecessary blank line O

Re: [PATCH v2 12/17] clk: imx8mp: Add audio blk_ctrl clocks and resets

2020-08-18 Thread Dong Aisheng
On Fri, Aug 14, 2020 at 8:12 PM Abel Vesa wrote: > > Add audio blk_ctrl clocks and resets in the i.MX8MP clock > driver to be picked up by the clk-blk-ctrl driver. > > Signed-off-by: Abel Vesa > --- > drivers/clk/imx/clk-blk-ctrl.c | 4 ++ > drivers/clk/imx/clk-imx8mp.c | 138 >

Re: [PATCH v2 11/17] clk: imx: Add blk_ctrl combo driver

2020-08-18 Thread Dong Aisheng
On Fri, Aug 14, 2020 at 8:12 PM Abel Vesa wrote: > > On i.MX8MP, there is a new type of IP which is called BLK_CTRL in > RM and usually is comprised of some GPRs that are considered too > generic to be part of any dedicated IP from that specific subsystem. > > In general, some of the GPRs have

Re: [PATCH v2 10/17] Documentation: bindings: clk: Add bindings for i.MX BLK_CTRL

2020-08-17 Thread Dong Aisheng
On Fri, Aug 14, 2020 at 8:14 PM Abel Vesa wrote: > > Document the i.MX BLK_CTRL with its devicetree properties. > > Signed-off-by: Abel Vesa Reviewed-by: Dong Aisheng Regards Aisheng

Re: [PATCH v2 09/17] arm64: dts: Remove imx-hdmimix-reset header file

2020-08-17 Thread Dong Aisheng
On Fri, Aug 14, 2020 at 8:13 PM Abel Vesa wrote: > > The hdmi BLK_CTRL ids have been moved to imx8mp-reset.h > > Signed-off-by: Abel Vesa The change seems do not comply with the patch title? Regards Aisheng > --- > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 + > 1 file changed, 1

Re: [PATCH v2 08/17] clk: imx8mp: Add audio shared gate

2020-08-17 Thread Dong Aisheng
- PDM_CLK_ROOT > > Signed-off-by: Abel Vesa Reviewed-by: Dong Aisheng Regards Aisheng

Re: [PATCH v2 07/17] dt-bindings: reset: imx8mp: Add hdmi blk_ctrl reset IDs

2020-08-17 Thread Dong Aisheng
On Fri, Aug 14, 2020 at 8:13 PM Abel Vesa wrote: > > These will be used imx8mp for blk-ctrl driver. > > Signed-off-by: Abel Vesa > Acked-by: Rob Herring Reviewed-by: Dong Aisheng Regards Aisheng

Re: [PATCH v2 05/17] dt-bindings: reset: imx8mp: Add media blk_ctrl reset IDs

2020-08-17 Thread Dong Aisheng
On Fri, Aug 14, 2020 at 8:13 PM Abel Vesa wrote: > > These will be used by the imx8mp for blk-ctrl driver. > > Signed-off-by: Abel Vesa > Acked-by: Rob Herring Reviewed-by: Dong Aisheng Regards Aisheng

Re: [PATCH v2 04/17] dt-bindings: clock: imx8mp: Add media blk_ctrl clock IDs

2020-08-17 Thread Dong Aisheng
On Fri, Aug 14, 2020 at 8:14 PM Abel Vesa wrote: > > These will be used by the imx8mp for blk-ctrl driver. > > Signed-off-by: Abel Vesa > Acked-by: Rob Herring Reviewed-by: Dong Aisheng Regards Aisheng

Re: [PATCH v2 03/17] dt-bindings: clock: imx8mp: Add ids for the audio shared gate

2020-08-17 Thread Dong Aisheng
On Fri, Aug 14, 2020 at 8:13 PM Abel Vesa wrote: > > All these IDs are for one single HW gate (CCGR101) that is shared > between these root clocks. > > Signed-off-by: Abel Vesa > Acked-by: Rob Herring Reviewed-by: Dong Aisheng Regards Aisheng

Re: [PATCH v2 02/17] dt-bindings: reset: imx8mp: Add audio blk_ctrl reset IDs

2020-08-17 Thread Dong Aisheng
On Fri, Aug 14, 2020 at 8:13 PM Abel Vesa wrote: > > These will be used by the imx8mp for blk-ctrl driver. > > Signed-off-by: Abel Vesa Reviewed-by: Dong Aisheng Regards Aisheng

Re: [PATCH v2 01/17] dt-bindings: clocks: imx8mp: Rename audiomix ids clocks to audio_blk_ctrl

2020-08-17 Thread Dong Aisheng
or me to change it now. Reviewed-by: Dong Aisheng Regards Aisheng > --- > include/dt-bindings/clock/imx8mp-clock.h | 120 > +++ > 1 file changed, 60 insertions(+), 60 deletions(-) > > diff --git a/include/dt-bindings/clock/imx8mp-clock.h >

Re: [PATCH V4 3/5] clk: imx: Support building i.MX common clock driver as module

2020-07-02 Thread Dong Aisheng
On Thu, Jul 2, 2020 at 2:11 PM Anson Huang wrote: > > > Subject: Re: [PATCH V4 3/5] clk: imx: Support building i.MX common clock > > driver as module > > > > On Thu, Jul 2, 2020 at 11:26 AM Anson Huang > > wrote: > > [...] > > > > > @@ -143,16 +148,18 @@ void imx_cscmr1_fixup(u32 *val) static

Re: [PATCH V4 3/5] clk: imx: Support building i.MX common clock driver as module

2020-07-01 Thread Dong Aisheng
On Thu, Jul 2, 2020 at 11:26 AM Anson Huang wrote: [...] > > > @@ -143,16 +148,18 @@ void imx_cscmr1_fixup(u32 *val) > > > static int imx_keep_uart_clocks; > > > static struct clk ** const *imx_uart_clocks; > > > > > > -static int __init imx_keep_uart_clocks_param(char *str) > > > +static int

Re: [PATCH V4 5/5] clk: imx8qxp: Support building i.MX8QXP clock driver as module

2020-07-01 Thread Dong Aisheng
On Thu, Jul 2, 2020 at 11:55 AM Anson Huang wrote: [...] > > > +{ > > > + return platform_driver_register(_lpcg_clk_driver); > > > +} > > > +device_initcall(imx8qxp_lpcg_clk_init); > > > > Any reason to change to device_initcall which looks a bit strange? > > Is it because the following

Re: [PATCH V4 5/5] clk: imx8qxp: Support building i.MX8QXP clock driver as module

2020-07-01 Thread Dong Aisheng
On Thu, Jul 2, 2020 at 10:20 AM Anson Huang wrote: > > Change configuration to "tristate", use device_initcall() instead > of builtin_platform_driver(), add module author, description and > license to support building i.MX8QXP clock drivers as module. > > Signed-off-by: Anson Huang > --- >

Re: [PATCH V4 4/5] clk: imx8m: Support module build

2020-07-01 Thread Dong Aisheng
On Thu, Jul 2, 2020 at 10:18 AM Anson Huang wrote: > > Change configuration to "tristate", add module author, description > and license to support building i.MX8M SoCs clock driver as module. > > Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Regards Aisheng

Re: [PATCH V4 3/5] clk: imx: Support building i.MX common clock driver as module

2020-07-01 Thread Dong Aisheng
On Thu, Jul 2, 2020 at 10:19 AM Anson Huang wrote: > > There are more and more requirements of building SoC specific drivers > as modules, add support for building i.MX common clock driver as module > to meet the requirement. > > Signed-off-by: Anson Huang > --- > Changes since V3: > -

Re: [PATCH V3 04/10] clk: imx: Support building SCU clock driver as module

2020-06-29 Thread Dong Aisheng
On Tue, Jun 30, 2020 at 5:16 AM Anson Huang wrote: > > Hi, Arnd > > > > Subject: Re: [PATCH V3 04/10] clk: imx: Support building SCU clock driver as > > module > > > > On Mon, Jun 29, 2020 at 4:52 PM Anson Huang > > wrote: > > > > Subject: Re: [PATCH V3 04/10] clk: imx: Support building SCU

Re: [PATCH V3 04/10] clk: imx: Support building SCU clock driver as module

2020-06-29 Thread Dong Aisheng
On Tue, Jun 30, 2020 at 3:36 AM Arnd Bergmann wrote: > > On Mon, Jun 29, 2020 at 2:53 PM Anson Huang wrote: > > > Subject: Re: [PATCH V3 04/10] clk: imx: Support building SCU clock driver > > > as > > > module > > > > > > On Mon, Jun 29, 2020 at 8:06 AM Anson Huang > > > wrote: > > > > > > >

Re: [PATCH V2 3/9] clk: imx: Support building SCU clock driver as module

2020-06-29 Thread Dong Aisheng
On Thu, Jun 25, 2020 at 6:43 AM Stephen Boyd wrote: > > Quoting Aisheng Dong (2020-06-23 19:59:09) > > > > > > - bool > > > > > > - def_bool ARCH_MXC > > > > > > + tristate "IMX clock" > > > > > > + depends on ARCH_MXC > > > > > > > > > > > > But user can still set MXC_CLK

Re: [PATCH] clk: imx: lpcg: write twice when writing lpcg regs

2019-09-09 Thread Dong Aisheng
On Sat, Sep 7, 2019 at 9:47 PM Stephen Boyd wrote: > > Quoting Peng Fan (2019-08-27 01:17:50) > > From: Peng Fan > > > > There is hardware issue that: > > The output clock the LPCG cell will not turn back on as expected, > > even though a read of the IPG registers in the LPCG indicates that > >

Re: [PATCH] clk: imx: lpcg: write twice when writing lpcg regs

2019-09-09 Thread Dong Aisheng
gt; The software workaround is to write twice to enable the LPCG clock > output. > > Signed-off-by: Peng Fan Reviewed-by: Dong Aisheng Regards Aisheng

Re: [EXT] Re: [PATCH] mailbox: imx: add support for imx v1 mu

2019-07-28 Thread Dong Aisheng
On Mon, Jul 29, 2019 at 11:03 AM Richard Zhu wrote: > > Hi Aisheng: > Thanks for your comments. > > > -Original Message----- > > From: Dong Aisheng > > Sent: 2019年7月29日 10:35 > > To: Richard Zhu > > Cc: jassisinghb...@gmail.com; Oleksij Rempel ; &g

Re: [PATCH] mailbox: imx: add support for imx v1 mu

2019-07-28 Thread Dong Aisheng
On Mon, Jul 29, 2019 at 10:36 AM Richard Zhu wrote: > > There is a version1.0 MU on i.MX7ULP platform. > One new version ID register is added, and it's offset is 0. > TRn registers are defined at the offset 0x20 ~ 0x2C. > RRn registers are defined at the offset 0x40 ~ 0x4C. > SR/CR registers are

Re: [PATCH V2 3/4] irq: imx-irqsteer: change to use reg_num instead of irq_group

2019-01-30 Thread Dong Aisheng
data->saved_reg = devm_kzalloc(>dev, > > > - sizeof(u32) * data->irq_groups * 2, > > > + sizeof(u32) * data->reg_num, > > GFP_KERNEL); > > Does this last parameter now fit on the line above? > No, 81 now. :) Regards Dong Aisheng

Re: [PATCH V2 4/4] irq: imx: irqsteer: add multi output interrupts support

2019-01-30 Thread Dong Aisheng
On Wed, Jan 30, 2019 at 9:33 PM Lucas Stach wrote: > > Am Mittwoch, den 30.01.2019, 13:06 + schrieb Aisheng Dong: > > One irqsteer channel can support up to 8 output interrupts. > > > > > Cc: Marc Zyngier > > > Cc: Lucas Stach > > > Cc:

Re: [PATCH V2 2/4] dt-bindings: irq: imx-irqsteer: add multi output interrupts support

2019-01-30 Thread Dong Aisheng
s Stach > > > Cc: Shawn Guo > > Cc: devicet...@vger.kernel.org > > > Signed-off-by: Dong Aisheng > > --- > > ChangeLog: > > v1->v2: > > * remove one unnecessary note. > > --- > > .../devicetree/bindings/interrupt-controller/fs

Re: [PATCH v2] firmware: imx: Add support to start/stop a CPU

2019-01-30 Thread Dong Aisheng
; > > pls drop the unneccesary unit8_t > > Ok, I can do that. I had borrowed it from the already existing > functions imx_sc_misc_get_control / imx_sc_misc_set_control > Yes, i know, we need remove them later to avoid confusing. Regards Dong Aisheng > > > > > +

Re: [PATCH v2] firmware: imx: Add support to start/stop a CPU

2019-01-30 Thread Dong Aisheng
mware/imx/svc/misc.h > @@ -52,4 +52,7 @@ int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 > resource, > int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource, > u8 ctrl, u32 *val); > > +int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource, > + bool enable, u64 address); Nitpick: phy_addr Otherwise, looks good to me. Regards Dong Aisheng > + > #endif /* _SC_MISC_API_H */ > -- > 2.17.1 >

Re: [PATCH 2/4] dt-bindings: irq: imx-irqsteer: add multi output interrupts support

2019-01-27 Thread Dong Aisheng
s Stach > > > Cc: Shawn Guo > > Cc: devicet...@vger.kernel.org > > > Signed-off-by: Dong Aisheng > > --- > > .../devicetree/bindings/interrupt-controller/fsl,irqsteer.txt| 5 > > +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) >

Re: [PATCH 4/4] irq: imx: irqsteer: add multi output interrupts support

2019-01-27 Thread Dong Aisheng
On Fri, Jan 25, 2019 at 6:55 PM Lucas Stach wrote: > > Am Freitag, den 18.01.2019, 07:53 + schrieb Aisheng Dong: > > One irqsteer channel can support up to 8 output interrupts. > > > > > Cc: Marc Zyngier > > > Cc: Lucas Stach > > > Cc:

Re: [PATCH 4/4] irq: imx: irqsteer: add multi output interrupts support

2019-01-27 Thread Dong Aisheng
gt; referencing a channel. > Double checked with IP module owner by looking into the RTL code, writes to CHANnCTL registers have no effect. This register is reserved and the doc will be updated. Verified on both MX8QXP and MX8MQ. All channels are isolated and have independent programming model.

[PATCH V2 1/1] MAINTAINERS: imx: include drivers/firmware/imx path

2018-10-08 Thread Dong Aisheng
Due to newly added IMX SCU firmware support, let's add drivers/firmware/imx into maintainership. Cc: Shawn Guo Cc: Arnd Bergmann Cc: linux-kernel@vger.kernel.org Signed-off-by: Dong Aisheng --- v2: * add missing include/linux/firmware/imx --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions

[PATCH V2 1/1] MAINTAINERS: imx: include drivers/firmware/imx path

2018-10-08 Thread Dong Aisheng
Due to newly added IMX SCU firmware support, let's add drivers/firmware/imx into maintainership. Cc: Shawn Guo Cc: Arnd Bergmann Cc: linux-kernel@vger.kernel.org Signed-off-by: Dong Aisheng --- v2: * add missing include/linux/firmware/imx --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions

  1   2   3   4   5   6   7   8   9   10   >