[PATCH] arm: xen: mm: use __GPF_DMA32 for arm64

2019-07-09 Thread Peng Fan
arm64 shares some code under arch/arm/xen, including mm.c. However ZONE_DMA is removed by commit ad67f5a6545("arm64: replace ZONE_DMA with ZONE_DMA32"). So to ARM64, need use __GFP_DMA32. Signed-off-by: Peng Fan --- arch/arm/xen/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 2/3] arm64: mmu: early_pgtable_alloc: remove unnecessary comments

2019-02-13 Thread Peng Fan
The empty zero page has been moved to bss area by commit 5227cfa71f9e ("arm64: mm: place empty_zero_page in bss"), and it alreay added "dsb ishst" in head.S to make sure the empty zero page visible to PTW. There is no code to reflect the comment, so remove it. Sig

[PATCH 1/3] arm64: mmu: update paging_init comments

2019-02-13 Thread Peng Fan
The comments has not been changed since the function introduced, but the function has been changed dramatically, so update the comments to reflect the code. Signed-off-by: Peng Fan --- arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm

[PATCH 3/3] arm64: mmu: pgd_pgtable_alloc: drop barrier

2019-02-13 Thread Peng Fan
oc is only called by __create_pgd_mapping, and there are implicit barriers in __create_pgd_mapping, so we could remove the barrier pgd_pgtable_alloc Signed-off-by: Peng Fan --- Note: this patch tested on qemu-system-aarch64, not real hardware. arch/arm64/mm/mmu.c | 2 -- 1 file changed, 2 dele

RE: [PATCH 1/3] arm64: mmu: update paging_init comments

2019-02-13 Thread Peng Fan
Hi Mark, > -Original Message- > From: Mark Rutland [mailto:mark.rutl...@arm.com] > Sent: 2019年2月13日 19:19 > To: Peng Fan > Cc: catalin.mari...@arm.com; will.dea...@arm.com; > ard.biesheu...@linaro.org; yaojun8558...@gmail.com; > cpan...@codeaurora.org; robin.mur...

RE: [PATCH 2/3] arm64: mmu: early_pgtable_alloc: remove unnecessary comments

2019-02-13 Thread Peng Fan
Hi Mark, > -Original Message- > From: Mark Rutland [mailto:mark.rutl...@arm.com] > Sent: 2019年2月13日 19:22 > To: Peng Fan > Cc: catalin.mari...@arm.com; will.dea...@arm.com; > ard.biesheu...@linaro.org; yaojun8558...@gmail.com; > cpan...@codeaurora.org; robin.mur...

RE: [PATCH 3/3] arm64: mmu: pgd_pgtable_alloc: drop barrier

2019-02-13 Thread Peng Fan
Hi Mark, > -Original Message- > From: Mark Rutland [mailto:mark.rutl...@arm.com] > Sent: 2019年2月13日 19:31 > To: Peng Fan > Cc: catalin.mari...@arm.com; will.dea...@arm.com; > ard.biesheu...@linaro.org; yaojun8558...@gmail.com; > cpan...@codeaurora.org; robin.mur...

[PATCH V2] arm64: mmu: drop paging_init comments

2019-02-13 Thread Peng Fan
The comments could not reflect the code, and it is easy to get what this function does from a straight-line reading of the code. So let's drop the comments Signed-off-by: Peng Fan Acked-by: Mark Rutland --- V2: Drop comments. Add a-b update commit log. V1: https://www.mail-archiv

RE: [PATCH] mm/cma: cma_declare_contiguous: correct err handling

2019-02-22 Thread Peng Fan
> -Original Message- > From: Mike Rapoport [mailto:r...@linux.ibm.com] > Sent: 2019年2月20日 1:46 > To: Vlastimil Babka > Cc: Andrew Morton ; Peng Fan > ; labb...@redhat.com; mho...@suse.com; > iamjoonsoo@lge.com; r...@linux.vnet.ibm.com; > m.szyp

[RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-24 Thread Peng Fan
ing pcpu_nr_slots to avoid waste one slot and let [PCPU_MIN_ALLOC_SIZE, 31) really share the same slot. Signed-off-by: Peng Fan --- V1: Not very sure about whether it is intended to leave the slot there. mm/percpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/percpu.

[PATCH 1/2] percpu: km: remove SMP check

2019-02-24 Thread Peng Fan
percpu-km could only be selected by NEED_PER_CPU_KM which depends on !SMP, so CONFIG_SMP will be false when choose percpu-km. Signed-off-by: Peng Fan --- mm/percpu-km.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu-km.c b/mm/percpu-km.c index 0f643dc2dc65

[PATCH 2/2] percpu: km: no need to consider pcpu_group_offsets[0]

2019-02-24 Thread Peng Fan
percpu-km is used on UP systems which only has one group, so the group offset will be always 0, there is no need to subtract pcpu_group_offsets[0] when assigning chunk->base_addr Signed-off-by: Peng Fan --- mm/percpu-km.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

RE: [PATCH] arm64: dts: imx8qxp: add lsio_mu2 node

2019-03-20 Thread Peng Fan
Hi Shawn, > -Original Message- > From: Aisheng Dong > Sent: 2019年3月15日 18:24 > To: Peng Fan ; robh...@kernel.org; > mark.rutl...@arm.com; shawn...@kernel.org; s.ha...@pengutronix.de; > ker...@pengutronix.de; feste...@gmail.com; dl-linux-imx > ; Anson Huang ; Dani

RE: [PATCH] arm64: dts: imx8qxp: fix mbox-cells

2019-03-20 Thread Peng Fan
Hi Shawn, > -Original Message- > From: Aisheng Dong > Sent: 2019年3月15日 18:24 > To: Peng Fan ; robh...@kernel.org; > mark.rutl...@arm.com; shawn...@kernel.org; s.ha...@pengutronix.de; > ker...@pengutronix.de; feste...@gmail.com; dl-linux-imx > ; Anson Huang ; Dani

RE: [PATCH 11/12] percpu: convert chunk hints to be based on pcpu_block_md

2019-03-03 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月4日 4:22 > To: Peng Fan > Cc: Dennis Zhou ; Tejun Heo ; Christoph > Lameter ; Vlad Buslov ; > kernel-t...@fb.com; linux...@kvack.org; linux-kernel@vger.kernel.org > Subject:

RE: [PATCH 07/12] percpu: add block level scan_hint

2019-03-04 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月4日 4:23 > To: Peng Fan > Cc: Tejun Heo ; Christoph Lameter ; Vlad > Buslov ; kernel-t...@fb.com; linux...@kvack.org; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH 07/12]

[PATCH 2/2] percpu: pcpu_next_md_free_region: inclusive check for PCPU_BITMAP_BLOCK_BITS

2019-03-04 Thread Peng Fan
If the block [contig_hint_start, contig_hint_start + contig_hint) matches block->right_free area, need use "<=", not "<". Signed-off-by: Peng Fan --- V1: Based on https://patchwork.kernel.org/cover/10832459/ applied linux-next boot test on qemu aarch64 mm/per

[PATCH 1/2] perpcu: correct pcpu_find_block_fit comments

2019-03-04 Thread Peng Fan
pcpu_find_block_fit is not find block index, it is to find the bitmap off in a chunk. Signed-off-by: Peng Fan --- V1: Based on https://patchwork.kernel.org/cover/10832459/ applied linux-next mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm

RE: [PATCH 2/2] percpu: pcpu_next_md_free_region: inclusive check for PCPU_BITMAP_BLOCK_BITS

2019-03-04 Thread Peng Fan
> -Original Message- > From: den...@kernel.org [mailto:den...@kernel.org] > Sent: 2019年3月5日 2:57 > To: Peng Fan > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [PATCH 2/2] percpu: pcp

RE: [PATCH 1/2] perpcu: correct pcpu_find_block_fit comments

2019-03-04 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月5日 3:14 > To: Peng Fan > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [PATCH 1/2] perpcu: correc

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

[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

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 imx_pinctrl_desc initialization

2016-11-24 Thread Peng Fan
ctrl_desc->pmxops = &imx_pmx_ops, >- imx_pinctrl_desc->confops = &imx_pinconf_ops, >- imx_pinctrl_desc->owner = THIS_MODULE, >+ imx_pinctrl_desc->pctlops = &imx_pctrl_ops; >+ imx_pinctrl_desc->pmxops = &imx_pmx_ops; >+ imx_

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

[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

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: 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(-)

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. > >Usin

[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

[PATCH] mtd: blktrans: fix integer overflow

2015-08-21 Thread Peng Fan
want to see. Change the type of entry size of mtd_blktrans_dev to unsigned long long to fix the overflow issue. Signed-off-by: Peng Fan Cc: David Woodhouse Cc: Brian Norris --- include/linux/mtd/blktrans.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mt

[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 Cc: Linus Walleij Cc: Alexandre

[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 Cc: Linus Walleij Cc: Alexandre

[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 Cc: Linus Walleij Cc: Alexandre Courbot --- drivers/gpio/gpiolib.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 6bc612b..f9470b0 100644

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

2015-08-24 Thread Peng Fan
ces/soc0/gpio-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 Cc: Dmitry Torokhov Cc: Linus Walleij Cc: Alexander Stein Cc: Tejun Heo Cc: Andrew Morton Cc: Wolfram Sang Cc: Fabio

[PATCH] tools: PCI: Fix memory leak in run_test

2020-06-11 Thread Peng Fan
We should free "test" before the return of run_test. Signed-off-by: Peng Fan --- tools/pci/pcitest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c index 0a1344c..7c20332 100644 --- a/tools/pci/pcitest.c +++ b/tools/pci/pcitest.c @@ -

[PATCH] power: supply: rt5033_battery: Fix error code in rt5033_battery_probe()

2020-07-02 Thread Peng Fan
In the function rt5033_battery_probe(), it should return -ENOMEM instead of -EINVAL when call function devm_kzalloc() failed. Signed-off-by: Peng Fan --- drivers/power/supply/rt5033_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply

RE: [PATCH V3 0/3] ARM: imx: move cpu code to drivers/soc/imx

2020-07-03 Thread Peng Fan
> Subject: Re: [PATCH V3 0/3] ARM: imx: move cpu code to drivers/soc/imx > > On 5/20/2020 9:01 AM, Peng Fan wrote: > > From: Peng Fan > > > > V3: > > Rebased to latest next tree > > Resolved the conflicts with vf610 soc patch > > > > V2: >

RE: [PATCH] xen: introduce xen_vring_use_dma

2020-06-29 Thread Peng Fan
> Subject: Re: [PATCH] xen: introduce xen_vring_use_dma > > On Mon, Jun 29, 2020 at 06:25:41AM +0000, Peng Fan wrote: > > > > > > Anyway, re-reading the last messages of the original thread > > > > > > [1], it looks like Peng had a clear idea

RE: [PATCH] xen: introduce xen_vring_use_dma

2020-06-29 Thread Peng Fan
> Subject: RE: [PATCH] xen: introduce xen_vring_use_dma > > On Mon, 29 Jun 2020, Peng Fan wrote: > > > > If that is the case, how is it possible that virtio breaks on ARM > > > > using the default dma_ops? The breakage is not Xen related (except > > >

[PATCH V2 2/3] arm64: dts: imx8qxp: add i2c aliases

2020-06-23 Thread peng . fan
From: Peng Fan The devices could be enumerated properly with aliases. Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index

[PATCH V2 3/3] arm64: dts: imx8qxp: Add ethernet alias

2020-06-23 Thread peng . fan
From: Peng Fan Add ethernet alias, so bootloader code can use this to find the primary ethernet device, and set the MAC address. Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale

[PATCH V2 0/3] arm64: dts: imx8qxp: dtb aliases fix/update

2020-06-23 Thread peng . fan
From: Peng Fan V2: Fix order in patch 2/3, no other changes Minor patchset to fix and update alias for i.MX8QXP Peng Fan (3): arm64: dts: imx8qxp: add alias for lsio MU arm64: dts: imx8qxp: add i2c aliases arm64: dts: imx8qxp: Add ethernet alias arch/arm64/boot/dts/freescale

[PATCH V2 1/3] arm64: dts: imx8qxp: add alias for lsio MU

2020-06-23 Thread peng . fan
From: Peng Fan Add lsio mu alias for all lsio MUs that could communicate with SCU, imx_scu_enable_general_irq_channel will parse the alias to get the mu resource id, if using other MU, not MU1, the `mu_resource_id` is not what we expect, so add alias to fix this issue. Signed-off-by: Peng Fan

RE: [PATCH 2/3] arm64: dts: imx8qxp: add i2c aliases

2020-06-23 Thread Peng Fan
Hi Shawn, > Subject: Re: [PATCH 2/3] arm64: dts: imx8qxp: add i2c aliases > > On Mon, Jun 01, 2020 at 10:06:19AM +0800, peng@nxp.com wrote: > > From: Peng Fan > > > > The devices could be enumerated properly with aliases. > > > > Signed-off-by: Pen

[PATCH] mips/vdso: Fix resource leaks in genvdso.c

2020-07-14 Thread Peng Fan
Close "fd" before the return of map_vdso() and close "out_file" in main(). Signed-off-by: Peng Fan --- arch/mips/vdso/genvdso.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/mips/vdso/genvdso.c b/arch/mips/vdso/genvdso.c index be57b832..f459c7a 100644

[PATCH v2] mips/vdso: Fix resource leaks in genvdso.c

2020-07-14 Thread Peng Fan
Close "fd" before the return of map_vdso() and close "out_file" in main(). Signed-off-by: Peng Fan --- v2: - add one missing fclose() --- arch/mips/vdso/genvdso.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/mips/vdso/genvdso.c b/arch/mips/

[PATCH] clk: imx: fix composite peripheral flags

2020-08-25 Thread peng . fan
From: Peng Fan According to RM, for peripheral clock slice, "IP clock slices must be stopped to change the clock source.". So we must have CLK_SET_PARENT_GATE flag to avoid glitch. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-composite-8m.c | 1 + 1 file changed, 1 insertio

RE: [PATCH V2 0/7] remoteproc: imx_rproc: support iMX8MQ/M

2020-10-07 Thread Peng Fan
ttps://patchwork.kernel.org/cover/11682461/ > > This patchset is to support i.MX8MQ/M coproc. > The early boot feature was dropped to make the patchset small in V2. > > Since i.MX specific TCM memory requirement, add elf platform hook. > Several patches have got reviewed b

RE: [PATCH V2 0/7] remoteproc: imx_rproc: support iMX8MQ/M

2020-10-08 Thread Peng Fan
> Subject: Re: [PATCH V2 0/7] remoteproc: imx_rproc: support iMX8MQ/M > > On Wed, 7 Oct 2020 at 18:52, Peng Fan wrote: > > > > Mathieu, Oleksij > > > > > Subject: [PATCH V2 0/7] remoteproc: imx_rproc: support iMX8MQ/M > > > > Do you have time to

[PATCH V2] tty: serial: lpuart: fix lpuart32_write usage

2020-09-29 Thread Peng Fan
The 2nd and 3rd parameter were wrongly used, and cause kernel abort when doing kgdb debug. Fixes: 1da17d7cf8e2c4("tty: serial: fsl_lpuart: Use appropriate lpuart32_* I/O funcs") Signed-off-by: Peng Fan --- V2: Fix poll init drivers/tty/serial/fsl_lpuart.c | 14 ++ 1 fi

[PATCH] tty: serial: fsl_lpuart: fix lpuart32_poll_get_char

2020-09-29 Thread Peng Fan
The watermark is set to 1, so we need to input two chars to trigger RDRF using the original logic. With the new logic, we could always get the char when there is data in FIFO. Suggested-by: Fugang Duan Signed-off-by: Peng Fan --- drivers/tty/serial/fsl_lpuart.c | 2 +- 1 file changed, 1

RE: [PATCH v2 3/3] PM / Domains: Add support for PM domain on/off notifiers for genpd

2020-09-25 Thread Peng Fan
> Subject: Re: [PATCH v2 3/3] PM / Domains: Add support for PM domain on/off > notifiers for genpd > > On Fri, 25 Sep 2020 at 08:08, Peng Fan wrote: > > > > Hi Ulf, > > > > > Subject: [PATCH v2 3/3] PM / Domains: Add support for PM domain > > > on/

[PATCH V2 0/7] remoteproc: imx_rproc: support iMX8MQ/M

2020-09-26 Thread Peng Fan
requirement, add elf platform hook. Several patches have got reviewed by Oleksij and Mathieu in v1. Peng Fan (7): remoteproc: elf: support platform specific memory hook remoteproc: imx_rproc: add elf memory hooks remoteproc: imx_rproc: correct err message remoteproc: imx_rproc: use devm_ioremap

[PATCH V2 3/7] remoteproc: imx_rproc: correct err message

2020-09-26 Thread Peng Fan
It is using devm_ioremap, so not devm_ioremap_resource. Correct the error message and print out sa/size. Acked-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH V2 2/7] remoteproc: imx_rproc: add elf memory hooks

2020-09-26 Thread Peng Fan
Add elf memory hooks according to elf_mem_hook setting in the platform configuration dcfg. Acked-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc

[PATCH V2 7/7] remoteproc: imx_proc: enable virtio/mailbox

2020-09-26 Thread Peng Fan
Use virtio/mailbox to build connection between Remote Proccessors and Linux. Add delayed work to handle incoming messages. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 112 - 1 file changed, 109 insertions(+), 3 deletions

[PATCH V2 1/7] remoteproc: elf: support platform specific memory hook

2020-09-26 Thread Peng Fan
elf loader to support platform specific memory functions. Acked-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/remoteproc_elf_loader.c | 20 ++-- include/linux/remoteproc.h | 2 ++ 2 files changed, 20 insertions(+), 2 deletions(-) d

[PATCH V2 6/7] remoteproc: imx_rproc: support i.MX8MQ/M

2020-09-26 Thread Peng Fan
Add i.MX8MQ dev/sys addr map and configuration data structure i.MX8MM share i.MX8MQ settings. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 40 ++ 1 file changed, 40 insertions(+) diff --git a/drivers/remoteproc

[PATCH V2 4/7] remoteproc: imx_rproc: use devm_ioremap

2020-09-26 Thread Peng Fan
We might need to map an region multiple times, becaue the region might be shared between remote processors, such i.MX8QM with dual M4 cores. So use devm_ioremap, not devm_ioremap_resource. Reviewed-by: Oleksij Rempel Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc

[PATCH V2 5/7] remoteproc: imx_rproc: add i.MX specific parse fw hook

2020-09-26 Thread Peng Fan
The hook is used to parse memory-regions and load resource table from the address the remote processor published. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 97 ++ 1 file changed, 97 insertions(+) diff --git a/drivers

RE: [PATCH] ARM: imx: Add revision support for i.MX7ULP revision 2.2

2020-09-27 Thread Peng Fan
default: > imx_set_soc_revision(IMX_CHIP_REVISION_1_0); > break; Reviewed-by: Peng Fan > -- > 2.7.4

[PATCH] tty: serial: lpuart: fix lpuart32_write usage

2020-09-27 Thread Peng Fan
The 2nd and 3rd parameter were wrongly used, and cause kernel abort when doing kgdb debug. Fixes: 1da17d7cf8e2c4("tty: serial: fsl_lpuart: Use appropriate lpuart32_* I/O funcs") Signed-off-by: Peng Fan --- drivers/tty/serial/fsl_lpuart.c | 2 +- 1 file changed, 1 insertion(+),

RE: [PATCH 2/4] firmware: imx: add resource management api

2020-06-01 Thread Peng Fan
> Subject: RE: [PATCH 2/4] firmware: imx: add resource management api > > > From: Peng Fan > > Sent: Monday, June 1, 2020 8:40 PM > > > > > > > From: Peng Fan > > > > Sent: Friday, April 24, 2020 9:12 AM > > > > > > > &g

RE: [PATCH 2/4] firmware: imx: add resource management api

2020-06-01 Thread Peng Fan
> Subject: RE: [PATCH 2/4] firmware: imx: add resource management api > > > From: Peng Fan > > Sent: Thursday, April 23, 2020 3:00 PM > > > > Add resource management API, when we have multiple partition running > > together, resources not owned to

RE: [PATCH V3 1/3] dt-bindings: mailbox: imx-mu: support i.MX8M

2020-06-01 Thread Peng Fan
Hi Oleksij, > Subject: Re: [PATCH V3 1/3] dt-bindings: mailbox: imx-mu: support i.MX8M > > On Mon, Jun 01, 2020 at 04:20:00PM +0800, peng@nxp.com wrote: > > From: Peng Fan > > > > Add i.MX8MQ/M/N/P compatible string to support i.MX8M SoCs > > > > Revie

RE: [PATCH 2/4] firmware: imx: add resource management api

2020-06-02 Thread Peng Fan
> Subject: RE: [PATCH 2/4] firmware: imx: add resource management api > > > From: Peng Fan > > Sent: Tuesday, June 2, 2020 12:51 PM > > > > > > > From: Peng Fan > > > > Sent: Monday, June 1, 2020 8:40 PM > > > > > > >

RE: [PATCH V3 1/3] dt-bindings: mailbox: imx-mu: support i.MX8M

2020-06-02 Thread Peng Fan
> Subject: [PATCH V3 1/3] dt-bindings: mailbox: imx-mu: support i.MX8M I'll drop this patch for yaml update, since https://lkml.org/lkml/2020/6/1/370 includes imx8mq/mm/n/p. Thanks, Peng. > > From: Peng Fan > > Add i.MX8MQ/M/N/P compatible string to support i.MX8M SoCs &g

[PATCH V2 0/3] firmware: imx: fix/update cm4 and add resource check

2020-06-02 Thread peng . fan
From: Peng Fan V2: Add R-b tag Drop patch 3/4 from V1 Add comments and update Copyright for patch 2/3 keep code consistency in Patch 3/3 V1: https://patchwork.kernel.org/cover/11505045/ Fix cm40 power domain, update to add more cm4 resources Add resource owner check, to not register if

[PATCH V2 2/3] firmware: imx: add resource management api

2020-06-02 Thread peng . fan
From: Peng Fan Add resource management API, when we have multiple partition running together, resources not owned to current partition should not be used. Reviewed-by: Leonard Crestez Signed-off-by: Peng Fan --- drivers/firmware/imx/Makefile | 2 +- drivers/firmware/imx/rm.c

[PATCH V2 3/3] firmware: imx: scu-pd: add more cm4 resources

2020-06-02 Thread peng . fan
From: Peng Fan Add more cm4 resources, then linux could use cm4's i2c/lpuart and could kick cm4 core. Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan --- drivers/firmware/imx/scu-pd.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/firmwar

[PATCH V2 1/3] firmware: imx: scu-pd: fix cm40 power domain

2020-06-02 Thread peng . fan
From: Peng Fan The postfix needs to be false. Alought compiler use 0 for postfix now, and take start_from as 0, it is better we add explicit false to postfix. Fixes: 705dcca91d0a("firmware: imx: scu-pd: add power domain for I2C and INTMUX in CM40 SS") Signed-off-by: Peng Fan Reviewe

[PATCH V4 0/2] imx8m: add mu support

2020-06-02 Thread peng . fan
From: Peng Fan V4: Drop patch 1/3, since https://lkml.org/lkml/2020/6/1/370 already has the yaml changes V3: Add R-b tag Remove undocumented property V2: Add dt-bindings Merge dts changes into one patch, since all is to add mu node Add mu dt bindings Add mu node Add i.MX8MP mu root clk

[PATCH V4 1/2] arm64: dts: imx8m: add mu node

2020-06-02 Thread peng . fan
From: Peng Fan Add mu node to let A53 could communicate with M Core. Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 8 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 8 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 8

[PATCH V4 2/2] clk: imx8mp: add mu root clk

2020-06-02 Thread peng . fan
From: Peng Fan Add mu root clk for mu mailbox usage. Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index b4d9db9d5bf1..ca747712400f 100644

[PATCH] soc: imx: scu: use devm_kasprintf

2020-06-03 Thread peng . fan
From: Peng Fan Use devm_kasprintf to simplify code Signed-off-by: Peng Fan --- drivers/soc/imx/soc-imx-scu.c | 37 +++-- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/drivers/soc/imx/soc-imx-scu.c b/drivers/soc/imx/soc-imx-scu.c index

RE: [PATCH V2 2/3] firmware: imx: add resource management api

2020-06-04 Thread Peng Fan
> Subject: RE: [PATCH V2 2/3] firmware: imx: add resource management api > [...] > > +/* > > + * Copyright (C) 2016 Freescale Semiconductor, Inc. > > + * Copyright 2017-2020 NXP > > + * > > + * Header file containing the public API for the System Controller > > +(SC) > > + * Power Management (PM

[PATCH V3 2/3] firmware: imx: add resource management api

2020-06-04 Thread peng . fan
From: Peng Fan Add resource management API, when we have multiple partition running together, resources not owned to current partition should not be used. Reviewed-by: Leonard Crestez Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan --- drivers/firmware/imx/Makefile | 2 +- drivers

[PATCH V3 0/3] firmware: imx: fix/update cm4 and add resource check

2020-06-04 Thread peng . fan
From: Peng Fan V3: Fix comments Add R-b tag V2: Add R-b tag Drop patch 3/4 from V1 Add comments and update Copyright for patch 2/3 keep code consistency in Patch 3/3 V1: https://patchwork.kernel.org/cover/11505045/ Fix cm40 power domain, update to add more cm4 resources Add resource

[PATCH V3 3/3] firmware: imx: scu-pd: add more cm4 resources

2020-06-04 Thread peng . fan
From: Peng Fan Add more cm4 resources, then linux could use cm4's i2c/lpuart and could kick cm4 core. Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan --- drivers/firmware/imx/scu-pd.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/firmwar

[PATCH V3 1/3] firmware: imx: scu-pd: fix cm40 power domain

2020-06-04 Thread peng . fan
From: Peng Fan The postfix needs to be false. Alought compiler use 0 for postfix now, and take start_from as 0, it is better we add explicit false to postfix. Fixes: 705dcca91d0a("firmware: imx: scu-pd: add power domain for I2C and INTMUX in CM40 SS") Signed-off-by: Peng Fan Reviewe

[PATCH] clk: imx: fix i.MX7D peripheral clk mux flags

2020-08-27 Thread peng . fan
From: Peng Fan According to RM, Page 574, Chapter 5.2.6.4.3 Peripheral clock slice, "IP clock slices must be stopped to change the clock source.". So we must have CLK_SET_PARENT_GATE flag to avoid glitch. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx

RE: [PATCH v2] driver core: Fix device_pm_lock() locking for device links

2020-09-01 Thread Peng Fan
xp.com%7Cc07e23dccfa84d96b17808d84ea71bb9%7C686ea1d3bc2b4c6f > a92cd99c5c301635%7C0%7C0%7C637345826922594698&sdata=X0Pzb > ni5QcjxOCWkfR9uvxRcfvpzPQSNMmk%2BJf93dYI%3D&reserved=0 > Reported-by: Dong Aisheng > Signed-off-by: Saravana Kannan Tested-by: Peng Fan Thanks, Peng. >

[PATCH] cpufreq: dt: delay the clk/regulator check

2020-08-31 Thread peng . fan
From: Peng Fan cpufreq_init could be used to do check clk/regulator check, there is no need to duplicate the work in resources_available. Signed-off-by: Peng Fan --- V1: Actually we met an issue as below. Per my analysis, it is regulator_put called in resources_available not remove the

RE: [PATCH] cpufreq: dt: delay the clk/regulator check

2020-08-31 Thread Peng Fan
> Subject: Re: [PATCH] cpufreq: dt: delay the clk/regulator check > > On 31-08-20, 16:48, peng@nxp.com wrote: > > From: Peng Fan > > > > cpufreq_init could be used to do check clk/regulator check, there is > > no need to duplicate the work in resources_avail

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

2020-08-31 Thread Peng Fan
I'm kinda stuck here. Open to suggestions. Hoping you'll have > > better ideas for breaking the cycle. Or point out how I'm > > misunderstanding the cycle here. > > > > Aisheng, > > Sent out a fix that I think should work. > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.ke > rnel.org%2Flkml%2F20200831221007.1506441-1-saravanak%40google.com% > 2FT%2F%23u&data=02%7C01%7Cpeng.fan%40nxp.com%7C3254604d7 > 41b4d1ce73b08d84dfb65af%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0 > %7C0%7C637345089428077609&sdata=5lh8WO%2BYMh4C1sBn58Fsm > XsjqjPj%2B%2FB71%2FENfMGDtTk%3D&reserved=0 > > I wasn't able to reproduce it in my hardware. So, if you can test that patch > (and respond to that thread), that'd be great. I not found your patch in my mailbox, but anyway I tested it. Tested-by: Peng Fan (i.MX7ULP EVK) Regards, Peng. > > -Saravana

[PATCH] clk: imx: lpcg-scu: SW workaround for errata (e10858)

2020-09-08 Thread peng . fan
From: Peng Fan Back-to-back LPCG writes can be ignored by the LPCG register due to a HW bug. The writes need to be separated by at least 4 cycles of the gated clock. The workaround is implemented as follows: 1. For clocks running greater than or equal to 24MHz, a read followed by the write will

[PATCH] firmware: imx: scu-pd: ignore power domain not owned

2020-09-08 Thread peng . fan
From: Peng Fan Should not register power domain that not owned by current partition. Alought power domains will not be registered when power on failure, we have to let CPU waste more cycles. Whether power on or owned check, both need communicate with SCU, but with owned check, we no need to

RE: [PATCH] clk: imx: lpcg-scu: SW workaround for errata (e10858)

2020-09-08 Thread Peng Fan
> Subject: Re: [PATCH] clk: imx: lpcg-scu: SW workaround for errata (e10858) > > On 20-09-08 17:14:47, peng@nxp.com wrote: > > From: Peng Fan > > > > Back-to-back LPCG writes can be ignored by the LPCG register due to a > > HW bug. The writes need to be sepa

[PATCH] perf bench numa: Remove dead code in parse_nodes_opt()

2020-08-14 Thread Peng Fan
In the function parse_nodes_opt(), the statement "return 0;" is dead code, remove it. Signed-off-by: Peng Fan --- tools/perf/bench/numa.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c index 5797253..70c8c2c 100644 --- a/tools/

[PATCH] ARM: dts: imx: add usb alias

2020-10-13 Thread peng . fan
From: Peng Fan Add usb alias for bootloader emulator the controller in correct order. Signed-off-by: Peng Fan --- arch/arm/boot/dts/imx6qdl.dtsi | 4 arch/arm/boot/dts/imx6sl.dtsi | 3 +++ arch/arm/boot/dts/imx6sll.dtsi | 2 ++ arch/arm/boot/dts/imx6sx.dtsi | 3 +++ arch/arm/boot/dts

RE: [PATCH 01/13] remoteproc: Re-check state in rproc_shutdown()

2020-10-14 Thread Peng Fan
NG) > + goto out; > + > /* if the remote proc is still needed, bail out */ > if (!atomic_dec_and_test(&rproc->power)) > goto out; > -- Reviewed-by: Peng Fan

RE: [PATCH 02/13] remoteproc: Remove useless check in rproc_del()

2020-10-14 Thread Peng Fan
> /* TODO: make sure this works with rproc->power > 1 */ > - if (rproc->auto_boot) > - rproc_shutdown(rproc); > + rproc_shutdown(rproc); > > mutex_lock(&rproc->lock); > rproc->state = RPROC_DELETED; > -- Reviewed-by: Peng Fan

RE: [PATCH 03/13] remoteproc: Add new RPROC_ATTACHED state

2020-10-14 Thread Peng Fan
for the core to attach to it > * @RPROC_LAST: just keep this one at the end > @@ -419,8 +421,9 @@ enum rproc_state { > RPROC_RUNNING = 2, > RPROC_CRASHED = 3, > RPROC_DELETED = 4, > - RPROC_DETACHED = 5, > - RPROC_LAST = 6, > + RPROC_ATTACHED = 5, > + RPROC_DETACHED = 6, > + RPROC_LAST = 7, > }; > > /** > -- Reviewed-by: Peng Fan

RE: [PATCH 04/13] remoteproc: Properly represent the attached state

2020-10-14 Thread Peng Fan
if remote processor is behind an MMU > * @auto_boot: flag to indicate if remote processor should be auto-started > - * @autonomous: true if an external entity has booted the remote processor > * @dump_segments: list of segments in the firmware > * @nb_vdev: number of vdev currently handled by rproc > * @char_dev: character device of the rproc @@ -547,7 +546,6 @@ struct > rproc { > size_t table_sz; > bool has_iommu; > bool auto_boot; > - bool autonomous; > struct list_head dump_segments; > int nb_vdev; > u8 elf_class; > -- Looks good. Reviewed-by: Peng Fan

RE: [PATCH 05/13] remoteproc: Add new detach() remoteproc operation

2020-10-14 Thread Peng Fan
oid * (*da_to_va)(struct rproc *rproc, u64 da, size_t len); > int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); > -- This look useful for i.MX8 partitioned case, M4 and A53 could reboot without impacting the other. When A53 reboot, detach is invoked if I understand correct. Reviewed-by: Peng Fan

RE: [PATCH 06/13] remoteproc: Introduce function __rproc_detach()

2020-10-14 Thread Peng Fan
> + return ret; > + } > + > + rproc_unprepare_subdevices(rproc); > + > + rproc->state = RPROC_DETACHED; > + > + dev_info(dev, "detached remote processor %s\n", rproc->name); > + > + return 0; > +} > > /** > * rproc_trigger_recovery() - recover a remoteproc > -- Reviewed-by: Peng Fan

RE: [PATCH 07/13] remoteproc: Introduce function rproc_detach()

2020-10-14 Thread Peng Fan
gt; @@ -656,6 +656,7 @@ rproc_of_resm_mem_entry_init(struct device *dev, > u32 of_resm_idx, size_t len, > > int rproc_boot(struct rproc *rproc); > void rproc_shutdown(struct rproc *rproc); > +int rproc_detach(struct rproc *rproc); > void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type); > int rproc_coredump_add_segment(struct rproc *rproc, dma_addr_t da, size_t > size); int rproc_coredump_add_custom_segment(struct rproc *rproc, > -- Reviewed-by: Peng Fan Not relevant to your patch, just see unregister_virtio_device not set device status when reading code, should that add device status setting in unregister_virtio_device?

<    1   2   3   4   5   6   7   8   9   >