Re: [PATCH 04/32] MAINTAINERS: update fsl,dpaa2-console.yaml reference

2021-04-01 Thread Laurentiu Tudor
fsl,dpaa2-console.yaml. > > Update its cross-reference accordingly. > > Fixes: 616fde2dd60f ("dt-bindings: misc: convert fsl,dpaa2-console from txt > to YAML") > Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Laurentiu Tudor --- Best Regards, Laurentiu > --- >

Re: [PATCH 0/3] bus: fsl-mc: minor updates

2021-02-08 Thread Laurentiu Tudor
+- > 2 files changed, 57 insertions(+), 1 deletion(-) > For the series: Acked-by: Laurentiu Tudor --- Best Regards, Laurentiu

Re: [PATCH 0/5] bus: fsl-mc: add userspace support

2021-01-27 Thread Laurentiu Tudor
On 1/27/2021 4:02 PM, Greg KH wrote: > On Thu, Jan 14, 2021 at 07:07:47PM +0200, Ioana Ciornei wrote: >> From: Ioana Ciornei >> >> This patch set adds userspace support in the fsl-mc bus along with a >> rescan attribute to the root DPRC container. An earlier discussion on >> this functionality

Re: [PATCH 0/5] bus: fsl-mc: add userspace support

2021-01-27 Thread Laurentiu Tudor
files changed, 789 insertions(+), 12 deletions(-) > create mode 100644 Documentation/ABI/stable/sysfs-bus-fsl-mc > create mode 100644 drivers/bus/fsl-mc/fsl-mc-uapi.c > create mode 100644 include/uapi/linux/fsl_mc.h > For the series: Acked-by: Laurentiu Tudor --- Best Regards, Laurentiu

[PATCH] bus: fsl-mc: add missing __iomem attribute

2020-12-16 Thread laurentiu . tudor
From: Laurentiu Tudor This pointer to an i/o register block is missing the __iomem attribute, so add it. The issue was found by 0-day sparse run. Reported-by: kernel test robot Signed-off-by: Laurentiu Tudor --- drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] bus: fsl-mc: fix error return code in fsl_mc_object_allocate()

2020-12-04 Thread Laurentiu Tudor
t > Signed-off-by: Zhang Changzhong Acked-by: Laurentiu Tudor --- Best Regards, Laurentiu > --- > drivers/bus/fsl-mc/fsl-mc-allocator.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c > b/drivers/bus/fsl-

Re: [PATCH] iommu: arm-smmu-impl: add NXP hook to preserve bootmappings

2020-12-02 Thread Laurentiu Tudor
Hi Robin, Sorry for the late reply, we had a few days of over here. Comments inline. On 11/25/2020 8:10 PM, Robin Murphy wrote: > On 2020-11-25 15:50, laurentiu.tu...@nxp.com wrote: >> From: Laurentiu Tudor >> >> Add a NXP specific hook to preserve SMMU mappings present at

[PATCH] iommu: arm-smmu-impl: add NXP hook to preserve bootmappings

2020-11-25 Thread laurentiu . tudor
From: Laurentiu Tudor Add a NXP specific hook to preserve SMMU mappings present at boot time (created by the boot loader). These are needed for MC firmware present on some NXP chips to continue working across kernel boot and SMMU initialization. Signed-off-by: Laurentiu Tudor --- drivers

[PATCH] bus: fsl-mc: added missing fields to dprc_rsp_get_obj_region structure

2020-11-24 Thread laurentiu . tudor
From: Laurentiu Tudor 'type' and 'flags' fields were missing from dprc_rsp_get_obj_region structure therefore the MC Bus driver was not receiving proper flags from MC like DPRC_REGION_CACHEABLE. Signed-off-by: Cristian Sovaiala Signed-off-by: Laurentiu Tudor --- drivers/bus/fsl-mc/dprc.c

[PATCH v4] dt-bindings: misc: convert fsl,qoriq-mc from txt to YAML

2020-11-23 Thread Laurentiu Tudor
ixes in schema] Signed-off-by: Laurentiu Tudor --- Changes in v4: - use $ref to point to fsl,qoriq-mc-dpmac binding Changes in v3: - dropped duplicated "fsl,qoriq-mc-dpmac" schema and replaced with reference to it - fixed a dt_binding_check warning Changes in v2: - fixed e

[PATCH v3] dt-bindings: misc: convert fsl,qoriq-mc from txt to YAML

2020-11-12 Thread Laurentiu Tudor
ixes in schema] Signed-off-by: Laurentiu Tudor --- Changes in v3: - dropped duplicated "fsl,qoriq-mc-dpmac" schema and replaced with reference to it - fixed a dt_binding_check warning Changes in v2: - fixed errors reported by yamllint - dropped multiple unnecessary quotes - used

Re: [PATCH v2 2/2] dt-bindings: misc: convert fsl, qoriq-mc from txt to YAML

2020-11-10 Thread Laurentiu Tudor
On 11/10/2020 7:20 PM, Rob Herring wrote: > On Mon, Nov 9, 2020 at 4:11 PM Rob Herring wrote: >> >> On Mon, 09 Nov 2020 12:46:35 +0200, Laurentiu Tudor wrote: >>> From: Ionut-robert Aron >>> >>> Convert fsl,qoriq-mc to YAML in order to automate

[PATCH v2 2/2] dt-bindings: misc: convert fsl,qoriq-mc from txt to YAML

2020-11-09 Thread Laurentiu Tudor
ixes in schema] Signed-off-by: Laurentiu Tudor --- Changes in v2: - fixed errors reported by yamllint - dropped multiple unnecessary quotes - used schema instead of text in description - added constraints on dpmac reg property .../devicetree/bindings/misc/fsl,qoriq-mc.txt |

[PATCH v2 1/2] dt-bindings: misc: convert fsl,dpaa2-console from txt to YAML

2020-11-09 Thread Laurentiu Tudor
From: Ionut-robert Aron Convert fsl,dpaa2-console to YAML in order to automate the verification process of dts files. Signed-off-by: Ionut-robert Aron Signed-off-by: Laurentiu Tudor --- Changes in v2: - add missing additionalProperties .../bindings/misc/fsl,dpaa2-console.txt | 11

Re: [PATCH 2/2] dt-bindings: misc: convert fsl,qoriq-mc from txt to YAML

2020-11-05 Thread Laurentiu Tudor
Hi Rob, On 11/5/2020 9:17 PM, Rob Herring wrote: > On Thu, Nov 05, 2020 at 04:11:14PM +0200, Laurentiu Tudor wrote: >> From: Ionut-robert Aron >> >> Convert fsl,qoriq-mc to YAML in order to automate the verification >> process of dts files. In addition, upd

[PATCH 2/2] bus: fsl-mc: make sure MC firmware is up and running

2020-11-05 Thread Laurentiu Tudor
, a comment fix on how PL and BMT bits are packed in the StreamID. Signed-off-by: Laurentiu Tudor --- drivers/bus/fsl-mc/fsl-mc-bus.c | 42 +++-- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c

[PATCH 1/2] bus: fsl-mc: add back accidentally dropped error check

2020-11-05 Thread Laurentiu Tudor
A previous patch accidentally dropped an error check, so add it back. Fixes: aef85b56c3c1 ("bus: fsl-mc: MC control registers are not always available") Signed-off-by: Laurentiu Tudor --- drivers/bus/fsl-mc/fsl-mc-bus.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH 1/2] dt-bindings: misc: convert fsl,dpaa2-console from txt to YAML

2020-11-05 Thread Laurentiu Tudor
From: Ionut-robert Aron Convert fsl,dpaa2-console to YAML in order to automate the verification process of dts files. Signed-off-by: Ionut-robert Aron Signed-off-by: Laurentiu Tudor --- .../bindings/misc/fsl,dpaa2-console.txt | 11 - .../bindings/misc/fsl,dpaa2-console.yaml

[PATCH 2/2] dt-bindings: misc: convert fsl,qoriq-mc from txt to YAML

2020-11-05 Thread Laurentiu Tudor
ixes in schema] Signed-off-by: Laurentiu Tudor --- .../devicetree/bindings/misc/fsl,qoriq-mc.txt | 196 .../bindings/misc/fsl,qoriq-mc.yaml | 218 ++ .../ethernet/freescale/dpaa2/overview.rst | 5 +- MAINTAINERS |

Re: [PATCH] soc: fsl: dpio: Change 'cpumask_t mask' to global variable

2020-10-14 Thread Laurentiu Tudor
Hi, Thanks for finding this. Comment inline. On 10/14/2020 10:27 AM, Yi Wang wrote: > From: Hao Si > > The local variable 'cpumask_t mask' is in the stack memory, and its address > is assigned to 'desc->affinity' in 'irq_set_affinity_hint()'. > But the memory area where this variable is

Re: [PATCH v5 00/13] bus/fsl-mc: Extend mc-bus driver functionalities in preparation for mc-bus VFIO support

2020-10-02 Thread Laurentiu Tudor
Hi Greg, On 10/2/2020 4:55 PM, Greg KH wrote: > On Tue, Sep 29, 2020 at 02:06:41PM +0300, Laurentiu Tudor wrote: >> >> >> On 9/29/2020 11:54 AM, Diana Craciun wrote: >>> The vfio-mc bus driver needs some additional services to be exported by the >>> m

Re: [PATCH v5 00/13] bus/fsl-mc: Extend mc-bus driver functionalities in preparation for mc-bus VFIO support

2020-09-29 Thread Laurentiu Tudor
drivers/bus/fsl-mc/fsl-mc-allocator.c | 12 +- > drivers/bus/fsl-mc/fsl-mc-bus.c | 64 - > drivers/bus/fsl-mc/fsl-mc-private.h | 31 ++--- > drivers/bus/fsl-mc/mc-io.c | 7 +- > include/linux/fsl/mc.h| 41 +- > 7 files changed, 359 insertions(+), 127 deletions(-) > For the series: Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor --- Best Regards, Laurentiu

[PATCH v2 2/2] bus: fsl-mc: MC control registers are not always available

2020-09-16 Thread Laurentiu Tudor
As per the device tree binding, in certain scenarios such as virtualization scenarios, the MC control registers are not available so don't error out if they are not present. Signed-off-by: Laurentiu Tudor --- Changes in v2: - dropped useless NULL check - restore IS_ERR() usage drivers/bus

[PATCH v2 1/2] bus: fsl-mc: don't assume an iommu is always present

2020-09-16 Thread Laurentiu Tudor
There are certain scenarios where an iommu is not present, e.g. booting in a VM. Let's support these scenarios by dropping the check. Signed-off-by: Laurentiu Tudor --- Changes in v2: - none drivers/bus/fsl-mc/fsl-mc-bus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/bus/fsl

Re: [PATCH v3 0/8] iommu/arm-smmu: Support maintaining bootloader mappings

2020-09-16 Thread Laurentiu Tudor
--- > drivers/iommu/arm/arm-smmu/arm-smmu.h | 14 ++- > 3 files changed, 205 insertions(+), 42 deletions(-) > Tested on a NXP LX2160A with John's tree [1] and below diff [2], so for the whole series: Tested-by: Laurentiu Tudor [1] https://git.linaro.org/people/john.stultz/androi

[PATCH 1/2] bus: fsl-mc: don't assume an iommu is always present

2020-09-14 Thread Laurentiu Tudor
There are certain scenarios where an iommu is not present, e.g. booting in a VM. Let's support these scenarios by dropping the check. Signed-off-by: Laurentiu Tudor --- drivers/bus/fsl-mc/fsl-mc-bus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b

[PATCH 2/2] bus: fsl-mc: MC control registers are not always available

2020-09-14 Thread Laurentiu Tudor
As per the device tree binding, in certain scenarios such as virtualization scenarios, the MC control registers are not available so don't error out if they are not present. Signed-off-by: Laurentiu Tudor --- drivers/bus/fsl-mc/fsl-mc-bus.c | 8 1 file changed, 4 insertions(+), 4

Re: [PATCH v4 00/13] bus/fsl-mc: Extend mc-bus driver functionalities in preparation for mc-bus VFIO support

2020-09-11 Thread Laurentiu Tudor
rs/bus/fsl-mc/fsl-mc-bus.c | 64 +- > drivers/bus/fsl-mc/fsl-mc-private.h | 31 ++--- > drivers/bus/fsl-mc/mc-io.c | 7 +- > include/linux/fsl/mc.h| 41 +- > 7 files changed, 349 insertions(+), 122 deletions(-) > For the series: Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor --- Best Regards, Laurentiu

Re: [PATCH v3 0/8] iommu/arm-smmu: Support maintaining bootloader mappings

2020-09-09 Thread Laurentiu Tudor
Hi Bjorn, On 9/4/2020 6:55 PM, Bjorn Andersson wrote: > Based on previous attempts and discussions this is the latest attempt at > inheriting stream mappings set up by the bootloader, for e.g. boot splash or > efifb. > > Per Will's request this builds on the work by Jordan and Rob for the Adreno

[PATCH] bus: fsl-mc: add missing __iomem attribute

2020-07-30 Thread Laurentiu Tudor
This pointer to an i/o register block is missing the __iomem attribute, so add it. The issue was found with sparse. Reported-by: kernel test robot Signed-off-by: Laurentiu Tudor --- drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus

Re: [PATCH 5/5] iommu/arm-smmu: Setup identity domain for boot mappings

2020-07-28 Thread Laurentiu Tudor
On 7/9/2020 10:57 PM, Bjorn Andersson wrote: > On Thu 09 Jul 08:50 PDT 2020, Laurentiu Tudor wrote: > >> >> >> On 7/9/2020 8:01 AM, Bjorn Andersson wrote: >>> With many Qualcomm platforms not having functional S2CR BYPASS a >>> temporary IOMMU domain,

Re: [PATCH 0/3] bus: fsl-mc: scattered updates

2020-07-20 Thread Laurentiu Tudor
dded objects on the fsl-mc bus is changed so that allocatable > objects are probed at first since they are being used by any other > driver. > > Grigore Popescu (1): > bus: fsl-mc: probe the allocatable objects first > > Ioana Ciornei (1): > bus: fsl-mc: add missing device typ

Re: [PATCH v3] bus: fsl-mc: fix invalid free in fsl_mc_device_add

2020-07-10 Thread Laurentiu Tudor
* Which means we have to check the pointer before freeing it. > + * Do not remove this check. > + */ > + if (mc_bus) > + kfree(mc_bus); > + else > + kfree(mc_dev); > > return error; > } > Thanks, Tom! Reviewed-by: Laurentiu Tudor --- Best Regards, Laurentiu

Re: [PATCH 5/5] iommu/arm-smmu: Setup identity domain for boot mappings

2020-07-09 Thread Laurentiu Tudor
ased on prior work by Thierry Reding and Laurentiu Tudor. > > Signed-off-by: Bjorn Andersson > --- > drivers/iommu/arm-smmu-qcom.c | 11 + > drivers/iommu/arm-smmu.c | 80 +-- > drivers/iommu/arm-smmu.h | 3 ++ > 3 files changed, 90 insertio

Re: [PATCH v3 13/13] bus/fsl-mc: Add a new version for dprc_get_obj_region command

2020-07-06 Thread Laurentiu Tudor
On 7/6/2020 3:42 PM, Diana Craciun wrote: > From: Diana Craciun > > The region size reported by the firmware for mc and software > portals was less than allocated by the hardware. This may be > problematic when mmapping the region in user space because the > region size is less than page

Re: [PATCH v2 00/12] bus/fsl-mc: Extend mc-bus driver functionalities in preparation for mc-bus VFIO support

2020-05-13 Thread Laurentiu Tudor
| 103 +-- > drivers/bus/fsl-mc/fsl-mc-allocator.c | 12 +- > drivers/bus/fsl-mc/fsl-mc-bus.c | 64 - > drivers/bus/fsl-mc/fsl-mc-private.h | 28 ++-- > drivers/bus/fsl-mc/mc-io.c| 7 +- > include/linux/fsl/mc.h| 29 - > 7 files changed, 313 insertions(+), 111 deletions(-) > For the whole series: Reviewed-by: Laurentiu Tudor --- Best Regards, Laurentiu

Re: [RFC PATCH 1/3] dma-mapping: introduce a new dma api dma_addr_to_phys_addr()

2019-10-22 Thread Laurentiu Tudor
On 22.10.2019 16:25, Robin Murphy wrote: > On 22/10/2019 13:55, Laurentiu Tudor wrote: >> From: Laurentiu Tudor >> >> Introduce a new dma map op called dma_addr_to_phys_addr() that converts >> a dma address to the physical address backing it up and add wrapper for

Re: [PATCH 19/20] dpaa_eth: add dpaa_dma_to_virt()

2019-10-09 Thread Laurentiu Tudor
On 09.10.2019 10:39, Christoph Hellwig wrote: > On Tue, Oct 08, 2019 at 03:10:40PM +0300, Madalin Bucur wrote: >> Centralize the phys_to_virt() calls. > > You don't need to centralize those, you need to fix them. Calling > phys_to_virt on a dma_addr is completely bogus. > Yeah, that's on my

RE: [PATCH 1/3] bus: fsl-mc: remove explicit device_link_del

2019-08-16 Thread Laurentiu Tudor
Hi Leo, > -Original Message- > From: Li Yang > Sent: Friday, August 16, 2019 2:13 AM > To: Ioana Ciornei > Cc: Laurentiu Tudor ; Roy Pledge > ; lkml > Subject: Re: [PATCH 1/3] bus: fsl-mc: remove explicit device_link_del > Importance: High > > On Wed

RE: [PATCH v7 3/5] usb: host: ohci-sm501: init genalloc for local memory

2019-06-18 Thread Laurentiu Tudor
Hello, > -Original Message- > From: Guenter Roeck On Behalf Of Guenter Roeck > Sent: Thursday, June 13, 2019 9:06 PM > > On 6/13/19 8:34 AM, Fredrik Noring wrote: > > Hi Guenter, > > > >> Thanks for the confirmation. Do you see the problem only with the > >> ohci-sm501 driver or also

Re: [PATCH v7 0/5] prerequisites for device reserved local mem rework

2019-06-04 Thread Laurentiu Tudor
On 31.05.2019 19:43, Christoph Hellwig wrote: > On Wed, May 29, 2019 at 02:06:12PM +0000, Laurentiu Tudor wrote: >> Thanks, hope this time everything is fine. > > I've applied it to the dma-mapping tree now. > >> When you get the time, please let me know your ideas o

RE: [PATCH v7 0/5] prerequisites for device reserved local mem rework

2019-05-31 Thread Laurentiu Tudor
> -Original Message- > From: Christoph Hellwig > Sent: Friday, May 31, 2019 7:43 PM > > On Wed, May 29, 2019 at 02:06:12PM +0000, Laurentiu Tudor wrote: > > Thanks, hope this time everything is fine. > > I've applied it to the dma-mapping tree now. > >

Re: [PATCH v7 0/5] prerequisites for device reserved local mem rework

2019-05-29 Thread Laurentiu Tudor
Hi Christoph, On 29.05.2019 14:37, Christoph Hellwig wrote: > On Wed, May 29, 2019 at 04:34:27AM -0700, Greg KH wrote: >> Reviewed-by: Greg Kroah-Hartman >> >> Christoph, this is going through your tree, right? > > Yes, I'll pіck it up. > Thanks, hope this time everything is fine. When you

Re: [PATCH v7 2/5] USB: use genalloc for USB HCs with local memory

2019-05-29 Thread Laurentiu Tudor
On 29.05.2019 13:38, Greg KH wrote: > On Wed, May 29, 2019 at 01:28:40PM +0300, laurentiu.tu...@nxp.com wrote: >> From: Laurentiu Tudor >> >> For HCs that have local memory, replace the current DMA API usage >> with a genalloc generic allocator to manage the ma

[PATCH v7 1/5] lib/genalloc.c: Add gen_pool_dma_zalloc() for zeroed DMA allocations

2019-05-29 Thread laurentiu . tudor
From: Fredrik Noring gen_pool_dma_zalloc() is a zeroed memory variant of gen_pool_dma_alloc(). Document return values of both, and indicate NULL as a "%NULL" constant. Signed-off-by: Fredrik Noring Tested-by: Fredrik Noring --- include/linux/genalloc.h | 1 + lib/genalloc.c | 29

[PATCH v7 2/5] USB: use genalloc for USB HCs with local memory

2019-05-29 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. To help users, introduce a new HCD API, usb_hcd_setup_local_mem() that will setup up the genalloc backing up the device local memory

[PATCH v7 0/5] prerequisites for device reserved local mem rework

2019-05-29 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. Current implementation was relying

[PATCH v7 3/5] usb: host: ohci-sm501: init genalloc for local memory

2019-05-29 Thread laurentiu . tudor
From: Laurentiu Tudor In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. For co

[PATCH v7 5/5] USB: drop HCD_LOCAL_MEM flag

2019-05-29 Thread laurentiu . tudor
From: Laurentiu Tudor With the addition of the local memory allocator, the HCD_LOCAL_MEM flag can be dropped and the checks against it replaced with a check for the localmem_pool ptr being initialized. Signed-off-by: Laurentiu Tudor Tested-by: Fredrik Noring --- drivers/usb/core/buffer.c

[PATCH v7 4/5] usb: host: ohci-tmio: init genalloc for local memory

2019-05-29 Thread laurentiu . tudor
From: Laurentiu Tudor In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. For co

[PATCH v6 4/5] usb: host: ohci-tmio: init genalloc for local memory

2019-05-22 Thread laurentiu . tudor
From: Laurentiu Tudor In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. For co

[PATCH v6 5/5] USB: drop HCD_LOCAL_MEM flag

2019-05-22 Thread laurentiu . tudor
From: Laurentiu Tudor With the addition of the local memory allocator, the HCD_LOCAL_MEM flag can be dropped and the checks against it replaced with a check for the localmem_pool ptr being initialized. Signed-off-by: Laurentiu Tudor Tested-by: Fredrik Noring --- drivers/usb/core/buffer.c

[PATCH v6 0/5] prerequisites for device reserved local mem rework

2019-05-22 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. Current implementation was relying

[PATCH v6 1/5] lib/genalloc.c: Add gen_pool_dma_zalloc() for zeroed DMA allocations

2019-05-22 Thread laurentiu . tudor
From: Fredrik Noring gen_pool_dma_zalloc() is a zeroed memory variant of gen_pool_dma_alloc(). Document return values of both, and indicate NULL as a "%NULL" constant. Signed-off-by: Fredrik Noring Tested-by: Fredrik Noring --- include/linux/genalloc.h | 1 + lib/genalloc.c | 29

[PATCH v6 2/5] USB: use genalloc for USB HCs with local memory

2019-05-22 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. To help users, introduce a new HCD API, usb_hcd_setup_local_mem() that will setup up the genalloc backing up the device local memory

[PATCH v6 3/5] usb: host: ohci-sm501: init genalloc for local memory

2019-05-22 Thread laurentiu . tudor
From: Laurentiu Tudor In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. For co

Re: [PATCH v5 2/5] USB: use genalloc for USB HCs with local memory

2019-05-22 Thread Laurentiu Tudor
On 21.05.2019 18:27, Fredrik Noring wrote: > Thanks Laurentiu! > >> --- a/include/linux/usb/hcd.h >> +++ b/include/linux/usb/hcd.h >> @@ -216,6 +216,9 @@ struct usb_hcd { >> #defineHC_IS_RUNNING(state) ((state) & __ACTIVE) >> #defineHC_IS_SUSPENDED(state) ((state) & __SUSPEND) >>

Re: [PATCH v5 2/5] USB: use genalloc for USB HCs with local memory

2019-05-22 Thread Laurentiu Tudor
Hello Alan, On 21.05.2019 20:20, Alan Stern wrote: > On Tue, 21 May 2019 laurentiu.tu...@nxp.com wrote: > >> From: Laurentiu Tudor >> >> For HCs that have local memory, replace the current DMA API usage >> with a genalloc generic allocator to manage the mappings

[PATCH v5 0/5] prerequisites for device reserved local mem rework

2019-05-21 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. Current implementation was relying

[PATCH v5 5/5] USB: drop HCD_LOCAL_MEM flag

2019-05-21 Thread laurentiu . tudor
From: Laurentiu Tudor With the addition of the local memory allocator, the HCD_LOCAL_MEM flag can be dropped and the checks against it replaced with a check for the localmem_pool ptr being initialized. Signed-off-by: Laurentiu Tudor --- drivers/usb/core/buffer.c | 8 +++- drivers

[PATCH v5 3/5] usb: host: ohci-sm501: init genalloc for local memory

2019-05-21 Thread laurentiu . tudor
From: Laurentiu Tudor In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. For co

[PATCH v5 2/5] USB: use genalloc for USB HCs with local memory

2019-05-21 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. To help users, introduce a new HCD API, usb_hcd_setup_local_mem() that will setup up the genalloc backing up the device local memory

[PATCH v5 4/5] usb: host: ohci-tmio: init genalloc for local memory

2019-05-21 Thread laurentiu . tudor
From: Laurentiu Tudor In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. For co

[PATCH v5 1/5] lib/genalloc.c: Add gen_pool_dma_zalloc() for zeroed DMA allocations

2019-05-21 Thread laurentiu . tudor
From: Fredrik Noring gen_pool_dma_zalloc() is a zeroed memory variant of gen_pool_dma_alloc(). Document return values of both, and indicate NULL as a "%NULL" constant. Signed-off-by: Fredrik Noring --- include/linux/genalloc.h | 1 + lib/genalloc.c | 29

Re: [PATCH v4 2/3] usb: host: ohci-sm501: init genalloc for local memory

2019-05-21 Thread Laurentiu Tudor
On 21.05.2019 13:39, Christoph Hellwig wrote: > On Thu, May 16, 2019 at 02:47:20PM +0300, laurentiu.tu...@nxp.com wrote: >> +hcd->localmem_pool = devm_gen_pool_create(dev, PAGE_SHIFT, >> + dev_to_node(dev), >> +

Re: [PATCH v4 1/3] USB: use genalloc for USB HCs with local memory

2019-05-21 Thread Laurentiu Tudor
On 21.05.2019 11:16, Greg KH wrote: > On Thu, May 16, 2019 at 02:47:19PM +0300, laurentiu.tu...@nxp.com wrote: >> From: Laurentiu Tudor >> >> For HCs that have local memory, replace the current DMA API usage >> with a genalloc generic allocator to manage the ma

Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem rework

2019-05-20 Thread Laurentiu Tudor
Hello Fredrik, On 17.05.2019 20:41, Fredrik Noring wrote: > Hi Laurentiu, > >>> that I tracked down to the calls >>> >>>hub_port_init >>> -> usb_control_msg >>> -> usb_internal_control_msg >>> -> usb_start_wait_urb >>> -> usb_submit_urb >>> -> usb_hcd_submit_urb >>>

Re: [GIT PULL] updates to soc/fsl drivers for v5.2

2019-05-17 Thread Laurentiu Tudor
robing status > > DPAA Qman driver > - Only make liodn fixup on powerpc SoCs with PAMU iommu > > Guts driver > - Add definition for LX2160a SoC > > > Ioana Ciornei (2): >Documentation: DT: Add entr

[PATCH v4 0/3] prerequisites for device reserved local mem rework

2019-05-16 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. Current implementation was relying

[PATCH v3 2/3] usb: host: ohci-sm501: init genalloc for local memory

2019-05-15 Thread laurentiu . tudor
From: Laurentiu Tudor In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. For co

[PATCH v3 0/3] prerequisites for device reserved local mem rework

2019-05-15 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. Current implementation was relying

[PATCH v3 1/3] USB: use genalloc for USB HCs with local memory

2019-05-15 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. Current implementation was relying

RE: [RFC PATCH 0/3] prerequisites for device reserved local mem rework

2019-05-10 Thread Laurentiu Tudor
Hi Robin, > -Original Message- > From: Robin Murphy > Sent: Friday, May 10, 2019 6:04 PM > > Hi Laurentiu, > > On 10/05/2019 15:56, wrote: > > From: Laurentiu Tudor > > > > For HCs that have local memory, replace the current DMA API usag

Re: [RFC PATCH] dma-mapping: create iommu mapping for newly allocated dma coherent mem

2019-04-25 Thread Laurentiu Tudor
Hi Christoph, On 24.04.2019 17:57, Christoph Hellwig wrote: > I'd be happy to offload all of the mentioned tasks to you if you > volunteer. Alright, I think I mostly got it and can start with the two usb drivers you mentioned. Just need a few clarifications, please see inline. > I think the

[PATCH v2] i2c: imx: don't leak the i2c adapter on error

2019-04-01 Thread laurentiu . tudor
From: Laurentiu Tudor Make sure to free the i2c adapter on the error exit path. Signed-off-by: Laurentiu Tudor Reviewed-by: Mukesh Ojha Reviewed-by: Uwe Kleine-Konig Fixes: e1ab9a468e3b ("i2c: imx: improve the error handling in i2c_imx_dma_request()") --- Changes in v2: - fixed

[PATCH] i2c: imx: don't leak the i2c adapter on error

2019-03-29 Thread laurentiu . tudor
From: Laurentiu Tudor Make sure to free the i2c adapter on the error exit path. Signed-off-by: Laurentiu Tudor --- drivers/i2c/busses/i2c-imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 42fed40198a0

Re: [RESEND] i2c: imx: defer probing on dma channel request

2019-03-28 Thread Laurentiu Tudor
Hi Leo, On 27.03.2019 20:47, Li Yang wrote: > On Wed, Mar 27, 2019 at 8:46 AM Laurentiu Tudor > wrote: >> >> Hello, >> >> Just FYI, I'm still seeing issues with the dma driver compiled _out_, >> trying to test i2c without dma support. I get the crash b

Re: [RESEND] i2c: imx: defer probing on dma channel request

2019-03-27 Thread Laurentiu Tudor
: > On 25/03/2019 15:30, laurentiu.tu...@nxp.com wrote: >> From: Laurentiu Tudor >> >> If the dma controller is not yet probed, defer i2c probe. >> The error path in probe was slightly modified (no functional change) > > There is a functional change for cases like: >

Re: [RESEND] i2c: imx: defer probing on dma channel request

2019-03-26 Thread Laurentiu Tudor
Hi Steve, Thanks for the review! Few comments inline. On 25.03.2019 19:12, Steven Price wrote: > On 25/03/2019 15:30, laurentiu.tu...@nxp.com wrote: >> From: Laurentiu Tudor >> >> If the dma controller is not yet probed, defer i2c probe. >> The error path in

[RESEND] i2c: imx: defer probing on dma channel request

2019-03-25 Thread laurentiu . tudor
From: Laurentiu Tudor If the dma controller is not yet probed, defer i2c probe. The error path in probe was slightly modified (no functional change) to avoid triggering this WARN_ON(): "cg-pll0-div1 already disabled WARNING: CPU: 1 PID: 1 at drivers/clk/clk.c:828 clk_core_disable+0xa8

RE: [PATCH v2 1/2] i2c: imx: fix dma_request_chan error handling

2019-01-25 Thread Laurentiu Tudor
Hi Wolfram, > -Original Message- > From: Wolfram Sang [mailto:w...@the-dreams.de] > Sent: Wednesday, January 23, 2019 12:52 AM > > On Wed, Jan 16, 2019 at 01:28:54PM +0200, Laurentiu Tudor wrote: > > Use the correct error pointer when extracting the erro

Re: [PATCH] dmaengine: fsl-edma: dma map slave device address

2019-01-21 Thread Laurentiu Tudor
Hi Angelo, On 18.01.2019 23:50, Angelo Dureghello wrote: > Hi Laurentiu, > > On Fri, Jan 18, 2019 at 12:06:23PM +0200, Laurentiu Tudor wrote: >> This mapping needs to be created in order for slave dma transfers >> to work on systems with SMMU. The implementation mostly mimic

[PATCH] dmaengine: fsl-edma: dma map slave device address

2019-01-18 Thread Laurentiu Tudor
This mapping needs to be created in order for slave dma transfers to work on systems with SMMU. The implementation mostly mimics the one in pl330 dma driver, authored by Robin Murphy. Signed-off-by: Laurentiu Tudor Suggested-by: Robin Murphy --- Original approach was to add the missing mappings

Re: [RFC PATCH] i2c: imx: dma map the i2c data i/o register

2019-01-17 Thread Laurentiu Tudor
Hi Robin, On 16.01.2019 19:55, Robin Murphy wrote: > On 16/01/2019 16:17, Laurentiu Tudor wrote: >> This is an attempt to fix an iommu exception when doing dma to the >> i2c controller with EDMA. Without these mappings the smmu raises a >> context fault [1] exactly with t

[RFC PATCH] i2c: imx: dma map the i2c data i/o register

2019-01-16 Thread Laurentiu Tudor
: Unhandled context fault: fsr=0x402, iova=0x02180004, fsynr=0x150021, cb=7 Signed-off-by: Laurentiu Tudor --- drivers/i2c/busses/i2c-imx.c | 57 +--- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c

[PATCH v2 2/2] i2c: imx: defer probing on dma channel request

2019-01-16 Thread Laurentiu Tudor
If the dma controller is not yet probed, defer i2c probe. The error path in probe was slightly modified (no functional change) to avoid triggering this WARN_ON(): "cg-pll0-div1 already disabled WARNING: CPU: 1 PID: 1 at drivers/clk/clk.c:828 clk_core_disable+0xa8/0xb0" Signed-off-by:

[PATCH v2 1/2] i2c: imx: fix dma_request_chan error handling

2019-01-16 Thread Laurentiu Tudor
Use the correct error pointer when extracting the error code. Fixes: ea1e5f176e97 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request") Signed-off-by: Laurentiu Tudor --- drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

Re: [PATCH] i2c: imx: defer probing on dma channel request

2019-01-16 Thread Laurentiu Tudor
Hello, On 15.01.2019 23:55, Wolfram Sang wrote: > Hi, > > On Tue, Jan 15, 2019 at 04:03:32PM +0200, Laurentiu Tudor wrote: >> If the dma controller is not yet probed, defer i2c probe. >> The error path in probe was slightly modified (no functional change) >> to av

[PATCH] i2c: imx: defer probing on dma channel request

2019-01-15 Thread Laurentiu Tudor
If the dma controller is not yet probed, defer i2c probe. The error path in probe was slightly modified (no functional change) to avoid triggering this WARN_ON(): "cg-pll0-div1 already disabled WARNING: CPU: 1 PID: 1 at drivers/clk/clk.c:828 clk_core_disable+0xa8/0xb0" Signed-off-by:

Re: [PATCH] drivers/bus/fsl-mc/dpbp.c: Remove duplicate header

2019-01-07 Thread Laurentiu Tudor
On 09.11.2018 11:51, Brajeswar Ghosh wrote: > Remove linux/fsl/mc.h which is included more than once > > Signed-off-by: Brajeswar Ghosh Acked-by: Laurentiu Tudor --- Best Regards, Laurentiu > --- > drivers/bus/fsl-mc/dpbp.c | 1 - > 1 file changed, 1 deletion(

RE: [PATCH 0/5] soc: fsl: add device links support for devices on the fsl-mc bus

2018-12-17 Thread Laurentiu Tudor
| 4 > include/linux/fsl/mc.h | 1 + > include/soc/fsl/dpaa2-io.h | 9 ++--- > 11 files changed, 96 insertions(+), 22 deletions(-) Reviewed-by: Laurentiu Tudor --- Best Regards, Laurentiu

Re: [PATCH v1 1/2] bus: mc-bus: Add support for mapping shareable portals

2018-11-07 Thread Laurentiu Tudor
Hi Roy, On 30.10.2018 22:30, Roy Pledge wrote: > Starting with v5 of NXP QBMan devices the hardware supports using > regular cacheable/shareable memory as the backing store for the > portals. > > This patch adds support for the new portal mode by switching to > use the DPRC get object region v2

Re: [PATCH v1 1/2] bus: mc-bus: Add support for mapping shareable portals

2018-11-07 Thread Laurentiu Tudor
Hi Roy, On 30.10.2018 22:30, Roy Pledge wrote: > Starting with v5 of NXP QBMan devices the hardware supports using > regular cacheable/shareable memory as the backing store for the > portals. > > This patch adds support for the new portal mode by switching to > use the DPRC get object region v2

[PATCH v3 16/22] arm64: dts: ls1046a: add smmu node

2018-10-10 Thread laurentiu . tudor
From: Laurentiu Tudor This allows for the SMMU device to be probed by the SMMU kernel driver. Signed-off-by: Laurentiu Tudor --- .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 42 +++ 1 file changed, 42 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl

[PATCH v3 16/22] arm64: dts: ls1046a: add smmu node

2018-10-10 Thread laurentiu . tudor
From: Laurentiu Tudor This allows for the SMMU device to be probed by the SMMU kernel driver. Signed-off-by: Laurentiu Tudor --- .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 42 +++ 1 file changed, 42 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl

Re: [GIT PULL] fixes for soc/fsl drivers for v4.19 take 2

2018-10-04 Thread Laurentiu Tudor
> - Fix crash of qman_portal by deferring its probe if qman is not probed > > > Laurentiu Tudor (2): >soc: fsl: qbman: add APIs to retrieve the probing status >soc: fsl: qman_portals: defer probe after qman's probe There's a similar fix for bman portals [1]. I w

Re: [GIT PULL] fixes for soc/fsl drivers for v4.19 take 2

2018-10-04 Thread Laurentiu Tudor
> - Fix crash of qman_portal by deferring its probe if qman is not probed > > > Laurentiu Tudor (2): >soc: fsl: qbman: add APIs to retrieve the probing status >soc: fsl: qman_portals: defer probe after qman's probe There's a similar fix for bman portals [1]. I w

Re: [PATCH] bus: fsl-mc: explicitly define the fsl_mc_command endianness

2018-10-02 Thread Laurentiu Tudor
On 02.10.2018 15:16, Ioana Ciornei wrote: > Both the header and the command parameters of the fsl_mc_command are > 64-bit little-endian words. Use the appropriate type to explicitly > specify their endianness. > > Signed-off-by: Ioana Ciornei Reviewed-By: Laurentiu Tudor -

Re: [PATCH] bus: fsl-mc: explicitly define the fsl_mc_command endianness

2018-10-02 Thread Laurentiu Tudor
On 02.10.2018 15:16, Ioana Ciornei wrote: > Both the header and the command parameters of the fsl_mc_command are > 64-bit little-endian words. Use the appropriate type to explicitly > specify their endianness. > > Signed-off-by: Ioana Ciornei Reviewed-By: Laurentiu Tudor -

[PATCH v2 08/22] soc/fsl/qbman_portals: add APIs to retrieve the probing status

2018-09-26 Thread laurentiu . tudor
From: Laurentiu Tudor Add a couple of new APIs to check the probing status of the required cpu bound qman and bman portals: 'int bman_portals_probed()' and 'int qman_portals_probed()'. They return the following values. * 1 if qman/bman portals were all probed correctly * 0 if qman/bman

  1   2   3   >