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

2016-07-21 Thread Peng Fan
ALIGN(size)' to 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/ba

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

[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 Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald Cc: Greg Kroah-Hartman Cc: Tapasweni Pathak

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 > >Cc: Linus Walleij > >Cc: Alexandre Courbot > --- > > drivers/g

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

RE: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array

2018-08-08 Thread Peng Fan
> -Original Message- > From: Anson Huang > Sent: 2018年8月8日 12:39 > To: shawn...@kernel.org; s.ha...@pengutronix.de; ker...@pengutronix.de; > Fabio Estevam ; mturque...@baylibre.com; > sb...@kernel.org; linux-arm-ker...@lists.infradead.org; > linux-...@vger.kernel.org; linux-kernel@vger.ke

RE: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array

2018-08-12 Thread Peng Fan
Hi Anson, > > > -Original Message- > > > From: Anson Huang > > > Sent: 2018年8月8日 12:39 > > > To: shawn...@kernel.org; s.ha...@pengutronix.de; > > > ker...@pengutronix.de; Fabio Estevam ; > > > mturque...@baylibre.com; sb...@kernel.org; > > > linux-arm-ker...@lists.infradead.org; > > > linu

Re: [PATCH] ARM: imx_v6_v7_defconfig: enable OP-TEE

2018-01-23 Thread Peng Fan
Hi, On Fri, Jan 05, 2018 at 05:40:35PM +0800, Peng Fan wrote: >This patch enables configs for Trusted Execution Environment(TEE) and >Open Portable Trusted Execution Environment(OP-TEE). > >With Linux running in Trustzone non-secure world, OP-TEE OS runs in >secure world, linux c

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

2018-01-23 Thread Peng Fan
Hi, For the two patch, ping.. On Sat, Dec 30, 2017 at 09:53:19PM +0800, Peng Fan wrote: >There are two states in i.MX6Q cpuidle driver. >state[1]: ARM WFI mode >state[2]: i.MX6Q WAIT mode > >Take i.MX6DL as example, think out such a case: >1. CPU0/1 both run at normal mode >

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

2018-01-24 Thread Peng Fan
Hi Lucas, On Wed, Jan 24, 2018 at 12:16:25PM +0100, Lucas Stach wrote: >Hi Peng, > >Am Samstag, den 30.12.2017, 21:53 +0800 schrieb Peng Fan: >> There are two states in i.MX6Q cpuidle driver. >> state[1]: ARM WFI mode >> state[2]: i.MX6Q WAIT mode >> >> Ta

[PATCH] ARM: imx_v6_v7_defconfig: enable OP-TEE

2018-01-05 Thread Peng Fan
the bindings in Documentation/devicetree/bindings/arm/firmware/linaro,optee-tz.txt to let the driver probe work. On i.MX6/7, now the bootflow is U-Boot->OP-TEE->Linux, OP-TEE will automatically create that node. Signed-off-by: Peng Fan --- V1: Tested on i.MX7D-SDB with/without OP-TEE OS.

[PATCH] tee: correct max value for id allocation

2018-01-15 Thread Peng Fan
The privileged dev id range is [TEE_NUM_DEVICES / 2, TEE_NUM_DEVICES). The non-privileged dev id range is [0, TEE_NUM_DEVICES / 2). So when finding a slot for them, need to use different max value. Signed-off-by: Peng Fan Cc: Jens Wiklander --- drivers/tee/tee_core.c | 14 +- 1

RE: [Xen-devel] [PATCH v6 0/1] drm/xen-front: Add support for Xen PV display frontend

2018-04-11 Thread Peng Fan
Hi Oleksandr, Just have a question, is this drm/xen-front stuff orthogonal to xen shared coprocessor framework for gpu, or are they exclusive? Thanks, Peng. > Subject: [Xen-devel] [PATCH v6 0/1] drm/xen-front: Add support for Xen PV > display frontend > > From: Oleksandr Andrushchenko > > Hell

RE: [PATCH V4 3/5] mailbox: imx: add imx mu support

2018-07-11 Thread Peng Fan
Hi A.S > -Original Message- > From: A.s. Dong > Sent: 2018年7月11日 15:30 > To: Sascha Hauer > Cc: linux-arm-ker...@lists.infradead.org; donga...@gmail.com; Jassi Brar > ; linux-kernel@vger.kernel.org; Oleksij Rempel > ; dl-linux-imx ; > ker...@pengutronix.de; Fabio Estevam ; > shawn...@kern

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 > 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-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 > Cc: Peng Fan ; Rafael J. Wysocki > ; Fabio Estevam ; Greg > Kroah-Hartman ; Linux Kernel Mailing List >

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 > Cc: Rafael J. Wysocki ; Ulf Hansson > ; Rafael J. Wysocki ; > Fabio Estevam ; Greg Kroah-Hartman >

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 > Cc: Rafael J. Wysocki ; Ulf Hansson > ; Rafael J. Wysocki ; > Fabio Estevam ; Greg Kroah-Hartman > ; Linux Kernel Mailing List > ; Linux PM

tee/optee driver pm question

2018-12-18 Thread Peng Fan
Hi Jens, Ulf We met an issue is OP-TEE is actively doing some DMA operations, such as CAAM DMA, while Linux is doing some ddr freq change and will let ddr into self-refresh state, this will cause issues. On ARMv8 i.MX, we have code request_bus_freq/release_bus_freq to ask ATF to make ddr into/

[PATCH] irqchip: gic-v3: remove dead code in gic_iterate_rdists

2018-12-16 Thread Peng Fan
In gic_iterate_rdists, ret will never be 0 when `ret ? -ENODEV : 0` at the end of function, so let's directly return -ENODEV. Signed-off-by: Peng Fan --- drivers/irqchip/irq-gic-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/dr

RE: [PATCH] vhost: use pr_err for vq_err

2024-05-16 Thread Peng Fan
> Subject: Re: [PATCH] vhost: use pr_err for vq_err > > On Thu, May 16, 2024 at 03:46:29PM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > Use pr_err to print out error message without enabling DEBUG. This > > could make people catch error easier

RE: [PATCH] remoteproc: imx_rproc: Adjust phandle parsing issue while remapping optional addresses in imx_rproc_addr_init()

2024-06-06 Thread Peng Fan
r (linuxtesting.org) with SVACE. > > Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc > driver") > Signed-off-by: Aleksandr Mishin Anyway LGTM: Reviewed-by: Peng Fan Thanks, Peng.

RE: [PATCH] test/vsock: add install target

2024-07-10 Thread Peng Fan
> Subject: Re: [PATCH] test/vsock: add install target > > On Tue, Jul 09, 2024 at 09:50:51PM GMT, Peng Fan (OSS) wrote: > >From: Peng Fan > > > >Add install target for vsock to make Yocto easy to install the images. > > > >Signed-off-by: Peng Fan >

RE: [PATCH] test/vsock: add install target

2024-07-10 Thread Peng Fan
> Subject: Re: [PATCH] test/vsock: add install target > > On Wed, Jul 10, 2024 at 08:11:32AM GMT, Peng Fan wrote: > >> Subject: Re: [PATCH] test/vsock: add install target > >> > >> On Tue, Jul 09, 2024 at 09:50:51PM GMT, Peng Fan (OSS) wrote: > >> >

RE: [PATCH 4/6] remoteproc: imx_rproc: merge TCML/U

2024-07-18 Thread Peng Fan
> Subject: Re: [PATCH 4/6] remoteproc: imx_rproc: merge TCML/U > > On Fri, Jul 12, 2024 at 04:34:57PM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > Merge contiguous TCML/U regions into one to avoid load elf files > which > > has large sections fail

RE: [PATCH 5/6] remoteproc: imx_rproc: allow tx_block to be set

2024-07-18 Thread Peng Fan
> Subject: Re: [PATCH 5/6] remoteproc: imx_rproc: allow tx_block to be > set > > On Fri, Jul 12, 2024 at 04:34:58PM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > Current tx_block is set to true, but there is case that no need to > > wait respon

RE: [PATCH 1/6] remoteproc: imx_rproc: correct ddr alias for i.MX8M

2024-07-19 Thread Peng Fan
> Subject: Re: [PATCH 1/6] remoteproc: imx_rproc: correct ddr alias for > i.MX8M > > Good morning, > > On Fri, Jul 12, 2024 at 04:34:54PM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > The DDR Alias address should be 0x4000 according to RM

RE: [PATCH 3/6] remoteproc: imx_rproc: initialize workqueue earlier

2024-07-19 Thread Peng Fan
> Subject: Re: [PATCH 3/6] remoteproc: imx_rproc: initialize workqueue > earlier > > On Fri, Jul 12, 2024 at 04:34:56PM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > Initialize workqueue before requesting mailbox channel, otherwise if > > mailbox in

RE: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off for i.MX7ULP

2024-07-30 Thread Peng Fan
> Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off > for i.MX7ULP > > On Fri, Jul 19, 2024 at 04:49:04PM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > The i.MX7ULP Cortex-A7 is under control of Cortex-M4. The > i.MX7ULP > > L

RE: [PATCH] remoteproc: Use of_property_present()

2024-07-31 Thread Peng Fan
ers/remoteproc/xlnx_r5_remoteproc.c | 6 +++--- > 3 files changed, 5 insertions(+), 5 deletions(-) For i.MX: Acked-by: Peng Fan

RE: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off for i.MX7ULP

2024-08-01 Thread Peng Fan
> Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off > for i.MX7ULP > > On Tue, Jul 30, 2024 at 08:06:22AM +0000, Peng Fan wrote: > > > Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system > off > > > for i.MX7ULP > > > >

RE: [PATCH 6/6] remoteproc: imx_rproc: handle system off for i.MX7ULP

2024-08-07 Thread Peng Fan
> Subject: Re: [PATCH 6/6] remoteproc: imx_rproc: handle system off for > i.MX7ULP > > On Fri, Jul 12, 2024 at 04:34:59PM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > The i.MX7ULP Cortex-A7 is under control of Cortex-M4. The > i.MX7ULP > > L

RE: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off for i.MX7ULP

2024-08-14 Thread Peng Fan
> Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off > for i.MX7ULP > > On Fri, Aug 02, 2024 at 04:59:45AM +0000, Peng Fan wrote: > > > Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system > off > > > for i.MX7ULP > > > >

[PATCH V10 00/10] remoteproc: imx_rproc: support iMX8MQ/M

2021-02-15 Thread peng . fan
From: Peng Fan V11: Per Rob's comments, fix memory-region in patch 1/10 Rebased on top of Linux-next V10: Per Rob's comments, fix patch 1/10 V9: Per Mathieu's comments, update the tile of yaml in patch 2/10 update the Kconfig and MODULE_DESCRIPTION, I merge this chang

[PATCH V10 02/10] dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support

2021-02-15 Thread peng . fan
From: Peng Fan Add i.MX8MQ/M support, also include mailbox for rpmsg/virtio usage. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml| 51 ++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl

[PATCH V10 03/10] remoteproc: introduce is_iomem to rproc_mem_entry

2021-02-15 Thread peng . fan
From: Peng Fan Introduce is_iomem to indicate this piece memory is iomem or not. Reviewed-by: Bjorn Andersson Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- include/linux/remoteproc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/remoteproc.h b/include/linux

[PATCH V10 04/10] remoteproc: add is_iomem to da_to_va

2021-02-15 Thread peng . fan
From: Peng Fan Introduce an extra parameter is_iomem to da_to_va, then the caller could take the memory as normal memory or io mapped memory. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Reported-by: kernel test robot Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c

[PATCH V10 01/10] dt-bindings: remoteproc: convert imx rproc bindings to json-schema

2021-02-15 Thread peng . fan
From: Peng Fan Convert the imx rproc binding to DT schema format using json-schema. Signed-off-by: Peng Fan --- .../bindings/remoteproc/fsl,imx-rproc.yaml| 60 +++ .../bindings/remoteproc/imx-rproc.txt | 33 -- 2 files changed, 60 insertions(+), 33

[PATCH V10 06/10] remoteproc: imx_rproc: use devm_ioremap

2021-02-15 Thread peng . fan
From: 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 Reviewed-by

[PATCH V10 07/10] remoteproc: imx_rproc: add i.MX specific parse fw hook

2021-02-15 Thread peng . fan
From: 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 Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 93 ++ 1 file

[PATCH V10 05/10] remoteproc: imx_rproc: correct err message

2021-02-15 Thread peng . fan
From: Peng Fan It is using devm_ioremap, so not devm_ioremap_resource. Correct the error message and print out sa/size. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH V10 09/10] remoteproc: imx_rproc: ignore mapping vdev regions

2021-02-15 Thread peng . fan
From: Peng Fan vdev regions are vdev0vring0, vdev0vring1, vdevbuffer and similar. They are handled by remoteproc common code, no need to map in imx rproc driver. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 3 +++ 1 file changed, 3 insertions

[PATCH V10 08/10] remoteproc: imx_rproc: support i.MX8MQ/M

2021-02-15 Thread peng . fan
From: Peng Fan Add i.MX8MQ dev/sys addr map and configuration data structure i.MX8MM share i.MX8MQ settings. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/Kconfig | 6 ++--- drivers/remoteproc/imx_rproc.c | 41

[PATCH V10 10/10] remoteproc: imx_proc: enable virtio/mailbox

2021-02-15 Thread peng . fan
From: Peng Fan Use virtio/mailbox to build connection between Remote Proccessors and Linux. Add work queue to handle incoming messages. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 116 - 1

[PATCH V3 0/4] remoteproc: imx_rproc: support remote cores booted early

2021-04-07 Thread peng . fan
From: Peng Fan V3: Add R-b tag Typo fix in Patch 3 Align the patch subject using remoteproc: imx_rproc: Update commit msg in Patch 4 V2: Patch [1,3]/4 is new Patch 4/4: Update commit message, drop unneeded code that already implemented by core This patchset is to support booted remote

[PATCH V3 2/4] remoteproc: imx_rproc: enlarge IMX7D_RPROC_MEM_MAX

2021-04-07 Thread peng . fan
From: Peng Fan 8 is not enough when we need more, such as resource table for remote cores that booted before Linux Kernel, so enlarge IMX7D_RPROC_MEM_MAX to 32. And also rename it to IMX_RPROC_MEM_MAX which make more sense. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers

[PATCH V3 1/4] remoteproc: imx_rproc: add missing of_node_put

2021-04-07 Thread peng . fan
From: Peng Fan After of_parse_phandle, we need of_node_put to decrease the refcount of the device_node. Reported-by: Mathieu Poirier Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier --- drivers/remoteproc/imx_rproc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

[PATCH V3 3/4] remoteproc: imx_rproc: move memory parsing to rproc_ops

2021-04-07 Thread peng . fan
From: Peng Fan Use the rproc_ops::prepare() hook for doing memory resources reallocation when reattaching a remote procesor. Suggested-by: Mathieu Poirier Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 8 +++- 1 file changed, 3 insertions(+), 5

[PATCH V3 4/4] remoteproc: imx_rproc: support remote cores booted before Linux Kernel

2021-04-07 Thread peng . fan
From: Peng Fan - When remote cores are kicked before Linux Kernel, we are not able to get resource table from the firmware elf file, so we need to add rsc_table to hold the resource table published by remote cores and imx_rproc_get_loaded_rsc_table is to get the resource table. - Per

[PATCH V3 0/8] remoteproc: imx_rproc: support i.MX7ULP/8MN/8MP

2021-04-07 Thread peng . fan
From: Peng Fan V3: Add A-b tag for Patch 1/2 Fix the checkpatch warning for Patch 6,8 V2: Patch 1/8, use fsl as vendor, typo fix Because patchset [1] has v2 version, patch 5,6,7,8 are adapted that change. This patchset is to support i.MX7ULP/8MN/8MP, also includes a patch to parse fsl

[PATCH V3 1/8] dt-bindings: remoteproc: imx_rproc: add fsl,auto-boot property

2021-04-07 Thread peng . fan
From: Peng Fan Add an optional property "fsl,auto-boot" to indicate remote processor auto boot. Signed-off-by: Peng Fan Acked-by: Rob Herring --- .../devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/

[PATCH V3 2/8] dt-bindings: remoteproc: imx_rproc: add i.MX7ULP support

2021-04-07 Thread peng . fan
From: Peng Fan Add i.MX7ULP compatible. We use i.MX7ULP dual mode and in which case i.MX7ULP A7 core runs under control of M4 core, M4 core starts by ROM and powers most serivces used by A7 core, so A7 core has no power to start and stop M4 core. So clocks and syscon are not required. Signed

[PATCH V3 4/8] remoteproc: imx_rproc: make clk optional

2021-04-07 Thread peng . fan
From: Peng Fan To i.MX7ULP, M4 is the master to control everything, so it not need clk from A7. Reviewed-by: Richard Zhu Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers

[PATCH V3 7/8] remoteproc: imx_rproc: support i.MX7ULP

2021-04-07 Thread peng . fan
From: Peng Fan i.MX7ULP A7 core runs under control of M4 core, M4 core starts by ROM and powers most serivces used by A7 core, so A7 core has no power to start and stop M4 core. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 25 ++--- 1 file changed, 22

[PATCH V3 5/8] remoteproc: imx_rproc: parse fsl,auto-boot

2021-04-07 Thread peng . fan
From: Peng Fan Parse fsl,auto-boot to indicate whether need remoteproc framework auto boot or not. When remote processor is booted before Linux Kernel up, do not parse fsl,auto-boot. So add an entry to store the working mode of remote processor. Currently only IMX_RPROC_NORMAL

[PATCH V3 8/8] remoteproc: imx_rproc: support i.MX8MN/P

2021-04-07 Thread peng . fan
From: Peng Fan Add i.MX8MN/P remote processor(Cortex-M7) support, we are using ARM SMCCC to start/stop M core, not using regmap interface. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 89 +++--- 1 file changed, 82 insertions(+), 7 deletions(-) diff

[PATCH V3 3/8] dt-bindings: remoteproc: imx_rproc: support i.MX8MN/P

2021-04-07 Thread peng . fan
From: Peng Fan Add i.MX8MN/P remote processor(Cortex-M7) compatible string Signed-off-by: Peng Fan Acked-by: Rob Herring --- Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl

[PATCH V3 6/8] remoteproc: imx_rproc: initial support for mutilple start/stop method

2021-04-07 Thread peng . fan
From: Peng Fan Add three methods IMX_RPROC_NONE(no need start/stop), IMX_RPROC_MMIO (start/stop through mmio) and IMX_RPROC_SMC(start/stop through ARM SMCCC). The current SoCs supported are all using IMX_RPROC_MMIO, add a restrict in probe that only SoCs using IMX_RPROC_MMIO needs syscon regmap

[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 --- drivers/staging/nvec/nvec_ps2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/st

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

2015-06-21 Thread Peng Fan
true, then dma_free_coherent trigger panic. After applying this patch, no panic and all work well, kernel log: " sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman sdhci-pltfm: SDHCI platform and OF driver helper mmc0: Unable to allocate ADMA buffers. F

[PATCH] regmap: debugfs: check pointer before access

2018-03-29 Thread Peng Fan
00906d728 [ 26.696342] x1 : 1000 x0 : 8008f72d2000 [ 26.701667] So add check here. When the driver pointer is NULL, return -EIO. Signed-off-by: Peng Fan --- drivers/base/regmap/regmap-debugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/base/regmap/regmap-debugfs.c

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

[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 --- 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 warning as comm

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 > Cc: Rafael J. Wysocki ; Fabio Estevam > ; Greg Kroah-Hartman > ; Linux Kernel Mailing List > ; Linux PM ; > dl-linux-imx > Subject: R

RE: [PATCH 01/12] percpu: update free path with correct new free region

2019-03-02 Thread Peng Fan
> pcpu_chunk *chunk, int bit_off, > pcpu_chunk_refresh_hint(chunk); > else > pcpu_chunk_update(chunk, pcpu_block_off_to_off(s_index, start), > - s_block->contig_hint); > + end - start); > } Reviewed-by: Peng Fan > > /** > -- > 2.17.1

RE: [PATCH 02/12] percpu: do not search past bitmap when allocating an area

2019-03-02 Thread Peng Fan
TS, > + pcpu_chunk_map_bits(chunk)); > bit_off = bitmap_find_next_zero_area(chunk->alloc_map, end, start, >alloc_bits, align_mask); > if (bit_off >= end) > -- From pcpu_alloc_area itself, I think this is corr

RE: [PATCH 03/12] percpu: introduce helper to determine if two regions overlap

2019-03-02 Thread Peng Fan
Hi Dennis, > -Original Message- > From: owner-linux...@kvack.org [mailto:owner-linux...@kvack.org] On > Behalf Of Dennis Zhou > Sent: 2019年2月28日 10:19 > To: Dennis Zhou ; Tejun Heo ; Christoph > Lameter > Cc: Vlad Buslov ; kernel-t...@fb.com; > linux...@kvack.org; linux-kernel@vger.kernel

RE: [PATCH 04/12] percpu: manage chunks based on contig_bits instead of free_bytes

2019-03-02 Thread Peng Fan
hunk->contig_bits > == 0) > return 0; > > - return pcpu_size_to_slot(chunk->free_bytes); > + return pcpu_size_to_slot(chunk->contig_bits * PCPU_MIN_ALLOC_SIZE); > } > > /* set the pointer to a chunk in a page struct */ Reviewed-by: Peng Fan Not

RE: [PATCH 05/12] percpu: relegate chunks unusable when failing small allocations

2019-03-02 Thread Peng Fan
off = pcpu_find_block_fit(chunk, bits, bit_align, > is_atomic); > - if (off < 0) > + if (off < 0) { > + if (slot < PCPU_SLOT_FAIL_THRESHOLD) > + pcpu_chunk_move(chunk, 0); > continue; > + } > > off = pcpu_alloc_area(chunk, bits, bit_align, off); > if (off >= 0) For the code: Reviewed-by: Peng Fan But I did not understand well why choose 32B? If there are more information, better put in commit log. Thanks, Peng. > -- > 2.17.1

RE: [PATCH 06/12] percpu: set PCPU_BITMAP_BLOCK_SIZE to PAGE_SIZE

2019-03-02 Thread Peng Fan
gt; chunk->nr_populated -= nr; > - chunk->nr_empty_pop_pages -= nr; > - pcpu_nr_empty_pop_pages -= nr; > pcpu_nr_populated -= nr; > + > + pcpu_update_empty_pages(chunk, -1 * nr); > } > > /* > @@ -1523,7 +1502,7 @@ static void __percpu *pcpu_alloc(size_t size, size_t > align, bool reserved, > err = "failed to populate"; > goto fail_unlock; > } > - pcpu_chunk_populated(chunk, rs, re, true); > + pcpu_chunk_populated(chunk, rs, re); > spin_unlock_irqrestore(&pcpu_lock, flags); > } > > @@ -1722,7 +1701,7 @@ static void pcpu_balance_workfn(struct > work_struct *work) > if (!ret) { > nr_to_pop -= nr; > spin_lock_irq(&pcpu_lock); > - pcpu_chunk_populated(chunk, rs, rs + nr, false); > + pcpu_chunk_populated(chunk, rs, rs + nr); > spin_unlock_irq(&pcpu_lock); > } else { > nr_to_pop = 0; > -- Reviewed-by: Peng Fan > 2.17.1

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

2019-03-02 Thread Peng Fan
x - s_index - 1); > for (block = s_block + 1; block < e_block; block++) { > + block->scan_hint = 0; > block->contig_hint = 0; > block->left_free = 0; > block->right_free = 0; > @@ -873,6 +958,7 @@ static void pcpu_block_update_hint_free(struct > pcpu_chunk *chunk, int bit_off, > nr_empty_pages += (e_index - s_index - 1); > for (block = s_block + 1; block < e_block; block++) { > block->first_free = 0; > + block->scan_hint = 0; > block->contig_hint_start = 0; > block->contig_hint = PCPU_BITMAP_BLOCK_BITS; > block->left_free = PCPU_BITMAP_BLOCK_BITS; @@ -1084,6 > +1170,7 @@ static void pcpu_init_md_blocks(struct pcpu_chunk *chunk) > for (md_block = chunk->md_blocks; >md_block != chunk->md_blocks + pcpu_chunk_nr_blocks(chunk); >md_block++) { > + md_block->scan_hint = 0; > md_block->contig_hint = PCPU_BITMAP_BLOCK_BITS; > md_block->left_free = PCPU_BITMAP_BLOCK_BITS; > md_block->right_free = PCPU_BITMAP_BLOCK_BITS; Reviewed-by: Peng Fan > -- > 2.17.1

RE: [PATCH 10/12] percpu: make pcpu_block_md generic

2019-03-02 Thread Peng Fan
for (md_block = chunk->md_blocks; >md_block != chunk->md_blocks + pcpu_chunk_nr_blocks(chunk); > - md_block++) { > - md_block->scan_hint = 0; > - md_block->contig_hint = PCPU_BITMAP_BLOCK_BITS; > - md_block->left_free = PCPU_BITMAP_BLOCK_BITS; > - md_block->right_free = PCPU_BITMAP_BLOCK_BITS; > - } > + md_block++) > + pcpu_init_md_block(md_block, PCPU_BITMAP_BLOCK_BITS); > } Reviewed-by: Peng Fan > > /** > -- > 2.17.1

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

2019-03-03 Thread Peng Fan
md->first_free = min(chunk_md->first_free, bit_off); > > pcpu_block_update_hint_free(chunk, bit_off, bits); > > @@ -1285,6 +1270,9 @@ static void pcpu_init_md_blocks(struct pcpu_chunk > *chunk) { > struct pcpu_block_md *md_block; > > + /* init the chu

RE: [PATCH 12/12] percpu: use chunk scan_hint to skip some scanning

2019-03-03 Thread Peng Fan
hunk_md, > pcpu_block_off_to_off(s_index, start), @@ > -1078,7 > +1096,7 @@ static int pcpu_find_block_fit(struct pcpu_chunk *chunk, int > alloc_bits, > if (bit_off + alloc_bits > chunk_md->contig_hint) > return -1; > > - bit_off = chunk_md->first_free; > + bit_off = pcpu_next_hint(chunk_md, alloc_bits); > bits = 0; > pcpu_for_each_fit_region(chunk, alloc_bits, align, bit_off, bits) { > if (!pop_only || pcpu_is_populated(chunk, bit_off, bits, Reviewed-by: Peng Fan > -- > 2.17.1

RE: [PATCH 02/12] percpu: do not search past bitmap when allocating an area

2019-03-03 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月3日 6:24 > 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 02/12] pe

RE: [PATCH 04/12] percpu: manage chunks based on contig_bits instead of free_bytes

2019-03-03 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年3月3日 6:32 > 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 04/12] per

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

2019-03-03 Thread Peng Fan
> -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年2月28日 0:41 > To: Peng Fan > Cc: Dennis Zhou ; Christopher Lameter ; > t...@kernel.org; linux...@kvack.org; linux-kernel@vger.kernel.org; > van.free...@gmail.com > Subject: Re: [PATCH

[RFC] mmc: cqhci: clear pending interrupt and halt

2019-04-15 Thread Peng Fan
: sdhci: ADMA Err: 0x | ADMA Ptr: 0x Signed-off-by: Peng Fan --- drivers/mmc/host/cqhci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/cqhci.c b/drivers/mmc/host/cqhci.c index d59cb0a51964..4f41960ac7ad 100644 --- a/drivers/mmc/host/cqhci.c +++ b/drivers

Re: [RFC] mmc: cqhci: clear pending interrupt and halt

2019-04-16 Thread Peng Fan
Hi Adrian, > > On 16/04/19 9:48 AM, Peng Fan wrote: > > On i.MX8MM, we are running Dual Linux OS, with 1st Linux using SD Card > > as rootfs storage, 2nd Linux using eMMC as rootfs storage. We let the > > the 1st linux configure power/clock for the 2nd Linux. >

[PATCH] clk: imx: pll14xx: drop unused variable

2019-04-25 Thread Peng Fan
It does not make sense to only get value from pll->base and assign to a local variable when recalc_rate. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-pll14xx.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/

[PATCH 1/2] ARM: imx: drop uneccessary of_platform_default_populate

2019-03-13 Thread Peng Fan
"arch_initcall_sync(of_platform_default_populate_init);" could be used to populate the device tree, there is no need to call of_platform_default_populate in machine code. Tested on i.MX6Q-SDB i.MX6SL-EVK i.MX6UL-EVK board. Signed-off-by: Peng Fan --- arch/arm/mach-imx/mach-im

[PATCH 2/2] ARM: imx: mach-imx7ulp: warn when imx_soc_device_init fail

2019-03-13 Thread Peng Fan
Follow other i.MX6/7 machince code to check return value of imx_soc_device_init and warn when fail. Also drop of_platform_default_populate, because "arch_initcall_sync(of_platform_default_populate_init);" could be used to populate the device tree. Signed-off-by: Peng Fan --- arch/ar

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

2019-03-13 Thread Peng Fan
Currently lsio_mu1 is used by Linux Kernel with mbox-cells as 2, but actually mu0-4 could be used to communicate with SCU. So fix the mbox-cells. Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch

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

2019-03-13 Thread Peng Fan
Add lsio_mu2 node which could be used communicate with SCU. Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index

RE: [PATCH 1/2] ARM: imx: drop uneccessary of_platform_default_populate

2019-03-15 Thread Peng Fan
Hi Aisheng, > -Original Message- > From: Aisheng Dong > Sent: 2019年3月15日 18:17 > To: Peng Fan ; shawn...@kernel.org; > s.ha...@pengutronix.de; ker...@pengutronix.de; feste...@gmail.com; > dl-linux-imx ; Anson Huang ; > a...@arndb.de; linux-arm-ker...@lists.infradea

RE: [PATCH 2/2] ARM: imx: mach-imx7ulp: warn when imx_soc_device_init fail

2019-03-15 Thread Peng Fan
> -Original Message- > From: Aisheng Dong > Sent: 2019年3月15日 18:22 > To: Peng Fan ; shawn...@kernel.org; > s.ha...@pengutronix.de; ker...@pengutronix.de; feste...@gmail.com; > dl-linux-imx ; Anson Huang ; > a...@arndb.de; linux-arm-ker...@lists.infradea

[PATCH] mm: __pagevec_lru_add_fn: typo fix

2019-04-02 Thread Peng Fan
There is no function named munlock_vma_pages, correct it to munlock_vma_page. Signed-off-by: Peng Fan --- mm/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swap.c b/mm/swap.c index 301ed4e04320..3a75722e68a9 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -867,7 +867,7

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

2019-02-25 Thread Peng Fan
Hi Dennis, > -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年2月25日 23:14 > To: Peng Fan > Cc: den...@kernel.org; t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [

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

2019-02-25 Thread Peng Fan
Hi Dennis, > -Original Message- > From: den...@kernel.org [mailto:den...@kernel.org] > Sent: 2019年2月25日 23:16 > 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] p

RE: [RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-25 Thread Peng Fan
Hi Dennis, > -Original Message- > From: den...@kernel.org [mailto:den...@kernel.org] > Sent: 2019年2月25日 23:24 > To: Peng Fan > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [

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

2019-02-27 Thread Peng Fan
Hi Dennis > -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年2月27日 1:04 > To: Christopher Lameter > Cc: Peng Fan ; t...@kernel.org; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [PATCH 1/2] p

RE: [RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-27 Thread Peng Fan
Hi Dennis, > -Original Message- > From: Dennis Zhou [mailto:den...@kernel.org] > Sent: 2019年2月27日 1:33 > To: Peng Fan > Cc: den...@kernel.org; t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [

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

2019-02-27 Thread Peng Fan
as a memblock_alloc() implementation detail. It is, however, tolerant to memblock_free() being called on a sub-range or just a different range from a previous memblock_alloc(). So the original patch looks fine to me. FWIW: Signed-off-by: Peng Fan Reviewed-by: Catalin Marinas --- V2: Per Mike's com

RE: [PATCH V10 01/10] dt-bindings: remoteproc: convert imx rproc bindings to json-schema

2021-02-13 Thread Peng Fan
> Subject: Re: [PATCH V10 01/10] dt-bindings: remoteproc: convert imx rproc > bindings to json-schema > > On Mon, Feb 08, 2021 at 04:56:02PM +0800, peng@oss.nxp.com wrote: > > From: Peng Fan > > > > Convert the imx rproc binding to DT schema format using json

[PATCH V3 0/5] imx esdhc dt/driver update

2021-02-24 Thread peng . fan
From: Peng Fan V3: Patch 1, drop unneeded pinctrl-0/1/2 Patch 2 is new to avoid break dt bindings check V2: patch 1, 2, 3 is new patch 4 is not changed https://patchwork.kernel.org/project/linux-arm-kernel/cover/1611198593-16287-1-git-send-email-peng@nxp.com/ Peng Fan (5): dt

[PATCH V3 5/5] mmc: sdhci-esdhc-imx: validate pinctrl before use it

2021-02-24 Thread peng . fan
From: Peng Fan When imx_data->pinctrl is not a valid pointer, pinctrl_lookup_state will trigger kernel panic. When we boot Dual OS on Jailhouse hypervisor, we let the 1st Linux to configure pinmux ready for the 2nd OS, so the 2nd OS not have pinctrl settings. Similar to this com

[PATCH V3 1/5] dt-bindings: mmc: fsl-imx-esdhc: add pinctrl bindings

2021-02-24 Thread peng . fan
From: Peng Fan Add pinctrl bindings for fsl-imx-esdhc yaml Signed-off-by: Peng Fan --- Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree

[PATCH V3 2/5] dt-bindings: clock: imx8qxp-lpcg: correct the example clock-names

2021-02-24 Thread peng . fan
From: Peng Fan Align with all other i.MX using the mmc controller, align the clock-names. Signed-off-by: Peng Fan --- Documentation/devicetree/bindings/clock/imx8qxp-lpcg.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/clock

[PATCH V3 4/5] dt-bindings: mmc: fsl-imx-esdhc: add clock bindings

2021-02-24 Thread peng . fan
From: Peng Fan Add clock bindings for fsl-imx-esdhc yaml Signed-off-by: Peng Fan --- .../devicetree/bindings/mmc/fsl-imx-esdhc.yaml| 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree

  1   2   3   4   5   6   7   8   9   >