[PATCH 2/2] ARM: imx: cpuidle-imx6q: configure CCM to RUN mode when CPU is active

2017-12-30 Thread Peng Fan
mode when any cpu exit state[2]. In this patch, When CPU exits state[2], it configures CCM to RUN mode. When all CPUs enters state[2], the last CPU needs to check whether it's ok to configure CCM to WAIT mode or not. Signed-off-by: Peng Fan --- V1: This is to upstream patch: http

[PATCH V2] ARM: imx: introduce imx_l2c310_write_sec

2017-12-30 Thread Peng Fan
Some PL310 registers could only be wrote in secure world, so introduce imx_l2c310_write_sec to support Linux running in non-secure world configure PL310. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Sascha Hauer <ker...@pengutronix.de>

[PATCH V2] ARM: imx: introduce imx_l2c310_write_sec

2017-12-30 Thread Peng Fan
Some PL310 registers could only be wrote in secure world, so introduce imx_l2c310_write_sec to support Linux running in non-secure world configure PL310. Signed-off-by: Peng Fan Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Dong Aisheng --- V2: Use SPDX Tag Use

Re: [PATCH] ARM: imx: introduce imx_l2c310_write_sec

2017-12-30 Thread Peng Fan
tree, please drop us a note to help >improve the system] > >url: >https://github.com/0day-ci/linux/commits/Peng-Fan/ARM-imx-introduce-imx_l2c310_write_sec/20171229-150558 >base: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git >for-next >config: arm-arm5

Re: [PATCH] ARM: imx: introduce imx_l2c310_write_sec

2017-12-30 Thread Peng Fan
tree, please drop us a note to help >improve the system] > >url: >https://github.com/0day-ci/linux/commits/Peng-Fan/ARM-imx-introduce-imx_l2c310_write_sec/20171229-150558 >base: https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git >for-next >config: arm-arm5

Re: [PATCH 2/2] ARM: multi_v7_defconfig: Enable OP-TEE

2017-12-28 Thread Peng Fan
On Thu, Dec 28, 2017 at 02:03:01PM +0100, Krzysztof Kozlowski wrote: >On Thu, Dec 28, 2017 at 10:34 AM, Peng Fan <peng@nxp.com> wrote: >> Enable OP-TEE for multi_v7_defconfig > >Why? You essentially copied here the subject of patch. That is not enough. This patch could b

Re: [PATCH 2/2] ARM: multi_v7_defconfig: Enable OP-TEE

2017-12-28 Thread Peng Fan
On Thu, Dec 28, 2017 at 02:03:01PM +0100, Krzysztof Kozlowski wrote: >On Thu, Dec 28, 2017 at 10:34 AM, Peng Fan wrote: >> Enable OP-TEE for multi_v7_defconfig > >Why? You essentially copied here the subject of patch. That is not enough. This patch could be dropped. Prev

Re: [PATCH 1/2] ARM: multi_v7_defconfig: select CONFIG_RTC_DRV_SNVS

2017-12-28 Thread Peng Fan
On Thu, Dec 28, 2017 at 02:02:07PM +0100, Krzysztof Kozlowski wrote: >On Thu, Dec 28, 2017 at 10:34 AM, Peng Fan <peng@nxp.com> wrote: >> Select CONFIG_RTC_DRV_SNVS for i.MX6 to use RTC to wakeup system >> Patch generated with: >> make ARCH=arm multi_v7_

Re: [PATCH 1/2] ARM: multi_v7_defconfig: select CONFIG_RTC_DRV_SNVS

2017-12-28 Thread Peng Fan
On Thu, Dec 28, 2017 at 02:02:07PM +0100, Krzysztof Kozlowski wrote: >On Thu, Dec 28, 2017 at 10:34 AM, Peng Fan wrote: >> Select CONFIG_RTC_DRV_SNVS for i.MX6 to use RTC to wakeup system >> Patch generated with: >> make ARCH=arm multi_v7_defconfig >>

[PATCH] ARM: imx: introduce imx_l2c310_write_sec

2017-12-28 Thread Peng Fan
Some PL310 registers could only be wrote in secure world, so introduce imx_l2c310_write_sec to support Linux running in non-secure world. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Sascha Hauer <ker...@pengutronix.de> Cc: Fabio E

[PATCH] ARM: imx: introduce imx_l2c310_write_sec

2017-12-28 Thread Peng Fan
Some PL310 registers could only be wrote in secure world, so introduce imx_l2c310_write_sec to support Linux running in non-secure world. Signed-off-by: Peng Fan Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Dong Aisheng --- arch/arm/mach-imx/system.c| 21

[PATCH 2/2] ARM: multi_v7_defconfig: Enable OP-TEE

2017-12-28 Thread Peng Fan
Enable OP-TEE for multi_v7_defconfig Signed-off-by: Peng Fan <peng@nxp.com> Cc: Russell King <li...@armlinux.org.uk> Cc: Arnd Bergmann <a...@arndb.de> Cc: Krzysztof Kozlowski <k...@kernel.org> Cc: Olof Johansson <o...@lixom.net> Cc: Simon Horman <horm

[PATCH 1/2] ARM: multi_v7_defconfig: select CONFIG_RTC_DRV_SNVS

2017-12-28 Thread Peng Fan
Select CONFIG_RTC_DRV_SNVS for i.MX6 to use RTC to wakeup system Patch generated with: make ARCH=arm multi_v7_defconfig select CONFIG_RTC_DRV_SNVS make savedefconfig Signed-off-by: Peng Fan <peng@nxp.com> Cc: Russell King <li...@armlinux.org.uk> Cc: A

[PATCH 2/2] ARM: multi_v7_defconfig: Enable OP-TEE

2017-12-28 Thread Peng Fan
Enable OP-TEE for multi_v7_defconfig Signed-off-by: Peng Fan Cc: Russell King Cc: Arnd Bergmann Cc: Krzysztof Kozlowski Cc: Olof Johansson Cc: Simon Horman Cc: Geert Uytterhoeven Cc: Rask Ingemann Lambertsen Cc: Valentin Rothberg Cc: Andy Gross Cc: Shawn Guo Cc: Dong Aisheng --- arch

[PATCH 1/2] ARM: multi_v7_defconfig: select CONFIG_RTC_DRV_SNVS

2017-12-28 Thread Peng Fan
Select CONFIG_RTC_DRV_SNVS for i.MX6 to use RTC to wakeup system Patch generated with: make ARCH=arm multi_v7_defconfig select CONFIG_RTC_DRV_SNVS make savedefconfig Signed-off-by: Peng Fan Cc: Russell King Cc: Arnd Bergmann Cc: Krzysztof Kozlowski Cc: Olof Johansson

[PATCH V3] ARM: imx: use outer_disable/resume for low power

2017-12-28 Thread Peng Fan
rly_resume removed, outer_resume will do invalidation which may corrupt data. To keep safe, the cache sync operation is also kept. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Sascha Hauer <ker...@pengutronix.de> Cc: Fabio Estevam <fabio.es

[PATCH V3] ARM: imx: use outer_disable/resume for low power

2017-12-28 Thread Peng Fan
rly_resume removed, outer_resume will do invalidation which may corrupt data. To keep safe, the cache sync operation is also kept. Signed-off-by: Peng Fan Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc: Dong Aisheng Cc: Russell King --- V3: Continue fix 6SX low power idle. Because

RE: [PATCH V2] ARM: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
> -Original Message- > From: Dong Aisheng [mailto:donga...@gmail.com] > Sent: Wednesday, December 27, 2017 10:51 AM > To: A.s. Dong <aisheng.d...@nxp.com> > Cc: Shawn Guo <shawn...@kernel.org>; Peng Fan <peng@nxp.com>; > linux-kern

RE: [PATCH V2] ARM: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
> -Original Message- > From: Dong Aisheng [mailto:donga...@gmail.com] > Sent: Wednesday, December 27, 2017 10:51 AM > To: A.s. Dong > Cc: Shawn Guo ; Peng Fan ; > linux-kernel@vger.kernel.org; Russell King ; Fabio > Estevam ; Sascha Hauer ; > van.free...@

Re: [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq

2017-12-26 Thread Peng Fan
Hi All, Sorry for bring back this old topic again. On Thu, Jan 28, 2016 at 05:27:46PM +0100, Thomas Gleixner wrote: >On Thu, 28 Jan 2016, Thomas Gleixner wrote: >> On Thu, 28 Jan 2016, Ulf Hansson wrote: >> > Therefore, the only way we currently can make sure to don't get the >> > IRQ is to free

Re: [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq

2017-12-26 Thread Peng Fan
Hi All, Sorry for bring back this old topic again. On Thu, Jan 28, 2016 at 05:27:46PM +0100, Thomas Gleixner wrote: >On Thu, 28 Jan 2016, Thomas Gleixner wrote: >> On Thu, 28 Jan 2016, Ulf Hansson wrote: >> > Therefore, the only way we currently can make sure to don't get the >> > IRQ is to free

RE: [PATCH V2] ARM: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
> -Original Message- > From: Dong Aisheng [mailto:donga...@gmail.com] > Sent: Wednesday, December 27, 2017 10:51 AM > To: A.s. Dong <aisheng.d...@nxp.com> > Cc: Shawn Guo <shawn...@kernel.org>; Peng Fan <peng@nxp.com>; > linux-kern

RE: [PATCH V2] ARM: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
> -Original Message- > From: Dong Aisheng [mailto:donga...@gmail.com] > Sent: Wednesday, December 27, 2017 10:51 AM > To: A.s. Dong > Cc: Shawn Guo ; Peng Fan ; > linux-kernel@vger.kernel.org; Russell King ; Fabio > Estevam ; Sascha Hauer ; > van.free...@

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Hi Shawn, > > > > On Sun, Dec 10, 2017 at 08:07:18PM +0800, Peng Fan wrote: > > > Use outer_disable/resume for suspend/resume. > > > With the two APIs used, code could be simplified and easy to extend > > > to introduce l2c_write_sec for i.MX platforms whe

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Hi Shawn, > > > > On Sun, Dec 10, 2017 at 08:07:18PM +0800, Peng Fan wrote: > > > Use outer_disable/resume for suspend/resume. > > > With the two APIs used, code could be simplified and easy to extend > > > to introduce l2c_write_sec for i.MX platforms whe

[PATCH V2] ARM: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Use outer_disable/resume for suspend/resume. With the two APIs used, code could be simplified and easy to extend to introduce l2c_write_sec for i.MX platforms when moving Linux Kernel runs in non-secure world. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Shawn Guo <shawn...@kerne

[PATCH V2] ARM: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Use outer_disable/resume for suspend/resume. With the two APIs used, code could be simplified and easy to extend to introduce l2c_write_sec for i.MX platforms when moving Linux Kernel runs in non-secure world. Signed-off-by: Peng Fan Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
> -Original Message- > From: Dong Aisheng [mailto:donga...@gmail.com] > Sent: Tuesday, December 26, 2017 6:21 PM > To: Peng Fan <peng@nxp.com> > Cc: Shawn Guo <shawn...@kernel.org>; A.s. Dong <aisheng.d...@nxp.com>; > linux-kernel@vger.kernel.org;

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
> -Original Message- > From: Dong Aisheng [mailto:donga...@gmail.com] > Sent: Tuesday, December 26, 2017 6:21 PM > To: Peng Fan > Cc: Shawn Guo ; A.s. Dong ; > linux-kernel@vger.kernel.org; Russell King ; Fabio > Estevam ; Sascha Hauer ; > van.free...@

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Hi Aisheng, > -Original Message- > From: Dong Aisheng [mailto:donga...@gmail.com] > Sent: Tuesday, December 26, 2017 6:04 PM > To: Peng Fan <peng@nxp.com> > Cc: Shawn Guo <shawn...@kernel.org>; A.s. Dong <aisheng.d...@nxp.com>; > linux-kern

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Hi Aisheng, > -Original Message- > From: Dong Aisheng [mailto:donga...@gmail.com] > Sent: Tuesday, December 26, 2017 6:04 PM > To: Peng Fan > Cc: Shawn Guo ; A.s. Dong ; > linux-kernel@vger.kernel.org; Russell King ; Fabio > Estevam ; Sascha Hauer ; > van.free

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Hi Shawn > -Original Message- > From: Shawn Guo [mailto:shawn...@kernel.org] > Sent: Tuesday, December 26, 2017 5:13 PM > To: Peng Fan <peng@nxp.com> > Cc: A.s. Dong <aisheng.d...@nxp.com>; linux-kernel@vger.kernel.org; Russell > King <li...@armlinux.o

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Hi Shawn > -Original Message- > From: Shawn Guo [mailto:shawn...@kernel.org] > Sent: Tuesday, December 26, 2017 5:13 PM > To: Peng Fan > Cc: A.s. Dong ; linux-kernel@vger.kernel.org; Russell > King ; Fabio Estevam ; > Sascha Hauer ; van.free...@gmail.

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Hi Shawn, > -Original Message- > From: Shawn Guo [mailto:shawn...@kernel.org] > Sent: Tuesday, December 26, 2017 5:09 PM > To: Peng Fan <peng@nxp.com> > Cc: A.s. Dong <aisheng.d...@nxp.com>; linux-kernel@vger.kernel.org; Russell > King <li...@armlin

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-26 Thread Peng Fan
Hi Shawn, > -Original Message- > From: Shawn Guo [mailto:shawn...@kernel.org] > Sent: Tuesday, December 26, 2017 5:09 PM > To: Peng Fan > Cc: A.s. Dong ; linux-kernel@vger.kernel.org; Russell > King ; van.free...@gmail.com; Sascha Hauer > ; Fabio Estev

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-25 Thread Peng Fan
Hi Shawn, > -Original Message- > From: Shawn Guo [mailto:shawn...@kernel.org] > Sent: Tuesday, December 26, 2017 11:31 AM > To: Peng Fan <peng@nxp.com> > Cc: A.s. Dong <aisheng.d...@nxp.com>; linux-kernel@vger.kernel.org; Russell > King <li..

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-25 Thread Peng Fan
Hi Shawn, > -Original Message- > From: Shawn Guo [mailto:shawn...@kernel.org] > Sent: Tuesday, December 26, 2017 11:31 AM > To: Peng Fan > Cc: A.s. Dong ; linux-kernel@vger.kernel.org; Russell > King ; Fabio Estevam ; > Sascha Hauer ; van.free...@gmail.

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-24 Thread Peng Fan
Hi All, Ping... > -Original Message- > From: Peng Fan > Sent: Sunday, December 10, 2017 8:07 PM > To: shawn...@kernel.org > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > van.free...@gmail.com; Peng Fan <peng@nxp.com>; Sascha Hauer

RE: [PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-24 Thread Peng Fan
Hi All, Ping... > -Original Message- > From: Peng Fan > Sent: Sunday, December 10, 2017 8:07 PM > To: shawn...@kernel.org > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > van.free...@gmail.com; Peng Fan ; Sascha Hauer > ; Fabio Estevam ;

[PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-10 Thread Peng Fan
Use outer_disable/resume for suspend/resume. With the two APIs used, code could be simplified and easy to extend to introduce l2c_write_sec for i.MX platforms when moving Linux Kernel runs in non-secure world. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Shawn Guo <shawn...@kerne

[PATCH] arm: imx: suspend/resume: use outer_disable/resume

2017-12-10 Thread Peng Fan
Use outer_disable/resume for suspend/resume. With the two APIs used, code could be simplified and easy to extend to introduce l2c_write_sec for i.MX platforms when moving Linux Kernel runs in non-secure world. Signed-off-by: Peng Fan Cc: Shawn Guo Cc: Sascha Hauer Cc: Fabio Estevam Cc

RE: [PATCH] arm: l2c: unlock ways when in non-secure mode

2017-12-03 Thread Peng Fan
Hi Russell, > > > > > > > > > > > > On Sun, Nov 26, 2017 at 08:25:30PM +0800, Peng Fan wrote: > > > > > > > To boot Linux in Non-secure mode with l2x0, the l2x0 > > > > > > > controller is enabled in secure mode and

RE: [PATCH] arm: l2c: unlock ways when in non-secure mode

2017-12-03 Thread Peng Fan
Hi Russell, > > > > > > > > > > > > On Sun, Nov 26, 2017 at 08:25:30PM +0800, Peng Fan wrote: > > > > > > > To boot Linux in Non-secure mode with l2x0, the l2x0 > > > > > > > controller is enabled in secure mode and

RE: [PATCH] arm: l2c: unlock ways when in non-secure mode

2017-11-27 Thread Peng Fan
Hi Russell, > -Original Message- > From: Russell King - ARM Linux [mailto:li...@armlinux.org.uk] > Sent: Monday, November 27, 2017 6:19 PM > To: Peng Fan <peng@nxp.com> > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > van.free...

RE: [PATCH] arm: l2c: unlock ways when in non-secure mode

2017-11-27 Thread Peng Fan
Hi Russell, > -Original Message- > From: Russell King - ARM Linux [mailto:li...@armlinux.org.uk] > Sent: Monday, November 27, 2017 6:19 PM > To: Peng Fan > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > van.free...@gmail.com; Mark Rutland ;

RE: [PATCH] arm: l2c: unlock ways when in non-secure mode

2017-11-27 Thread Peng Fan
Hi Russell, > -Original Message- > From: Russell King - ARM Linux [mailto:li...@armlinux.org.uk] > Sent: Monday, November 27, 2017 5:20 PM > To: Peng Fan <peng@nxp.com> > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > van.free...

RE: [PATCH] arm: l2c: unlock ways when in non-secure mode

2017-11-27 Thread Peng Fan
Hi Russell, > -Original Message- > From: Russell King - ARM Linux [mailto:li...@armlinux.org.uk] > Sent: Monday, November 27, 2017 5:20 PM > To: Peng Fan > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > van.free...@gmail.com; Mark Rutland ;

Re: [RFC 2/2] drivers: dma-mapping: parse per device reserved mem at probe time

2017-11-27 Thread Peng Fan
Hi Marek, On Mon, Nov 27, 2017 at 09:44:20AM +0100, Marek Szyprowski wrote: >Hi Peng, > >On 2017-11-27 09:37, Peng Fan wrote: >> Hi Marek, >> >> On Mon, Nov 27, 2017 at 09:31:00AM +0100, Marek Szyprowski wrote: >> > Hi >> > >> &

Re: [RFC 2/2] drivers: dma-mapping: parse per device reserved mem at probe time

2017-11-27 Thread Peng Fan
Hi Marek, On Mon, Nov 27, 2017 at 09:44:20AM +0100, Marek Szyprowski wrote: >Hi Peng, > >On 2017-11-27 09:37, Peng Fan wrote: >> Hi Marek, >> >> On Mon, Nov 27, 2017 at 09:31:00AM +0100, Marek Szyprowski wrote: >> > Hi >> > >> &

Re: [RFC 2/2] drivers: dma-mapping: parse per device reserved mem at probe time

2017-11-27 Thread Peng Fan
Hi Marek, On Mon, Nov 27, 2017 at 09:31:00AM +0100, Marek Szyprowski wrote: >Hi > >On 2017-11-26 14:13, Peng Fan wrote: >> Invoke of_reserved_mem_device_init at dma_configure, then >> there is no need to call of_reserved_mem_device_init in device >> specific probe

Re: [RFC 2/2] drivers: dma-mapping: parse per device reserved mem at probe time

2017-11-27 Thread Peng Fan
Hi Marek, On Mon, Nov 27, 2017 at 09:31:00AM +0100, Marek Szyprowski wrote: >Hi > >On 2017-11-26 14:13, Peng Fan wrote: >> Invoke of_reserved_mem_device_init at dma_configure, then >> there is no need to call of_reserved_mem_device_init in device >> specific probe

RE: [RFC 1/2] of: reserved_mem: check return value of_dma_configure

2017-11-26 Thread Peng Fan
> -Original Message- > From: Peng Fan > Sent: Sunday, November 26, 2017 9:14 PM > To: h...@lst.de; m.szyprow...@samsung.com; robin.mur...@arm.com; > gre...@linuxfoundation.org; robh...@kernel.org; frowand.l...@gmail.com > Cc: io...@lists.linux-foundation.org; linux-kern

RE: [RFC 1/2] of: reserved_mem: check return value of_dma_configure

2017-11-26 Thread Peng Fan
> -Original Message- > From: Peng Fan > Sent: Sunday, November 26, 2017 9:14 PM > To: h...@lst.de; m.szyprow...@samsung.com; robin.mur...@arm.com; > gre...@linuxfoundation.org; robh...@kernel.org; frowand.l...@gmail.com > Cc: io...@lists.linux-foundation.org; linux-kern

RE: [PATCH] arm: l2c: unlock ways when in non-secure mode

2017-11-26 Thread Peng Fan
Hi Russell, > Subject: Re: [PATCH] arm: l2c: unlock ways when in non-secure mode > > On Sun, Nov 26, 2017 at 08:25:30PM +0800, Peng Fan wrote: > > To boot Linux in Non-secure mode with l2x0, the l2x0 controller is > > enabled in secure mode and ways locked to make it seems

RE: [PATCH] arm: l2c: unlock ways when in non-secure mode

2017-11-26 Thread Peng Fan
Hi Russell, > Subject: Re: [PATCH] arm: l2c: unlock ways when in non-secure mode > > On Sun, Nov 26, 2017 at 08:25:30PM +0800, Peng Fan wrote: > > To boot Linux in Non-secure mode with l2x0, the l2x0 controller is > > enabled in secure mode and ways locked to make it seems

[RFC 2/2] drivers: dma-mapping: parse per device reserved mem at probe time

2017-11-26 Thread Peng Fan
Invoke of_reserved_mem_device_init at dma_configure, then there is no need to call of_reserved_mem_device_init in device specific probe function. Signed-off-by: Peng Fan <peng@nxp.com> --- drivers/base/dma-mapping.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[RFC 1/2] of: reserved_mem: check return value of_dma_configure

2017-11-26 Thread Peng Fan
reserved memory for a device which needs iommu. Signed-off-by: Peng Fan <peng@nxp.com> --- drivers/of/of_reserved_mem.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 22b75c82e377..61523819b50

[RFC 2/2] drivers: dma-mapping: parse per device reserved mem at probe time

2017-11-26 Thread Peng Fan
Invoke of_reserved_mem_device_init at dma_configure, then there is no need to call of_reserved_mem_device_init in device specific probe function. Signed-off-by: Peng Fan --- drivers/base/dma-mapping.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/base/dma

[RFC 1/2] of: reserved_mem: check return value of_dma_configure

2017-11-26 Thread Peng Fan
reserved memory for a device which needs iommu. Signed-off-by: Peng Fan --- drivers/of/of_reserved_mem.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 22b75c82e377..61523819b50e 100644 --- a/drivers/of/o

[PATCH] arm: l2c: unlock ways when in non-secure mode

2017-11-26 Thread Peng Fan
To boot Linux in Non-secure mode with l2x0, the l2x0 controller is enabled in secure mode and ways locked to make it seems L2 cache disabled during linux boot process. So during l2x0 initialization, need to unlock the ways to make l2x0 could cache data/inst. Signed-off-by: Peng Fan <p

[PATCH] arm: l2c: unlock ways when in non-secure mode

2017-11-26 Thread Peng Fan
To boot Linux in Non-secure mode with l2x0, the l2x0 controller is enabled in secure mode and ways locked to make it seems L2 cache disabled during linux boot process. So during l2x0 initialization, need to unlock the ways to make l2x0 could cache data/inst. Signed-off-by: Peng Fan Cc: Russell

RE: [PATCH 2/2] gpio: 74x164: handling enable-gpios

2017-08-07 Thread Peng Fan
> > + chip->enable_gpio = devm_gpiod_get(>dev, "enable", > GPIOD_OUT_LOW); > > + if (IS_ERR(chip->enable_gpio)) { > > + dev_dbg(>dev, "No enable-gpios property\n"); > > + chip->enable_gpio = NULL; > > Also, the error handling here is not correct as it will

RE: [PATCH 2/2] gpio: 74x164: handling enable-gpios

2017-08-07 Thread Peng Fan
> > + chip->enable_gpio = devm_gpiod_get(>dev, "enable", > GPIOD_OUT_LOW); > > + if (IS_ERR(chip->enable_gpio)) { > > + dev_dbg(>dev, "No enable-gpios property\n"); > > + chip->enable_gpio = NULL; > > Also, the error handling here is not correct as it will

[PATCH 1/2] devicetree: gpio: 74x164: optional enable-gpios

2017-08-07 Thread Peng Fan
There is an OE(low active) input pin for 74hc595 and 74lv595. To some boards, the OE pin is controlled by GPIO, so add an optional property "enable-gpios". Signed-off-by: Peng Fan <peng@nxp.com> Cc: Rob Herring <r...@kernel.org> Cc: Linus Walleij <linus.wall...@linar

[PATCH 1/2] devicetree: gpio: 74x164: optional enable-gpios

2017-08-07 Thread Peng Fan
There is an OE(low active) input pin for 74hc595 and 74lv595. To some boards, the OE pin is controlled by GPIO, so add an optional property "enable-gpios". Signed-off-by: Peng Fan Cc: Rob Herring Cc: Linus Walleij --- Documentation/devicetree/bindings/gpio/gpio-74x164.txt | 3 +

[PATCH 2/2] gpio: 74x164: handling enable-gpios

2017-08-07 Thread Peng Fan
To 74hc595 and 74lv595, there is an OE(low active) input pin. To some boards, this pin is controller by GPIO, so handling this pin in driver. When driver probe, use GPIOD_OUT_LOW flag when requesting the gpio, so OE is set to low when probe. Signed-off-by: Peng Fan <peng@nxp.com> Cc:

[PATCH 2/2] gpio: 74x164: handling enable-gpios

2017-08-07 Thread Peng Fan
To 74hc595 and 74lv595, there is an OE(low active) input pin. To some boards, this pin is controller by GPIO, so handling this pin in driver. When driver probe, use GPIOD_OUT_LOW flag when requesting the gpio, so OE is set to low when probe. Signed-off-by: Peng Fan Cc: Linus Walleij

[PATCH] iommu: arm-smmu: correct sid to mask

2017-04-21 Thread Peng Fan
>From code "SMR mask 0x%x out of range for SMMU", so, we need to use mask, not sid. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Will Deacon <will.dea...@arm.com> Cc: Robin Murphy <robin.mur...@arm.com> --- drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 in

[PATCH] iommu: arm-smmu: correct sid to mask

2017-04-21 Thread Peng Fan
>From code "SMR mask 0x%x out of range for SMMU", so, we need to use mask, not sid. Signed-off-by: Peng Fan Cc: Will Deacon Cc: Robin Murphy --- drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iom

RE: [PATCH 1/3] dt-bindings: imx-ocotp: add compatible string for i.MX7D/S

2017-03-12 Thread Peng Fan
> -Original Message- > From: Srinivas Kandagatla [mailto:srinivas.kandaga...@linaro.org] > Sent: Friday, March 03, 2017 6:12 PM > To: Peng Fan <peng@nxp.com>; shawn...@kernel.org; > maxime.rip...@free-electrons.com > Cc: devicet...@vger.kernel.org; linux-kerne

RE: [PATCH 1/3] dt-bindings: imx-ocotp: add compatible string for i.MX7D/S

2017-03-12 Thread Peng Fan
> -Original Message- > From: Srinivas Kandagatla [mailto:srinivas.kandaga...@linaro.org] > Sent: Friday, March 03, 2017 6:12 PM > To: Peng Fan ; shawn...@kernel.org; > maxime.rip...@free-electrons.com > Cc: devicet...@vger.kernel.org; linux-kernel@vger.kernel.org

[PATCH 2/3] arm: dts: imx7s: enable ocotp

2017-02-28 Thread Peng Fan
Enable ocotp for i.mx7D/S. Correct the clock entry and compatible string. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Srinivas Kandagatla <srinivas.kandaga...@linaro.org> Cc: Sascha Hauer <ker...@pengutronix.de> Cc: Fabio Estevam &l

[PATCH 3/3] nvmem: octop: Add i.MX7D support

2017-02-28 Thread Peng Fan
Add i.MX7D support. There is 16 banks, each bank 4 words. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Srinivas Kandagatla <srinivas.kandaga...@linaro.org> Cc: Maxime Ripard <maxime.rip...@free-electrons.com> Cc: Shawn Guo <shawn...@kernel.org> --- drivers/nvmem/i

[PATCH 2/3] arm: dts: imx7s: enable ocotp

2017-02-28 Thread Peng Fan
Enable ocotp for i.mx7D/S. Correct the clock entry and compatible string. Signed-off-by: Peng Fan Cc: Shawn Guo Cc: Srinivas Kandagatla Cc: Sascha Hauer Cc: Fabio Estevam Cc: Rob Herring Cc: Mark Rutland --- arch/arm/boot/dts/imx7s.dtsi | 5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH 3/3] nvmem: octop: Add i.MX7D support

2017-02-28 Thread Peng Fan
Add i.MX7D support. There is 16 banks, each bank 4 words. Signed-off-by: Peng Fan Cc: Srinivas Kandagatla Cc: Maxime Ripard Cc: Shawn Guo --- drivers/nvmem/imx-ocotp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index b8ca1e6

[PATCH 1/3] dt-bindings: imx-ocotp: add compatible string for i.MX7D/S

2017-02-28 Thread Peng Fan
Add compatible string for i.MX7D/S Signed-off-by: Peng Fan <peng@nxp.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Srinivas Kandagatla <srinivas.kandaga...@linaro.org> Cc: Maxime Ripard <maxime.rip...@free-electrons.com> Cc: Rob Herring <robh...@kernel.org&g

[PATCH 1/3] dt-bindings: imx-ocotp: add compatible string for i.MX7D/S

2017-02-28 Thread Peng Fan
Add compatible string for i.MX7D/S Signed-off-by: Peng Fan Cc: Shawn Guo Cc: Srinivas Kandagatla Cc: Maxime Ripard Cc: Rob Herring Cc: Mark Rutland --- Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

Re: [PATCH] pinctrl: imx: fix imx_pinctrl_desc initialization

2016-11-24 Thread Peng Fan
s, >- imx_pinctrl_desc->pmxops = _pmx_ops, >- imx_pinctrl_desc->confops = _pinconf_ops, >- imx_pinctrl_desc->owner = THIS_MODULE, >+ imx_pinctrl_desc->pctlops = _pctrl_ops; >+ imx_pinctrl_desc->pmxops = _pmx_ops; >+ imx_pinctrl_desc->con

Re: [PATCH] pinctrl: imx: fix imx_pinctrl_desc initialization

2016-11-24 Thread Peng Fan
ctrl_desc->pmxops = _pmx_ops, >- imx_pinctrl_desc->confops = _pinconf_ops, >- imx_pinctrl_desc->owner = THIS_MODULE, >+ imx_pinctrl_desc->pctlops = _pctrl_ops; >+ imx_pinctrl_desc->pmxops = _pmx_ops; >+ imx_pinctrl_desc->confops = _pinconf_ops; >+ imx_pinc

[PATCH] irqdomain: correct comment for __irq_domain_add

2016-09-21 Thread Peng Fan
Correct comments from "of_node" to "fwnode" according to function prototype. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Marc Zyngier <marc.zyng...@arm.com> Cc: Thomas Gleixner <t...@linutronix.de> --- kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 i

[PATCH] irqdomain: correct comment for __irq_domain_add

2016-09-21 Thread Peng Fan
Correct comments from "of_node" to "fwnode" according to function prototype. Signed-off-by: Peng Fan Cc: Marc Zyngier Cc: Thomas Gleixner --- kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/irqdomain.c b/kernel/i

Re: [PATCH] drivers: base: dma-mapping: page align the size when unmap_kernel_range

2016-08-07 Thread Peng Fan
Hi, Kindly ping.. since more than two weeks from patch sent out. Thanks, Peng. On Thu, Jul 21, 2016 at 04:04:21PM +0800, Peng Fan wrote: >When dma_common_free_remap, the input parameter 'size' may not >be page aligned. And, met kernel warning when doing iommu dma >for usb on i.MX8

Re: [PATCH] drivers: base: dma-mapping: page align the size when unmap_kernel_range

2016-08-07 Thread Peng Fan
Hi, Kindly ping.. since more than two weeks from patch sent out. Thanks, Peng. On Thu, Jul 21, 2016 at 04:04:21PM +0800, Peng Fan wrote: >When dma_common_free_remap, the input parameter 'size' may not >be page aligned. And, met kernel warning when doing iommu dma >for usb on i.MX8

[PATCH] drivers: base: dma-mapping: page align the size when unmap_kernel_range

2016-07-21 Thread Peng Fan
unmap_kernel_range. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: <sta...@vger.kernel.org> --- drivers/base/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/dma-mapping.c b/dri

[PATCH] drivers: base: dma-mapping: page align the size when unmap_kernel_range

2016-07-21 Thread Peng Fan
unmap_kernel_range. Signed-off-by: Peng Fan Cc: Greg Kroah-Hartman Cc: --- drivers/base/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index d799662..261420d 100644 --- a/drivers/base/dma-mapping.c +++

[PATCH V2] iommu: arm-smmu: drop devm_free_irq when driver detach

2016-07-12 Thread Peng Fan
There is no need to call devm_free_irq when driver detach. devres_release_all which is called after 'drv->remove' will release all managed resources. Signed-off-by: Peng Fan <van.free...@gmail.com> Reviewed-by: Robin Murphy <robin.mur...@arm.com> Cc: Will Deacon <will.dea..

[PATCH V2] iommu: arm-smmu: drop devm_free_irq when driver detach

2016-07-12 Thread Peng Fan
There is no need to call devm_free_irq when driver detach. devres_release_all which is called after 'drv->remove' will release all managed resources. Signed-off-by: Peng Fan Reviewed-by: Robin Murphy Cc: Will Deacon --- V2: Fix compile warning. Add Robin's Reviewed-by TAG. drivers/io

[PATCH] iommu: arm-smmu: drop devm_free_irq when driver detach

2016-07-11 Thread Peng Fan
There is no need to call devm_free_irq when driver detach. devres_release_all which is called after 'drv->remove' will release all managed resources. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Will Deacon <will.dea...@arm.com> Cc: Robin Murphy <robin.mur...@arm.com&g

[PATCH] iommu: arm-smmu: drop devm_free_irq when driver detach

2016-07-11 Thread Peng Fan
There is no need to call devm_free_irq when driver detach. devres_release_all which is called after 'drv->remove' will release all managed resources. Signed-off-by: Peng Fan Cc: Will Deacon Cc: Robin Murphy --- drivers/iommu/arm-smmu.c | 3 --- 1 file changed, 3 deletions(-) diff --

Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq

2016-07-11 Thread Peng Fan
Hi Robin, On Mon, Jul 11, 2016 at 11:32:55AM +0100, Robin Murphy wrote: >On 04/07/16 10:38, Peng Fan wrote: >> Use devm_request_irq to simplify error handling path, >> when probe smmu device. >> >> Also devm_{request|free}_irq when init or destroy domain context. >

Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq

2016-07-11 Thread Peng Fan
Hi Robin, On Mon, Jul 11, 2016 at 11:32:55AM +0100, Robin Murphy wrote: >On 04/07/16 10:38, Peng Fan wrote: >> Use devm_request_irq to simplify error handling path, >> when probe smmu device. >> >> Also devm_{request|free}_irq when init or destroy domain context. >

[PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq

2016-07-04 Thread Peng Fan
Use devm_request_irq to simplify error handling path, when probe smmu device. Also devm_{request|free}_irq when init or destroy domain context. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Will Deacon <will.dea...@arm.com> Cc: Robin Murphy <robin.mur...@arm.com> ---

[PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq

2016-07-04 Thread Peng Fan
Use devm_request_irq to simplify error handling path, when probe smmu device. Also devm_{request|free}_irq when init or destroy domain context. Signed-off-by: Peng Fan Cc: Will Deacon Cc: Robin Murphy --- drivers/iommu/arm-smmu.c | 24 ++-- 1 file changed, 10 insertions

[PATCH] clk: correct comments for __clk_determine_rate

2016-06-13 Thread Peng Fan
Correct comments for __clk_determine_rate. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Michael Turquette <mturque...@baylibre.com> Cc: Stephen Boyd <sb...@codeaurora.org> --- drivers/clk/clk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/d

[PATCH] clk: correct comments for __clk_determine_rate

2016-06-13 Thread Peng Fan
Correct comments for __clk_determine_rate. Signed-off-by: Peng Fan Cc: Michael Turquette Cc: Stephen Boyd --- drivers/clk/clk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index d584004..4224a2e 100644 --- a/drivers/clk/clk.c

Re: [PATCH V3] vfio: platform: support No-IOMMU mode

2016-06-12 Thread Peng Fan
Hi, Kindly ping.. Any comments on V3? Thanks, Peng. On Mon, May 23, 2016 at 05:47:30PM +0800, Peng Fan wrote: >The vfio No-IOMMU mode was supported by this >'commit 03a76b60f8ba2797 ("vfio: Include No-IOMMU mode")', >but it only support vfio-pci. > >Using

Re: [PATCH V3] vfio: platform: support No-IOMMU mode

2016-06-12 Thread Peng Fan
Hi, Kindly ping.. Any comments on V3? Thanks, Peng. On Mon, May 23, 2016 at 05:47:30PM +0800, Peng Fan wrote: >The vfio No-IOMMU mode was supported by this >'commit 03a76b60f8ba2797 ("vfio: Include No-IOMMU mode")', >but it only support vfio-pci. > >Using

Re: [PATCH] pinctrl: imx: fix initialization of imx_pinctrl_desc

2016-05-30 Thread Peng Fan
Hi Linus, Shawn Kindly ping.. Do you have any comments on this patch? Thanks, Peng. On Wed, May 18, 2016 at 05:31:59PM +0800, Peng Fan wrote: >To i.MX7D, there are two iomux controllers, iomuxc and iomuxc_lpsr. >They should not share one pin controller descriptor, otherwise >the val

Re: [PATCH] pinctrl: imx: fix initialization of imx_pinctrl_desc

2016-05-30 Thread Peng Fan
Hi Linus, Shawn Kindly ping.. Do you have any comments on this patch? Thanks, Peng. On Wed, May 18, 2016 at 05:31:59PM +0800, Peng Fan wrote: >To i.MX7D, there are two iomux controllers, iomuxc and iomuxc_lpsr. >They should not share one pin controller descriptor, otherwise >the val

[PATCH V3] vfio: platform: support No-IOMMU mode

2016-05-23 Thread Peng Fan
s making use of this support are named /dev/vfio/noiommu-$GROUP and can only make use of the special VFIO_NOIOMMU_IOMMU for the container. Use of this mode, specifically binding a device without a native IOMMU group to a VFIO bus driver will taint the kernel and should therefore not be considere

<    3   4   5   6   7   8   9   10   >