Re: [PATCH V3 3/9] cpufreq: Cap the default transition delay value to 10 ms

2017-08-01 Thread Leonard Crestez
On Fri, 2017-07-28 at 10:58 +0530, Viresh Kumar wrote: > On 27-07-17, 19:54, Leonard Crestez wrote: > > On Wed, 2017-07-26 at 11:36 +0530, Viresh Kumar wrote: > > > Without this patch the sampling rate of ondemand governor will be 109 > > > ms. And after this patch it wo

Re: [PATCH V3 3/9] cpufreq: Cap the default transition delay value to 10 ms

2017-08-01 Thread Leonard Crestez
On Fri, 2017-07-28 at 10:58 +0530, Viresh Kumar wrote: > On 27-07-17, 19:54, Leonard Crestez wrote: > > On Wed, 2017-07-26 at 11:36 +0530, Viresh Kumar wrote: > > > Without this patch the sampling rate of ondemand governor will be 109 > > > ms. And after this patch it wo

Re: [PATCH V3 3/9] cpufreq: Cap the default transition delay value to 10 ms

2017-07-27 Thread Leonard Crestez
On Wed, 2017-07-26 at 11:36 +0530, Viresh Kumar wrote: > On 25-07-17, 14:54, Leonard Crestez wrote: > > This patch made it's way into linux-next and it seems to cause imx socs > > to almost always hang around their max frequency with the ondemand > > governor, even when a

Re: [PATCH V3 3/9] cpufreq: Cap the default transition delay value to 10 ms

2017-07-27 Thread Leonard Crestez
On Wed, 2017-07-26 at 11:36 +0530, Viresh Kumar wrote: > On 25-07-17, 14:54, Leonard Crestez wrote: > > This patch made it's way into linux-next and it seems to cause imx socs > > to almost always hang around their max frequency with the ondemand > > governor, even when a

Re: [PATCH V3 3/9] cpufreq: Cap the default transition delay value to 10 ms

2017-07-25 Thread Leonard Crestez
On Wed, 2017-07-19 at 15:42 +0530, Viresh Kumar wrote: > If transition_delay_us isn't defined by the cpufreq driver, the default > value of transition delay (time after which the cpufreq governor will > try updating the frequency again) is currently calculated by multiplying > transition_latency

Re: [PATCH V3 3/9] cpufreq: Cap the default transition delay value to 10 ms

2017-07-25 Thread Leonard Crestez
On Wed, 2017-07-19 at 15:42 +0530, Viresh Kumar wrote: > If transition_delay_us isn't defined by the cpufreq driver, the default > value of transition delay (time after which the cpufreq governor will > try updating the frequency again) is currently calculated by multiplying > transition_latency

Re: [PATCH 1/3] arm/syscalls: Move address limit check in loop

2017-07-25 Thread Leonard Crestez
revent the infinite loop, move > > the addr_limit_user_check call at the beginning of the loop. > > > > Fixes: 73ac5d6a2b6a ("arm/syscalls: Check address limit on user- > > mode return") > > Reported-by: Leonard Crestez <leonard.cres...@nxp.com> > > Sig

Re: [PATCH 1/3] arm/syscalls: Move address limit check in loop

2017-07-25 Thread Leonard Crestez
the addr_limit_user_check call at the beginning of the loop. > > > > Fixes: 73ac5d6a2b6a ("arm/syscalls: Check address limit on user- > > mode return") > > Reported-by: Leonard Crestez > > Signed-off-by: Thomas Garnier > Any comments on this patch

Re: [PATCH v10 2/3] arm/syscalls: Check address limit on user-mode return

2017-07-19 Thread Leonard Crestez
On Tue, 2017-07-18 at 12:04 -0700, Thomas Garnier wrote: > On Tue, Jul 18, 2017 at 10:18 AM, Leonard Crestez <leonard.cres...@nxp.com> > wrote: > > On Tue, 2017-07-18 at 09:04 -0700, Thomas Garnier wrote: > > > On Tue, Jul 18, 2017 at 7:36 AM, Leonard Crestez >

Re: [PATCH v10 2/3] arm/syscalls: Check address limit on user-mode return

2017-07-19 Thread Leonard Crestez
On Tue, 2017-07-18 at 12:04 -0700, Thomas Garnier wrote: > On Tue, Jul 18, 2017 at 10:18 AM, Leonard Crestez > wrote: > > On Tue, 2017-07-18 at 09:04 -0700, Thomas Garnier wrote: > > > On Tue, Jul 18, 2017 at 7:36 AM, Leonard Crestez > > > wrote: > > &

[PATCH] cpufreq: imx6q: Fix imx6sx low frequency support

2017-07-19 Thread Leonard Crestez
pass logic. The definition of pll1_sys is changed to imx_clk_fixed_factor so that it's never disabled. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- Some potential issues: In theory pll1_sys could be explictly kept enabled from cpufreq. It's not clear this would be better since the inten

[PATCH] cpufreq: imx6q: Fix imx6sx low frequency support

2017-07-19 Thread Leonard Crestez
pass logic. The definition of pll1_sys is changed to imx_clk_fixed_factor so that it's never disabled. Signed-off-by: Leonard Crestez --- Some potential issues: In theory pll1_sys could be explictly kept enabled from cpufreq. It's not clear this would be better since the intention is to never let this b

Re: [PATCH] selftests: cpufreq: Check cpuinfo_cur_freq set as expected

2017-07-18 Thread Leonard Crestez
On Thu, 2017-07-13 at 14:25 +0530, Viresh Kumar wrote: > On 12-07-17, 14:29, Leonard Crestez wrote: > > > > This checks that the cpufreq driver actually sets the requested > > frequency. > > > > Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com>

Re: [PATCH] selftests: cpufreq: Check cpuinfo_cur_freq set as expected

2017-07-18 Thread Leonard Crestez
On Thu, 2017-07-13 at 14:25 +0530, Viresh Kumar wrote: > On 12-07-17, 14:29, Leonard Crestez wrote: > > > > This checks that the cpufreq driver actually sets the requested > > frequency. > > > > Signed-off-by: Leonard Crestez > > > > --- > >

Re: [PATCH v10 2/3] arm/syscalls: Check address limit on user-mode return

2017-07-18 Thread Leonard Crestez
On Tue, 2017-07-18 at 09:04 -0700, Thomas Garnier wrote: > On Tue, Jul 18, 2017 at 7:36 AM, Leonard Crestez <leonard.cres...@nxp.com> > wrote: > > > > On Wed, 2017-06-14 at 18:12 -0700, Thomas Garnier wrote: > > > > > > Ensure the address lim

Re: [PATCH v10 2/3] arm/syscalls: Check address limit on user-mode return

2017-07-18 Thread Leonard Crestez
On Tue, 2017-07-18 at 09:04 -0700, Thomas Garnier wrote: > On Tue, Jul 18, 2017 at 7:36 AM, Leonard Crestez > wrote: > > > > On Wed, 2017-06-14 at 18:12 -0700, Thomas Garnier wrote: > > > > > > Ensure the address limit is a user-mode segment before ret

Re: [PATCH v10 2/3] arm/syscalls: Check address limit on user-mode return

2017-07-18 Thread Leonard Crestez
On Wed, 2017-06-14 at 18:12 -0700, Thomas Garnier wrote: > Ensure the address limit is a user-mode segment before returning to > user-mode. Otherwise a process can corrupt kernel-mode memory and > elevate privileges [1]. > > The set_fs function sets the TIF_SETFS flag to force a slow path on >

Re: [PATCH v10 2/3] arm/syscalls: Check address limit on user-mode return

2017-07-18 Thread Leonard Crestez
On Wed, 2017-06-14 at 18:12 -0700, Thomas Garnier wrote: > Ensure the address limit is a user-mode segment before returning to > user-mode. Otherwise a process can corrupt kernel-mode memory and > elevate privileges [1]. > > The set_fs function sets the TIF_SETFS flag to force a slow path on >

[PATCH v2 1/5] thermal: imx: Add nvmem-cells alternate binding for OCOTP access

2017-07-14 Thread Leonard Crestez
and because it still works fine on imx6qdl series chips. In theory this problem could be solved by adding a reference to the OCOTP clock instead but it is better to hide such details in a specific nvmem driver. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- Documentation/devi

[PATCH v2 1/5] thermal: imx: Add nvmem-cells alternate binding for OCOTP access

2017-07-14 Thread Leonard Crestez
and because it still works fine on imx6qdl series chips. In theory this problem could be solved by adding a reference to the OCOTP clock instead but it is better to hide such details in a specific nvmem driver. Signed-off-by: Leonard Crestez --- Documentation/devicetree/bindings/thermal/imx-thermal.txt

[PATCH v2 3/5] thermal: imx: Add support for reading OCOTP through nvmem

2017-07-14 Thread Leonard Crestez
-by: Leonard Crestez <leonard.cres...@nxp.com> --- drivers/thermal/imx_thermal.c | 103 ++ 1 file changed, 73 insertions(+), 30 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index fb648a4..130405c

[PATCH v2 3/5] thermal: imx: Add support for reading OCOTP through nvmem

2017-07-14 Thread Leonard Crestez
-by: Leonard Crestez --- drivers/thermal/imx_thermal.c | 103 ++ 1 file changed, 73 insertions(+), 30 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index fb648a4..130405c 100644 --- a/drivers/thermal/imx_thermal.c

[PATCH v2 5/5] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-07-14 Thread Leonard Crestez
This works identically to imx6sx-tempmon on both imx6ul and imx6ull. It just needs to be defined in dts. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- arch/arm/boot/dts/imx6ul.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/bo

[PATCH v2 5/5] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-07-14 Thread Leonard Crestez
This works identically to imx6sx-tempmon on both imx6ul and imx6ull. It just needs to be defined in dts. Signed-off-by: Leonard Crestez --- arch/arm/boot/dts/imx6ul.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts

[PATCH v2 4/5] ARM: dts: imx6sx: Use nvmem-cells for tempmon

2017-07-14 Thread Leonard Crestez
Waßmann <l...@karo-electronics.de> Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- arch/arm/boot/dts/imx6sx.dtsi | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index f16b9df..580af30

[PATCH v2 4/5] ARM: dts: imx6sx: Use nvmem-cells for tempmon

2017-07-14 Thread Leonard Crestez
nn Signed-off-by: Leonard Crestez --- arch/arm/boot/dts/imx6sx.dtsi | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index f16b9df..580af30 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/ar

[PATCH v2 0/5] thermal: imx: Add nvmem-cells binding on imx6sx

2017-07-14 Thread Leonard Crestez
l info cells (Shawn Guo) * Link: https://lkml.org/lkml/2017/7/6/426 Leonard Crestez (5): thermal: imx: Add nvmem-cells alternate binding for OCOTP access nvmem: core: Add nvmem_cell_read_u32 thermal: imx: Add support for reading OCOTP through nvmem ARM: dts: imx6sx: Use nvmem-cells for tempmon

[PATCH v2 2/5] nvmem: core: Add nvmem_cell_read_u32

2017-07-14 Thread Leonard Crestez
This function does a quick and easy read of an u32 value without any kind of resource management code on the consumer side. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- drivers/nvmem/core.c | 37 + include/linux/nvmem-consumer.

[PATCH v2 0/5] thermal: imx: Add nvmem-cells binding on imx6sx

2017-07-14 Thread Leonard Crestez
: https://lkml.org/lkml/2017/7/6/426 Leonard Crestez (5): thermal: imx: Add nvmem-cells alternate binding for OCOTP access nvmem: core: Add nvmem_cell_read_u32 thermal: imx: Add support for reading OCOTP through nvmem ARM: dts: imx6sx: Use nvmem-cells for tempmon ARM: dts: imx6ul: Add imx6ul

[PATCH v2 2/5] nvmem: core: Add nvmem_cell_read_u32

2017-07-14 Thread Leonard Crestez
This function does a quick and easy read of an u32 value without any kind of resource management code on the consumer side. Signed-off-by: Leonard Crestez --- drivers/nvmem/core.c | 37 + include/linux/nvmem-consumer.h | 8 2 files changed

Re: [PATCH 2/4] thermal: imx: Add support for reading OCOTP through nvmem

2017-07-14 Thread Leonard Crestez
On Fri, 2017-07-14 at 09:48 +0100, Srinivas Kandagatla wrote: > On 12/07/17 07:36, Shawn Guo wrote: > > > +static int nvmem_cell_read_u32(struct device* dev, const char *cell_id, > > > u32 *val) > > > +{ > > > + struct nvmem_cell *cell; > > > + void *buf; > > > + size_t len; > > > + > > > + cell

Re: [PATCH 2/4] thermal: imx: Add support for reading OCOTP through nvmem

2017-07-14 Thread Leonard Crestez
On Fri, 2017-07-14 at 09:48 +0100, Srinivas Kandagatla wrote: > On 12/07/17 07:36, Shawn Guo wrote: > > > +static int nvmem_cell_read_u32(struct device* dev, const char *cell_id, > > > u32 *val) > > > +{ > > > + struct nvmem_cell *cell; > > > + void *buf; > > > + size_t len; > > > + > > > + cell

Re: [PATCH] selftests: cpufreq: Check cpuinfo_cur_freq set as expected

2017-07-12 Thread Leonard Crestez
On Wed, 2017-07-12 at 13:36 +0200, Rafael J. Wysocki wrote: > On Wed, Jul 12, 2017 at 1:29 PM, Leonard Crestez > <leonard.cres...@nxp.com> wrote: > > > > This checks that the cpufreq driver actually sets the requested > > frequency. > This won't work on modern

Re: [PATCH] selftests: cpufreq: Check cpuinfo_cur_freq set as expected

2017-07-12 Thread Leonard Crestez
On Wed, 2017-07-12 at 13:36 +0200, Rafael J. Wysocki wrote: > On Wed, Jul 12, 2017 at 1:29 PM, Leonard Crestez > wrote: > > > > This checks that the cpufreq driver actually sets the requested > > frequency. > This won't work on modern x86  with APERF/MPERF (see re

[PATCH] selftests: cpufreq: Check cpuinfo_cur_freq set as expected

2017-07-12 Thread Leonard Crestez
This checks that the cpufreq driver actually sets the requested frequency. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- I've been looking at using kselftests for imx. This patch exposes an issue with the imx6 cpufreq driver on imx6sx where frequencies are set incorrectly b

[PATCH] selftests: cpufreq: Check cpuinfo_cur_freq set as expected

2017-07-12 Thread Leonard Crestez
This checks that the cpufreq driver actually sets the requested frequency. Signed-off-by: Leonard Crestez --- I've been looking at using kselftests for imx. This patch exposes an issue with the imx6 cpufreq driver on imx6sx where frequencies are set incorrectly because of clk mishandling

[PATCH 1/4] thermal: imx: Add nvmem-cells alternate binding for OCOTP access

2017-07-06 Thread Leonard Crestez
and because it still works fine on imx6qdl series chips. In theory this problem could be solved by adding a reference to the OCOTP clock instead but it is better to hide such details in a specific nvmem driver. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- Documentation/devi

[PATCH 1/4] thermal: imx: Add nvmem-cells alternate binding for OCOTP access

2017-07-06 Thread Leonard Crestez
and because it still works fine on imx6qdl series chips. In theory this problem could be solved by adding a reference to the OCOTP clock instead but it is better to hide such details in a specific nvmem driver. Signed-off-by: Leonard Crestez --- Documentation/devicetree/bindings/thermal/imx-thermal.txt

[PATCH 3/4] ARM: dts: imx6sx: Use nvmem-cells for tempmon

2017-07-06 Thread Leonard Crestez
Waßmann <l...@karo-electronics.de> Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- arch/arm/boot/dts/imx6sx.dtsi | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index f16b9df..5cfee85

[PATCH 3/4] ARM: dts: imx6sx: Use nvmem-cells for tempmon

2017-07-06 Thread Leonard Crestez
nn Signed-off-by: Leonard Crestez --- arch/arm/boot/dts/imx6sx.dtsi | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index f16b9df..5cfee85 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/ar

[PATCH 4/4] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-07-06 Thread Leonard Crestez
This works identically to imx6sx-tempmon on both imx6ul and imx6ull. It just needs to be defined in dts. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- arch/arm/boot/dts/imx6ul.dtsi | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/imx6u

[PATCH 4/4] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-07-06 Thread Leonard Crestez
This works identically to imx6sx-tempmon on both imx6ul and imx6ull. It just needs to be defined in dts. Signed-off-by: Leonard Crestez --- arch/arm/boot/dts/imx6ul.dtsi | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts

[PATCH 2/4] thermal: imx: Add support for reading OCOTP through nvmem

2017-07-06 Thread Leonard Crestez
-by: Leonard Crestez <leonard.cres...@nxp.com> --- drivers/thermal/imx_thermal.c | 131 -- 1 file changed, 101 insertions(+), 30 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index fb648a4..ffbd579

[PATCH 2/4] thermal: imx: Add support for reading OCOTP through nvmem

2017-07-06 Thread Leonard Crestez
-by: Leonard Crestez --- drivers/thermal/imx_thermal.c | 131 -- 1 file changed, 101 insertions(+), 30 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index fb648a4..ffbd579 100644 --- a/drivers/thermal/imx_thermal.c

[PATCH 0/4] thermal: imx: Add nvmem-cells binding on imx6sx

2017-07-06 Thread Leonard Crestez
cetree properties would be interesting. Link: https://lkml.org/lkml/2017/6/19/333 Leonard Crestez (4): thermal: imx: Add nvmem-cells alternate binding for OCOTP access thermal: imx: Add support for reading OCOTP through nvmem ARM: dts: imx6sx: Use nvmem-cells for tempmon ARM: dts: imx6u

[PATCH 0/4] thermal: imx: Add nvmem-cells binding on imx6sx

2017-07-06 Thread Leonard Crestez
be interesting. Link: https://lkml.org/lkml/2017/6/19/333 Leonard Crestez (4): thermal: imx: Add nvmem-cells alternate binding for OCOTP access thermal: imx: Add support for reading OCOTP through nvmem ARM: dts: imx6sx: Use nvmem-cells for tempmon ARM: dts: imx6ul: Add imx6ul-tempmon

Re: [PATCH] thermal: imx: interpret fsl,tempmon-data through nvmem

2017-07-05 Thread Leonard Crestez
On Tue, 2017-07-04 at 11:54 -0700, Eduardo Valentin wrote: > On Mon, Jun 19, 2017 at 04:40:43PM +0300, Leonard Crestez wrote: > > > > On imx6sx accessing the ocotp memory area directly is wrong because the > > ocotp clock needs to be enabled first. Fix this by reinterpretin

Re: [PATCH] thermal: imx: interpret fsl,tempmon-data through nvmem

2017-07-05 Thread Leonard Crestez
On Tue, 2017-07-04 at 11:54 -0700, Eduardo Valentin wrote: > On Mon, Jun 19, 2017 at 04:40:43PM +0300, Leonard Crestez wrote: > > > > On imx6sx accessing the ocotp memory area directly is wrong because the > > ocotp clock needs to be enabled first. Fix this by reinterpretin

Re: [PATCH] thermal: imx: interpret fsl,tempmon-data through nvmem

2017-07-04 Thread Leonard Crestez
On Mon, 2017-06-19 at 16:40 +0300, Leonard Crestez wrote: > On imx6sx accessing the ocotp memory area directly is wrong because the > ocotp clock needs to be enabled first. Fix this by reinterpreting the > fsl,tempmon-data phandle as a reference to a nvmem_device and doing all > the

Re: [PATCH] thermal: imx: interpret fsl,tempmon-data through nvmem

2017-07-04 Thread Leonard Crestez
On Mon, 2017-06-19 at 16:40 +0300, Leonard Crestez wrote: > On imx6sx accessing the ocotp memory area directly is wrong because the > ocotp clock needs to be enabled first. Fix this by reinterpreting the > fsl,tempmon-data phandle as a reference to a nvmem_device and doing all > the

[PATCH v2 1/2] scripts/gdb: lx-dmesg: Cast log_buf to void* for addr fetch

2017-06-26 Thread Leonard Crestez
'ascii' codec can't encode character u'\u0303' in position 24: ordinal not in range(128) Avoid this by explicitly casting to (void *) inside the gdb expression. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> Reviewed-by: Jan Kiszka <jan.kis...@siemens.com> --- Cha

[PATCH v2 2/2] scripts/gdb: lx-dmesg: Use explicit encoding=utf8 errors=replace

2017-06-26 Thread Leonard Crestez
='ascii', unknown characters are replaced with U+FFFD REPLACEMENT CHARACTER and they fail to encode back to ascii. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- Changes since v1: * Add encoding='utf8' * Only do an explicit encode for python2. On python3 this returns a bytes object

[PATCH v2 1/2] scripts/gdb: lx-dmesg: Cast log_buf to void* for addr fetch

2017-06-26 Thread Leonard Crestez
'ascii' codec can't encode character u'\u0303' in position 24: ordinal not in range(128) Avoid this by explicitly casting to (void *) inside the gdb expression. Signed-off-by: Leonard Crestez Reviewed-by: Jan Kiszka --- Changes since v1: * Fix title (use "scripts/gdb"

[PATCH v2 2/2] scripts/gdb: lx-dmesg: Use explicit encoding=utf8 errors=replace

2017-06-26 Thread Leonard Crestez
='ascii', unknown characters are replaced with U+FFFD REPLACEMENT CHARACTER and they fail to encode back to ascii. Signed-off-by: Leonard Crestez --- Changes since v1: * Add encoding='utf8' * Only do an explicit encode for python2. On python3 this returns a bytes object which formats to b'BLAH

Re: [PATCH 2/2] scripts/gdb: lx-dmesg: Use errors=replace for decoding

2017-06-23 Thread Leonard Crestez
On Fri, 2017-06-23 at 18:02 +0200, Jan Kiszka wrote: > On 2017-06-23 16:20, Leonard Crestez wrote: > > > > It is never desirable lx-dmesg to fail on string decoding errors, > > not > > even if the log buffer is corrupt. > > > > Signed-off-by: L

Re: [PATCH 2/2] scripts/gdb: lx-dmesg: Use errors=replace for decoding

2017-06-23 Thread Leonard Crestez
On Fri, 2017-06-23 at 18:02 +0200, Jan Kiszka wrote: > On 2017-06-23 16:20, Leonard Crestez wrote: > > > > It is never desirable lx-dmesg to fail on string decoding errors, > > not > > even if the log buffer is corrupt. > > > > Signed-off-by: Leonard

[PATCH 2/2] scripts/gdb: lx-dmesg: Use errors=replace for decoding

2017-06-23 Thread Leonard Crestez
It is never desirable lx-dmesg to fail on string decoding errors, not even if the log buffer is corrupt. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- scripts/gdb/linux/dmesg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gdb/linux/dmes

[PATCH 2/2] scripts/gdb: lx-dmesg: Use errors=replace for decoding

2017-06-23 Thread Leonard Crestez
It is never desirable lx-dmesg to fail on string decoding errors, not even if the log buffer is corrupt. Signed-off-by: Leonard Crestez --- scripts/gdb/linux/dmesg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py

[PATCH 1/2] gdb/scripts: lx-dmesg: Cast log_buf to void* for addr fetch

2017-06-23 Thread Leonard Crestez
'ascii' codec can't encode character u'\u0303' in position 24: ordinal not in range(128) Avoid this by explicitly casting to (void *) inside the gdb expression. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- scripts/gdb/linux/dmesg.py | 2 +- 1 file changed, 1 inserti

[PATCH 1/2] gdb/scripts: lx-dmesg: Cast log_buf to void* for addr fetch

2017-06-23 Thread Leonard Crestez
'ascii' codec can't encode character u'\u0303' in position 24: ordinal not in range(128) Avoid this by explicitly casting to (void *) inside the gdb expression. Signed-off-by: Leonard Crestez --- scripts/gdb/linux/dmesg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] cpufreq: imx6q: imx6ull should use the same flow as imx6ul

2017-06-21 Thread Leonard Crestez
On Wed, 2017-05-31 at 01:07 -0300, Fabio Estevam wrote: > On Tue, May 30, 2017 at 12:57 PM, Leonard Crestez > <leonard.cres...@nxp.com> wrote: > > > > From: Octavian Purdila <octavian.purd...@nxp.com> > > > > This fixes an issue with imx6ull where set

Re: [PATCH] cpufreq: imx6q: imx6ull should use the same flow as imx6ul

2017-06-21 Thread Leonard Crestez
On Wed, 2017-05-31 at 01:07 -0300, Fabio Estevam wrote: > On Tue, May 30, 2017 at 12:57 PM, Leonard Crestez > wrote: > > > > From: Octavian Purdila > > > > This fixes an issue with imx6ull where setting the frequency to > > 528Mhz > > would actually se

Re: [PATCH v5 3/6] kernel/reboot.c: export pm_power_off_prepare

2017-06-20 Thread Leonard Crestez
On Tue, 2017-06-20 at 07:01 +0200, Oleksij Rempel wrote: > > On 19.06.2017 13:35, Leonard Crestez wrote: > > > > On Mon, 2017-06-19 at 07:02 +0200, Oleksij Rempel wrote: > > > > > > Export pm_power_off_prepare. It is needed to implement power off on &

Re: [PATCH v5 3/6] kernel/reboot.c: export pm_power_off_prepare

2017-06-20 Thread Leonard Crestez
On Tue, 2017-06-20 at 07:01 +0200, Oleksij Rempel wrote: > > On 19.06.2017 13:35, Leonard Crestez wrote: > > > > On Mon, 2017-06-19 at 07:02 +0200, Oleksij Rempel wrote: > > > > > > Export pm_power_off_prepare. It is needed to implement power off on &

Re: [PATCH v5 2/6] ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set

2017-06-20 Thread Leonard Crestez
On Tue, 2017-06-20 at 06:55 +0200, Oleksij Rempel wrote: > On 19.06.2017 13:35, Leonard Crestez wrote: > > On Mon, 2017-06-19 at 07:02 +0200, Oleksij Rempel wrote: > > > > > > One of the Freescale recommended sequences for power off with > > >

Re: [PATCH v5 2/6] ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set

2017-06-20 Thread Leonard Crestez
On Tue, 2017-06-20 at 06:55 +0200, Oleksij Rempel wrote: > On 19.06.2017 13:35, Leonard Crestez wrote: > > On Mon, 2017-06-19 at 07:02 +0200, Oleksij Rempel wrote: > > > > > > One of the Freescale recommended sequences for power off with > > >

[PATCH] thermal: imx: interpret fsl,tempmon-data through nvmem

2017-06-19 Thread Leonard Crestez
cs.de> Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- This was reported as a comment to a patch adding tempmon support for imx6ul (which is very similar to imx6sx). Since it already affects a supported chip this patch is sent as a separate bugfix. Link: https://lkml

[PATCH] thermal: imx: interpret fsl,tempmon-data through nvmem

2017-06-19 Thread Leonard Crestez
hermal has completed probing. If imx-thermal is compiled as a module then the system can hang on probe. This makes IMX_THERMAL depend on NVMEM_IMX_OCOTP but that driver seems be already available for all chips that contain tempmon so it's acceptable. Reported-by: Lothar Waßmann Signed-off-by: Leona

Re: [PATCH v5 2/6] ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set

2017-06-19 Thread Leonard Crestez
On Mon, 2017-06-19 at 07:02 +0200, Oleksij Rempel wrote: > One of the Freescale recommended sequences for power off with > external > PMIC is the following: > ... > 3.  SoC is programming PMIC for power off when standby is asserted. > 4.  In CCM STOP mode, Standby is asserted, PMIC gates SoC

Re: [PATCH v5 2/6] ARM: imx6: register pm_power_off handler if "fsl,pmic-stby-poweroff" is set

2017-06-19 Thread Leonard Crestez
On Mon, 2017-06-19 at 07:02 +0200, Oleksij Rempel wrote: > One of the Freescale recommended sequences for power off with > external > PMIC is the following: > ... > 3.  SoC is programming PMIC for power off when standby is asserted. > 4.  In CCM STOP mode, Standby is asserted, PMIC gates SoC

Re: [PATCH v5 3/6] kernel/reboot.c: export pm_power_off_prepare

2017-06-19 Thread Leonard Crestez
On Mon, 2017-06-19 at 07:02 +0200, Oleksij Rempel wrote: > Export pm_power_off_prepare. It is needed to implement power off on > Freescale/NXP iMX6 based boards with external power management > integrated circuit (PMIC). > > Signed-off-by: Oleksij Rempel > --- >  

Re: [PATCH v5 3/6] kernel/reboot.c: export pm_power_off_prepare

2017-06-19 Thread Leonard Crestez
On Mon, 2017-06-19 at 07:02 +0200, Oleksij Rempel wrote: > Export pm_power_off_prepare. It is needed to implement power off on > Freescale/NXP iMX6 based boards with external power management > integrated circuit (PMIC). > > Signed-off-by: Oleksij Rempel > --- >  kernel/reboot.c | 1 + >  1 file

Re: [PATCH 2/2] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-06-12 Thread Leonard Crestez
On Mon, 2017-06-12 at 12:40 +0200, Lothar Waßmann wrote: > On Fri, 9 Jun 2017 18:34:44 +0300 Leonard Crestez wrote: > > > > On Fri, 2017-06-09 at 15:46 +0200, Lothar Waßmann wrote: > > > > > > On Fri, 9 Jun 2017 13:58:15 +0300 Leonard Crestez wrote: > > &

Re: [PATCH 2/2] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-06-12 Thread Leonard Crestez
On Mon, 2017-06-12 at 12:40 +0200, Lothar Waßmann wrote: > On Fri, 9 Jun 2017 18:34:44 +0300 Leonard Crestez wrote: > > > > On Fri, 2017-06-09 at 15:46 +0200, Lothar Waßmann wrote: > > > > > > On Fri, 9 Jun 2017 13:58:15 +0300 Leonard Crestez wrote: > > &

Re: [PATCH 2/2] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-06-09 Thread Leonard Crestez
On Fri, 2017-06-09 at 15:46 +0200, Lothar Waßmann wrote: > On Fri, 9 Jun 2017 13:58:15 +0300 Leonard Crestez wrote: > > On Thu, 2017-06-08 at 13:45 -0300, Fabio Estevam wrote: > > > On Thu, Jun 8, 2017 at 1:26 PM, Leonard Crestez  wrote: > > > > + 

Re: [PATCH 2/2] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-06-09 Thread Leonard Crestez
On Fri, 2017-06-09 at 15:46 +0200, Lothar Waßmann wrote: > On Fri, 9 Jun 2017 13:58:15 +0300 Leonard Crestez wrote: > > On Thu, 2017-06-08 at 13:45 -0300, Fabio Estevam wrote: > > > On Thu, Jun 8, 2017 at 1:26 PM, Leonard Crestez  wrote: > > > > + 

Re: [PATCH 2/2] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-06-09 Thread Leonard Crestez
On Thu, 2017-06-08 at 13:45 -0300, Fabio Estevam wrote: > On Thu, Jun 8, 2017 at 1:26 PM, Leonard Crestez wrote: > > > > > +   tempmon: tempmon { > > +   compatible = "fsl,imx6ul-tempm

Re: [PATCH 2/2] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-06-09 Thread Leonard Crestez
On Thu, 2017-06-08 at 13:45 -0300, Fabio Estevam wrote: > On Thu, Jun 8, 2017 at 1:26 PM, Leonard Crestez wrote: > > > > > +   tempmon: tempmon { > > +   compatible = "fsl,imx6ul-tempm

[PATCH 2/2] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-06-08 Thread Leonard Crestez
This seems to work fine with the existing imx thermal driver on both 6ul and 6ull. It was just missing in dts. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- arch/arm/boot/dts/imx6ul.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/imx6ul.

[PATCH 2/2] ARM: dts: imx6ul: Add imx6ul-tempmon

2017-06-08 Thread Leonard Crestez
This seems to work fine with the existing imx thermal driver on both 6ul and 6ull. It was just missing in dts. Signed-off-by: Leonard Crestez --- arch/arm/boot/dts/imx6ul.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/imx6ul.dtsi b/arch/arm/boot/dts

[PATCH 1/2] ARM: imx_v6_v7_defconfig: Set THERMAL_WRITABLE_TRIPS=y for testing

2017-06-08 Thread Leonard Crestez
Setting trip points is supported by the imx thermal driver and it is useful to be able to test this without adjusting config. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/c

[PATCH 1/2] ARM: imx_v6_v7_defconfig: Set THERMAL_WRITABLE_TRIPS=y for testing

2017-06-08 Thread Leonard Crestez
Setting trip points is supported by the imx thermal driver and it is useful to be able to test this without adjusting config. Signed-off-by: Leonard Crestez --- arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch

Re: [PATCH v2] drm/imx: imx-ldb: Accept drm_of_find_panel_or_bridge failure

2017-06-07 Thread Leonard Crestez
On Wed, 2017-05-10 at 15:55 +0200, Philipp Zabel wrote: > On Wed, 2017-05-10 at 16:17 +0300, Leonard Crestez wrote: > > > > Not having an endpoint bound in DT should not cause a failure here, > > there are fallbacks. So explicitly accept a missing endpoint. > >

Re: [PATCH v2] drm/imx: imx-ldb: Accept drm_of_find_panel_or_bridge failure

2017-06-07 Thread Leonard Crestez
On Wed, 2017-05-10 at 15:55 +0200, Philipp Zabel wrote: > On Wed, 2017-05-10 at 16:17 +0300, Leonard Crestez wrote: > > > > Not having an endpoint bound in DT should not cause a failure here, > > there are fallbacks. So explicitly accept a missing endpoint. > >

Re: [PATCH] ARM: imx6ull: Make suspend/resume work like on 6ul

2017-06-07 Thread Leonard Crestez
On Wed, 2017-06-07 at 03:38 +, Anson Huang wrote: > > -Original Message- > > From: Shawn Guo [mailto:shawn...@kernel.org] > > Sent: 2017-06-07 11:21 AM > > To: Anson Huang <anson.hu...@nxp.com> > > Cc: Leonard Crestez <leonard.cres...@nxp.c

Re: [PATCH] ARM: imx6ull: Make suspend/resume work like on 6ul

2017-06-07 Thread Leonard Crestez
On Wed, 2017-06-07 at 03:38 +, Anson Huang wrote: > > -Original Message- > > From: Shawn Guo [mailto:shawn...@kernel.org] > > Sent: 2017-06-07 11:21 AM > > To: Anson Huang > > Cc: Leonard Crestez ; Peter Chen > > ; linux-kernel@vger.kernel.or

[PATCH v2 1/2] ARM: imx: Add MXC_CPU_IMX6ULL and cpu_is_imx6ull

2017-06-06 Thread Leonard Crestez
Support for imx6ull is already present but it's based on of_machine_is_compatible("fsl,imx6ull") checks. Add it to the MXC_CPU_* enumeration as well. This also fixes /sys/devices/soc0/soc_id reading "Unknown". Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --

[PATCH v2 1/2] ARM: imx: Add MXC_CPU_IMX6ULL and cpu_is_imx6ull

2017-06-06 Thread Leonard Crestez
Support for imx6ull is already present but it's based on of_machine_is_compatible("fsl,imx6ull") checks. Add it to the MXC_CPU_* enumeration as well. This also fixes /sys/devices/soc0/soc_id reading "Unknown". Signed-off-by: Leonard Crestez --- arch/arm/mach-imx/cpu.c |

[PATCH v2 2/2] ARM: imx6ull: Make suspend/resume work like on 6ul

2017-06-06 Thread Leonard Crestez
Suspend and resume on imx6ull is currenty not working because of some missed checks where behavior should match imx6ul. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> --- arch/arm/mach-imx/pm-imx6.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/ar

[PATCH v2 0/2] ARM: imx6ull: Make suspend/resume work like on 6ul

2017-06-06 Thread Leonard Crestez
. But this would be an unrelated cleanup and affect other chips as well (everything other that imx6qdl). Changes since v1 https://lkml.org/lkml/2017/5/30/584 : * Split adding MXC_CPU_IMX6ULL into a separate patch * While we're at it fix soc_id reading "Unknown" Leonard Crestez (2): ARM

[PATCH v2 2/2] ARM: imx6ull: Make suspend/resume work like on 6ul

2017-06-06 Thread Leonard Crestez
Suspend and resume on imx6ull is currenty not working because of some missed checks where behavior should match imx6ul. Signed-off-by: Leonard Crestez --- arch/arm/mach-imx/pm-imx6.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm

[PATCH v2 0/2] ARM: imx6ull: Make suspend/resume work like on 6ul

2017-06-06 Thread Leonard Crestez
. But this would be an unrelated cleanup and affect other chips as well (everything other that imx6qdl). Changes since v1 https://lkml.org/lkml/2017/5/30/584 : * Split adding MXC_CPU_IMX6ULL into a separate patch * While we're at it fix soc_id reading "Unknown" Leonard Crestez (2): ARM

Re: [PATCH] cpufreq: Find transition latency dynamically

2017-06-06 Thread Leonard Crestez
On Fri, 2017-06-02 at 16:59 +0530, Viresh Kumar wrote: > The transition_latency_ns represents the maximum time it can take for > the hardware to switch from/to any frequency for a CPU. > > The transition_latency_ns is used currently for two purposes: > > o To check if the hardware latency is

Re: [PATCH] cpufreq: Find transition latency dynamically

2017-06-06 Thread Leonard Crestez
On Fri, 2017-06-02 at 16:59 +0530, Viresh Kumar wrote: > The transition_latency_ns represents the maximum time it can take for > the hardware to switch from/to any frequency for a CPU. > > The transition_latency_ns is used currently for two purposes: > > o To check if the hardware latency is

Re: [PATCH] ARM: imx6ull: Make suspend/resume work like on 6ul

2017-06-06 Thread Leonard Crestez
On Mon, 2017-06-05 at 13:37 +0800, Shawn Guo wrote: > On Tue, May 30, 2017 at 07:11:19PM +0300, Leonard Crestez wrote: > > > > Suspend and resume on imx6ull is currenty not working because of some > > missed checks where behavior should match imx6ul. > > > &g

Re: [PATCH] ARM: imx6ull: Make suspend/resume work like on 6ul

2017-06-06 Thread Leonard Crestez
On Mon, 2017-06-05 at 13:37 +0800, Shawn Guo wrote: > On Tue, May 30, 2017 at 07:11:19PM +0300, Leonard Crestez wrote: > > > > Suspend and resume on imx6ull is currenty not working because of some > > missed checks where behavior should match imx6ul. > > > &g

[PATCH v2 1/2] ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties

2017-05-31 Thread Leonard Crestez
Right now mach-imx6ul registers a fixup for the ksz8081 phy. The same register values can be set through the micrel phy driver by using dts properties. This seems preferable and allows cleanly fixing suspend/resume. Signed-off-by: Leonard Crestez <leonard.cres...@nxp.com> Reviewed-by:

[PATCH v2 1/2] ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties

2017-05-31 Thread Leonard Crestez
Right now mach-imx6ul registers a fixup for the ksz8081 phy. The same register values can be set through the micrel phy driver by using dts properties. This seems preferable and allows cleanly fixing suspend/resume. Signed-off-by: Leonard Crestez Reviewed-by: Fabio Estevam --- arch/arm/boot

[PATCH v2 net 2/2] net: phy: micrel: Restore led_mode and clk_sel on resume

2017-05-31 Thread Leonard Crestez
These bits seem to be lost after a suspend/resume cycle so just set them again. Do this by splitting the handling of these bits into a function that is also called on resume. This patch fixes ethernet suspend/resume on imx6ul-14x14-evk boards. Signed-off-by: Leonard Crestez <leonard.c

[PATCH v2 0/2] ARM: imx6ul-14x14-evk: Fix suspend over nfs by phy

2017-05-31 Thread Leonard Crestez
. Calling config_init directly could be an option but on some HW variants it does extra stuff like parsing devicetree options. That would not be appropriate for resume code. Leonard Crestez (2): ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties net: phy: micrel: Restore led_mode and clk_sel

<    1   2   3   4   5   6   7   >