[PATCH] arm: Do not overwrite __machine_arch_type

2014-08-18 Thread Peng Fan
If using DT_MACHINE_START when enabled CONFIG_OF, the nr of mdesc is ~0. The value of __machine_arch_type is passsed from bootloader using reigster r1, and assigned in head-common.S. Remove this line to avoid overwrite it. Signed-off-by: Peng Fan van.free...@gmail.com --- arch/arm/kernel

Re: [PATCH] arm: Do not overwrite __machine_arch_type

2014-08-19 Thread Peng Fan
On 08/19/2014 03:43 PM, Russell King - ARM Linux wrote: On Tue, Aug 19, 2014 at 11:21:31AM +0800, Peng Fan wrote: If using DT_MACHINE_START when enabled CONFIG_OF, the nr of mdesc is ~0. The value of __machine_arch_type is passsed from bootloader using reigster r1, and assigned in head

[PATCH] tty:vt remove obsolete struct initializer

2014-10-26 Thread Peng Fan
This patch fixes sparse warning: obsolete struct initializer, use C99 syntax Signed-off-by: Peng Fan van.free...@gmail.com --- drivers/tty/vt/vt.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index b33b00b

[PATCH 2/2] arm:kvm remove len 8 for mmio read write buf

2014-12-22 Thread Peng Fan
; data = mmio_read_buf(run-mmio.data, len); This piece code also tells that len variable does not exceeds 4 bytes. So, remove 8 bytes assign in mmio_read_buf and mmio_write_buf. Signed-off-by: Peng Fan van.free...@gmail.com CC: Gleb Natapov g...@kernel.org CC: Paolo Bonzini pbonz

[PATCH 1/2] arm:kvm correct prototype to make sparse happy

2014-12-22 Thread Peng Fan
Warning message: arch/arm/kvm/arm.c:85:17: error: symbol 'kvm_get_running_vcpus' redeclared with different type (originally declared at ./arch/arm/include/asm/kvm_host.h :190) - different address spaces Signed-off-by: Peng Fan van.free...@gmail.com CC: Gleb Natapov g...@kernel.org CC: Paolo

Re: [PATCH 2/2] arm:kvm remove len 8 for mmio read write buf

2014-12-22 Thread Peng Fan
Just began learning this piece of code. Thanks for correcting me. On 12/22/2014 07:51 PM, Marc Zyngier wrote: On 22/12/14 11:23, Peng Fan wrote: For arm 32 bit architecture, 8 bytes load/store operation in one instruction will not be generated by compiler. Ever heard of lrdr/strd

[PATCH] mmc: host: sdhci check parameters before call dma_free_coherent

2015-06-21 Thread Peng Fan
. Falling back to standard DMA. mmc0: no vqmmc regulator found mmc0: SDHCI controller on 30b4.usdhc [30b4.usdhc] using DMA Signed-off-by: Peng Fan van.free...@gmail.com --- drivers/mmc/host/sdhci.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host

[PATCH] staging: nvec: remove duplicated const

2015-06-16 Thread Peng Fan
Sparse checking warning: drivers/staging/nvec/nvec_ps2.c:172:14: warning: duplicate const. Remove the duplicated const to fix the warning. Signed-off-by: Peng Fan van.free...@gmail.com --- drivers/staging/nvec/nvec_ps2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] mtd: blktrans: fix integer overflow

2015-08-21 Thread Peng Fan
long long to fix the overflow issue. Signed-off-by: Peng Fan van.free...@gmail.com Cc: David Woodhouse dw...@infradead.org Cc: Brian Norris computersforpe...@gmail.com --- include/linux/mtd/blktrans.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mtd/blktrans.h b

[PATCH 1/2] gpio: mxc: need to check return value of irq_alloc_generic_chip

2015-08-23 Thread Peng Fan
Need to check return value of irq_alloc_generic_chip, because it may return NULL. 1. Change mxc_gpio_init_gc return type from void to int. 2. Add a new lable out_irqdomain_remove to remove the irq domain when mxc_gpio_init_gc fail. Signed-off-by: Peng Fan van.free...@gmail.com Cc: Linus

[PATCH 2/2] gpio: mxs: need to check return value of irq_alloc_generic_chip

2015-08-23 Thread Peng Fan
Need to check return value of irq_alloc_generic_chip, because it may return NULL. 1. Change mxs_gpio_init_gc return type from void to int. 2. Add a new lable out_irqdomain_remove to remove the irq domain when mxc_gpio_init_gc fail. Signed-off-by: Peng Fan van.free...@gmail.com Cc: Linus

[PATCH] gpio: gpiolib: use devm_* API to simplify driver code

2015-08-24 Thread Peng Fan
Use devm_* API to simplify driver code. Signed-off-by: Peng Fan van.free...@gmail.com Cc: Linus Walleij linus.wall...@linaro.org Cc: Alexandre Courbot gnu...@gmail.com --- drivers/gpio/gpiolib.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpio

[PATCH] input: gpio-keys: report error when invalid key number

2015-08-24 Thread Peng Fan
-keys# we want 'echo 77 keys' to report an error, but not silence to give us an fake illusion that all is 'ok'. Signed-off-by: Peng Fan van.free...@gmail.com Cc: Dmitry Torokhov dmitry.torok...@gmail.com Cc: Linus Walleij linus.wall...@linaro.org Cc: Alexander Stein alexander.st...@systec

[PATCH] staging: sm750fb: fix sparse warning for lock

2015-08-05 Thread Peng Fan
in 'lynxfb_ops_copyarea' - different lock contexts for basic block drivers/staging/sm750fb/sm750.c:247:13: warning: context imbalance in 'lynxfb_ops_imageblit' - different lock contexts for basic block Signed-off-by: Peng Fan van.free...@gmail.com Cc: Sudip Mukherjee sudipm.mukher...@gmail.com Cc

Re: [PATCH] mmc: host: sdhci check parameters before call dma_free_coherent

2015-07-17 Thread Peng Fan
Hi, On Mon, Jun 22, 2015 at 10:04:22AM +0300, Adrian Hunter wrote: On 22/06/15 06:41, Peng Fan wrote: We should not call dma_free_coherent if host-adma_table is NULL, otherwise may trigger panic. From DMA-API.txt: void dma_free_coherent(struct device *dev, size_t size, void

Re: [RFC V2] iommu: correct group reference count

2015-11-09 Thread Peng Fan
Hi Will, On Mon, Nov 09, 2015 at 10:10:59AM +, Will Deacon wrote: >On Mon, Nov 09, 2015 at 02:13:28PM +0800, Peng Fan wrote: >> The basic flow for iommu_group_for_dev is: >> iommu_group_get_for_dev >> |-> iommu_group_get : increase reference count by 1. >

[RFC V3] iommu: arm-smmu: correct group reference count

2015-11-09 Thread Peng Fan
reference count by 1. return group (2) |->return 0; Since we are adding one device, the flow is (2) and the group reference count will be increased by 2. So, we need to add iommu_group_put at the end of arm_smmu_add_device to decrease the count by 1. Signe

Re: [RFC V2] iommu: correct group reference count

2015-11-09 Thread Peng Fan
Hi Alex, On Mon, Nov 09, 2015 at 08:28:09AM -0700, Alex Williamson wrote: >On Mon, 2015-11-09 at 14:13 +0800, Peng Fan wrote: >> The basic flow for iommu_group_for_dev is: >> iommu_group_get_for_dev >> |-> iommu_group_get : increase reference count by 1. >

[RFC V2] iommu: correct group reference count

2015-11-08 Thread Peng Fan
nly increase reference count by 1. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Joerg Roedel <j...@8bytes.org> Cc: Will Deacon <will.dea...@arm.com> --- V1 thread: https://lkml.org/lkml/2015/11/3/304 Changes V2: I did not see the update about device_group when I wor

Re: [RFC] iommu: arm-smmu: correct reference count

2015-11-08 Thread Peng Fan
Hi Will, On Fri, Nov 06, 2015 at 12:23:39PM +, Will Deacon wrote: >On Wed, Nov 04, 2015 at 10:48:28AM +0800, Peng Fan wrote: >> On Tue, Nov 03, 2015 at 01:17:34PM +, Will Deacon wrote: >> >On Tue, Nov 03, 2015 at 08:59:17PM +0800, Peng Fan wrote: >> >> iom

[RFC] iommu: arm-smmu: correct reference count

2015-11-03 Thread Peng Fan
iommu_group_alloc will initialize the reference count for group to 1. iommu_group_add_device also increase the group reference count, if nothing bad happends. And we need to add iommu_group_put to decrease the reference count for group. Signed-off-by: Peng Fan <van.free...@gmail.com&

[PATCH] mfd: syscon: check 'property' before of_node_put

2015-11-05 Thread Peng Fan
When 'property' is not NULL, of_parse_phandle will return the node pointer with refcount incremented. So when of_node_put, also need to check property. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Lee Jones <lee.jo...@linaro.org> Cc: Arnd Bergmann <a...@arndb.de> --- dr

Re: [RFC] iommu: arm-smmu: correct reference count

2015-11-03 Thread Peng Fan
Hi Will, On Tue, Nov 03, 2015 at 01:17:34PM +, Will Deacon wrote: >On Tue, Nov 03, 2015 at 08:59:17PM +0800, Peng Fan wrote: >> iommu_group_alloc will initialize the reference count for group to 1. >> iommu_group_add_device also increase the group reference count, >> if

[PATCH] staging: iio: adc: lpc32xx: use correct reutrn value

2015-08-30 Thread Peng Fan
To lpc32xx_adc driver, when platform_get_resource or platform_get_irq failed, we should use -ENXIO as a return value, but not -EBUSY. Signed-off-by: Peng Fan van.free...@gmail.com Cc: Jonathan Cameron ji...@kernel.org Cc: Hartmut Knaack knaac...@gmx.de Cc: Lars-Peter Clausen l...@metafoo.de Cc

Re: [PATCH] gpio: gpiolib: use devm_* API to simplify driver code

2015-09-05 Thread Peng Fan
On Tue, Aug 25, 2015 at 11:38:47AM +0300, Grygorii Strashko wrote: > On 08/24/2015 03:05 PM, Peng Fan wrote: > >Use devm_* API to simplify driver code. > > > >Signed-off-by: Peng Fan <van.free...@gmail.com> > >Cc: Linus Walleij <linus.wall...@linaro.org> >

Re: [PATCH] mtd: blktrans: fix integer overflow

2015-09-05 Thread Peng Fan
On Wed, Sep 02, 2015 at 10:02:49AM -0700, Brian Norris wrote: > On Fri, Aug 21, 2015 at 10:57:31PM +0800, Peng Fan wrote: > > In drivers/mtd/mtd_blkdevs.c: > > 406 set_capacity(gd, (new->size * tr->blksize) >> 9); > > The type of new->size is unsigned lon

[PATCH] pinctrl: core: handle pinctrl_get failure

2015-09-10 Thread Peng Fan
Need to do error handling path when pinctrl_get fails. Also when pinctrl_get success, insert 'pctldev->node' to pinctrldev_list. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Linus Walleij <linus.wall...@linaro.org> --- drivers/pinctrl/core.c | 10 ++ 1 file change

Re: [PATCH] drivers: of: check input parameter name for __of_find_property

2015-09-15 Thread Peng Fan
Hi Rob, On Tue, Sep 15, 2015 at 10:56:28AM -0500, Rob Herring wrote: > On 09/11/2015 08:44 AM, Peng Fan wrote: > > Check input parameter 'name' for __of_find_property. If name is NULL, > > of_prop_cmp->strcasecmp may trigger panic. > > Arguably that could be a featur

Re: [PATCH] drivers: of: check input parameter name for __of_find_property

2015-09-16 Thread Peng Fan
On Tue, Sep 15, 2015 at 09:27:59PM -0500, Rob Herring wrote: > On 09/15/2015 07:16 PM, Peng Fan wrote: > > Hi Rob, > > > > On Tue, Sep 15, 2015 at 10:56:28AM -0500, Rob Herring wrote: > >> On 09/11/2015 08:44 AM, Peng Fan wrote: > >>> Check input parame

[PATCH v2] mtd: blktrans: fix multiplication overflow

2015-09-11 Thread Peng Fan
e cast u64 to fix the multiplication overflow issue. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: David Woodhouse <dw...@infradead.org> Cc: Brian Norris <computersforpe...@gmail.com> --- Changes V2: use type cast to avoid build break for platforms which does not support 64 bit

[PATCH] drivers: of: check input parameter name for __of_find_property

2015-09-11 Thread Peng Fan
Check input parameter 'name' for __of_find_property. If name is NULL, of_prop_cmp->strcasecmp may trigger panic. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Rob Herring <robh...@kernel.org> Cc: Frank Rowand <frowand.l...@gmail.com> Cc: Grant Likely <grant.lik...@

[RFC 1/1] xen: block: correct setting for xen_blkif_max_ring_order

2015-11-25 Thread Peng Fan
max_ring_order using XENBUS_MAX_RING_GRANT_ORDER, but not 0. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Cc: Boris Ostrovsky <boris.ostrov...@oracle.com> Cc: David Vrabel <david.vra...@citrix.com> Cc: "Roger Pau Monné&

[RFC 1/1] xen: interface: correct comments

2015-11-25 Thread Peng Fan
According to definition of structure evtchn_alloc_unbound, there is an entry "domid_t remote_dom", no "rdom". So using "remote_dom" in comments instead of "rdom". Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Konrad Rzeszutek Wilk <konrad.w

Re: [RFC V4] iommu: arm-smmu: correct group reference count

2015-11-20 Thread Peng Fan
>Since we are adding one device, the flow is (2) and the group reference >count will be increased by 2. So, we need to add iommu_group_put at the >end of arm_smmu_add_device to decrease the count by 1. > >Also take the failure path into consideration when fail to add a device. >

Re: [RFC V3] iommu: arm-smmu: correct group reference count

2015-11-19 Thread Peng Fan
Hi Will, On Tue, Nov 17, 2015 at 04:17:46PM +, Will Deacon wrote: >On Tue, Nov 10, 2015 at 09:56:26AM +0800, Peng Fan wrote: >> The basic flow for add a device: >> arm_smmu_add_device >> |->iommu_group_get_for_dev >> |->iommu_group_get >

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

[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

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] vfio: platform: use vfio_iommu_group_get/put

2016-05-20 Thread Peng Fan
Hi, On Fri, May 20, 2016 at 10:20:32AM +0200, Baptiste Reynal wrote: >Hi, > >On Fri, May 20, 2016 at 9:58 AM, Eric Auger <eric.au...@linaro.org> wrote: >> >> Hi, >> On 05/19/2016 11:01 PM, Alex Williamson wrote: >> > On Tue, 10 May 2016 15:40:28 +0800 &

Re: [PATCH] vfio: platform: use vfio_iommu_group_get/put

2016-05-20 Thread Peng Fan
Hi Eric, On Fri, May 20, 2016 at 11:22:13AM +0200, Eric Auger wrote: >Hi Peng, >On 05/20/2016 10:36 AM, Peng Fan wrote: >> Hi, >> >> On Fri, May 20, 2016 at 10:20:32AM +0200, Baptiste Reynal wrote: >>> Hi, >>> >>> On Fri, May 20, 2016 a

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

2016-05-23 Thread Peng Fan
Hi Eric, On Mon, May 23, 2016 at 10:59:24AM +0200, Eric Auger wrote: >Hi Peng, >On 05/23/2016 10:14 AM, 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.

[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

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

2016-05-23 Thread Peng Fan
dered supported.", Actually, for vfio-platform No-IOMMU mode, the userspace can not do DMA, because the ioctl API of noiommu container only supports VFIO_CHECK_EXTENSION and VFIO_IOMMU_MAP_DMA is not supported. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Eric Auger &

[PATCH] pinctrl: imx: fix initialization of imx_pinctrl_desc

2016-05-18 Thread Peng Fan
allcoated imx_pinctrl_desc and switch to dynamically allcate pin controller descriptor for each iomux controller. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Linus Walleij <linus.wall...@linaro.org> Cc: Shawn Guo <shawn...@kernel.org> Cc: Philipp Zabel <p.za...@pengutronix

[PATCH] iommu/arm-smmu: clear cache lock bit of ACR

2016-05-03 Thread Peng Fan
According MMU-500 TRM, section 3.7.1 Auxiliary Control registers, You can modify ACTLR only when the ACR.CACHE_LOCK bit is 0. So before clearing ARM_MMU500_ACTLR_CPRE of each context bank, need clear CACHE_LOCK bit of ACR register first. Signed-off-by: Peng Fan <van.free...@gmail.com&

Re: [PATCH] iommu/arm-smmu: clear cache lock bit of ACR

2016-05-03 Thread Peng Fan
Hi Robin, On Tue, May 03, 2016 at 12:15:52PM +0100, Robin Murphy wrote: >On 03/05/16 11:15, Peng Fan wrote: >>According MMU-500 TRM, section 3.7.1 Auxiliary Control registers, >>You can modify ACTLR only when the ACR.CACHE_LOCK bit is 0. >> >>So before clearing AR

RE: [PATCH V2 3/3] nvmem: imx-ocotp: handling clock

2016-05-10 Thread Peng Fan
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Srinivas Kandagatla > Sent: Tuesday, May 10, 2016 6:32 PM > To: Peng Fan <van.free...@gmail.com> > Cc: shawn...@kernel.org; maxime.rip...@f

Re: [PATCH] vfio: platform: use vfio_iommu_group_get/put

2016-05-10 Thread Peng Fan
Hi Alex, On Mon, May 09, 2016 at 09:32:38AM -0600, Alex Williamson wrote: >On Mon, 9 May 2016 18:01:43 +0800 >Peng Fan <van.free...@gmail.com> wrote: > >> Use vfio_iommu_group_get and vfio_iommu_group_put, but not >> iommu_group_get or iommu_group_put. > >I

[PATCH V2] iommu/arm-smmu: clear cache lock bit of ACR

2016-05-03 Thread Peng Fan
onwards, need to check the major number of IDR7. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Will Deacon <will.dea...@arm.com> Cc: Robin Murphy <robin.mur...@arm.com> --- V2: Following Robin's comments, need to check IDR7 before clearing CACHE_LOCK bit of ACR. V1: Patch ba

[PATCH] vfio: platform: use vfio_iommu_group_get/put

2016-05-09 Thread Peng Fan
Use vfio_iommu_group_get and vfio_iommu_group_put, but not iommu_group_get or iommu_group_put. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Baptiste Reynal <b.rey...@virtualopensystems.com> Cc: Alex Williamson <alex.william...@redhat.com> --- drivers/vfio/platform/vfio

Re: [PATCH V2 3/3] nvmem: imx-ocotp: handling clock

2016-05-09 Thread Peng Fan
Hi Srinivas, On Mon, May 09, 2016 at 01:28:14PM +0100, Srinivas Kandagatla wrote: >Thanks for the Ping, I totally missed this thread. > >On 20/04/16 18:26, Peng Fan wrote: >>Before access ocotp nvmem area, the clock should be enabled. >>Or, `hexdump nvmem` will hang the syst

RE: [PATCH V2 3/3] nvmem: imx-ocotp: handling clock

2016-05-09 Thread Peng Fan
Hi, Kindly ping.. Any comments on this patch set? > -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Peng Fan > Sent: Thursday, April 21, 2016 1:26 AM > To: shawn...@kernel.org; srinivas.kandag

Re: [PATCH 3/3] nvmem: imx-ocotp: handling clock

2016-04-19 Thread Peng Fan
Hi Fabio, On Tue, Apr 19, 2016 at 07:42:17AM -0300, Fabio Estevam wrote: >Hi Peng, > >On Tue, Apr 19, 2016 at 5:33 AM, Peng Fan <van.free...@gmail.com> wrote: > >> @@ -46,11 +48,15 @@ static int imx_ocotp_read(void *context, const void >> *reg, size_t reg_size, >&

[PATCH V2 1/3] arm: dts: imx6qdl: add clocks property for ocotp node

2016-04-20 Thread Peng Fan
Add clocks property for ocotp node. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Sascha Hauer <ker...@pengutronix.de> Cc: Rob Herring <robh...@kernel.org> --- V2: none arch/arm/boot/dts/imx6qdl.dtsi | 1 + 1 file changed, 1

[PATCH V2 3/3] nvmem: imx-ocotp: handling clock

2016-04-20 Thread Peng Fan
Before access ocotp nvmem area, the clock should be enabled. Or, `hexdump nvmem` will hang the system. So, use such flow: " 1. clock_enable_prepare 2. read nvmem ocotp area 3. clock_disable_unprepare " Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Srinivas Kandagatla &

[PATCH V2 2/3] arm: dts: imx6sl: add clocks property for ocotp node

2016-04-20 Thread Peng Fan
Add clocks property for ocotp node. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Sascha Hauer <ker...@pengutronix.de> Cc: Rob Herring <robh...@kernel.org> --- V2: none arch/arm/boot/dts/imx6sl.dtsi | 1 + 1 file changed, 1

[PATCH 1/3] arm: dts: imx6qdl: add clocks property for ocotp node

2016-04-19 Thread Peng Fan
Add clocks property for ocotp node. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Sascha Hauer <ker...@pengutronix.de> Cc: Rob Herring <robh...@kernel.org> --- arch/arm/boot/dts/imx6qdl.dtsi | 1 + 1 file changed, 1 insertion(+

[PATCH 2/3] arm: dts: imx6sl: add clocks property for ocotp node

2016-04-19 Thread Peng Fan
Add clocks property for ocotp node. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Sascha Hauer <ker...@pengutronix.de> Cc: Rob Herring <robh...@kernel.org> --- arch/arm/boot/dts/imx6sl.dtsi | 1 + 1 file changed, 1 insertion(+

[PATCH 3/3] nvmem: imx-ocotp: handling clock

2016-04-19 Thread Peng Fan
Before access ocotp nvmem area, the clock should be enabled. Or, `hexdump nvmem` will hang the system. So, use such flow: " 1. clock_enable_prepare 2. read nvmem ocotp area 3. clock_disable_unprepare " Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Srinivas Kandagatla &

[PATCH 3/3] nvmem: imx-ocotp: support i.MX6UL

2016-04-19 Thread Peng Fan
Add of_device_id entry for i.MX6UL to let imx-ocotp driver support i.MX6UL. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Srinivas Kandagatla <srinivas.kandaga...@linaro.org> Cc: Maxime Ripard <maxime.rip...@free-electrons.com> Cc: Shawn Guo <shawn...@kernel.org>

[PATCH 1/3] documentation: nvmem: imx-ocotp: Add i.MX6UL support

2016-04-19 Thread Peng Fan
Add i.MX6UL support in documentation. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Srinivas Kandagatla <srinivas.kandaga...@linaro.org> Cc: Maxime Ripard <maxime.rip...@free-electrons.com> Cc: Rob Herring <robh...@kernel.org> --- Documentation/devicetree/bindings

[PATCH 2/3] arm: dts: imx6ul: add ocotp node

2016-04-19 Thread Peng Fan
Add ocotp node for i.MX6UL Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Shawn Guo <shawn...@kernel.org> Cc: Sascha Hauer <ker...@pengutronix.de> Cc: Rob Herring <robh...@kernel.org> --- arch/arm/boot/dts/imx6ul.dtsi | 6 ++ 1 file changed, 6 insertions(+) di

[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] 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] 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

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] 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] 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 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 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] 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

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

[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

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 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 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] 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

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

[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

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: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: [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 6:19 PM > To: Peng Fan <peng@nxp.com> > Cc: linux-arm-ker...@lists.infradead.org; linux-kernel@vger.kernel.org; > van.free...

[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

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: [RFC] platform: detach from PM domains on shutdown

2018-05-18 Thread Peng Fan
> -Original Message- > From: Rafael J. Wysocki [mailto:r...@rjwysocki.net] > Sent: 2018年5月18日 15:55 > To: Peng Fan <peng@nxp.com> > Cc: Rafael J. Wysocki <raf...@kernel.org>; Ulf Hansson > <ulf.hans...@linaro.org>; Rafael J. Wysocki <rafae

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-17 Thread Peng Fan
> -Original Message- > From: rjwyso...@gmail.com [mailto:rjwyso...@gmail.com] On Behalf Of Rafael > J. Wysocki > Sent: 2018年5月17日 16:01 > To: Peng Fan <peng@nxp.com> > Cc: Rafael J. Wysocki <raf...@kernel.org>; Ulf Hansson > <ulf.hans...@linaro.or

[RFC] platform: detach from PM domains on shutdown

2018-05-15 Thread Peng Fan
ing. So let's detach the power domain to shutdown PM domains after driver shutdown. Signed-off-by: Peng Fan <peng@nxp.com> --- I do not find a better place to shutdown power domain when reboot Linux, so add back the line that commit 2d30bb0b3889 removes, because it is a false alarm warn

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-16 Thread Peng Fan
Hi Uffe, > -Original Message- > From: Ulf Hansson [mailto:ulf.hans...@linaro.org] > Sent: 2018年5月16日 17:53 > To: Peng Fan <peng@nxp.com> > Cc: Rafael J. Wysocki <rafael.j.wyso...@intel.com>; Fabio Estevam > <fabio.este...@nxp.com>; Greg Kroah-H

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-16 Thread Peng Fan
> -Original Message- > From: rjwyso...@gmail.com [mailto:rjwyso...@gmail.com] On Behalf Of Rafael > J. Wysocki > Sent: 2018年5月17日 5:35 > To: Ulf Hansson <ulf.hans...@linaro.org> > Cc: Peng Fan <peng@nxp.com>; Rafael J. Wysocki > <rafael.j.wyso...@i

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-29 Thread Peng Fan
> -Original Message- > From: Rafael J. Wysocki [mailto:r...@rjwysocki.net] > Sent: 2018年5月28日 16:32 > To: Peng Fan > Cc: Rafael J. Wysocki ; Ulf Hansson > ; Rafael J. Wysocki ; > Fabio Estevam ; Greg Kroah-Hartman > ; Linux Kernel Mailing List > ; Linux PM

RE: [RFC] platform: detach from PM domains on shutdown

2018-05-28 Thread Peng Fan
Hi, Rafael & Uffe > -Original Message- > From: Peng Fan > Sent: 2018年5月18日 16:53 > To: Rafael J. Wysocki <r...@rjwysocki.net> > Cc: Rafael J. Wysocki <raf...@kernel.org>; Ulf Hansson > <ulf.hans...@linaro.org>; Rafael J. Wysocki <rafael.j.wyso

[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 <peng@nxp.com> --- V1: This is to upstream

[PATCH 1/2] ARM: imx: no unmask/mask GINT for WAIT_CLOCKED

2017-12-30 Thread Peng Fan
WAIT_CLOCKED is for RUN mode, there is no need to unmask/mask IRQ32 in GPC. Signed-off-by: Peng Fan <peng@nxp.com> --- V1: This is to upstream patch: http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/commit/?h=imx_4.9.11_1.0.0_ga=0d980646ee068b92db71fd5e4e4efcbc33749cbd ar

[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>

RE: [PATCH V2] ARM: imx: introduce imx_l2c310_write_sec

2017-12-30 Thread Peng Fan
> -Original Message- > From: Philippe Ombredanne [mailto:pombreda...@nexb.com] > Sent: Saturday, December 30, 2017 10:17 PM > To: Peng Fan <peng@nxp.com> > Cc: Shawn Guo <shawn...@kernel.org>; moderated list:ARM/FREESCALE IMX > / MXC A

  1   2   3   4   5   6   7   8   9   10   >