[PATCH] of: address: Fix parser address/size cells initialization

2020-07-31 Thread Nicolas Saenz Julienne
ed-by: Nathan Chancellor Signed-off-by: Nicolas Saenz Julienne --- drivers/of/address.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index 275d764efc77..89822e191956 100644 --- a/drivers/of/address.c +++ b/drivers/of/address

[PATCH v2] clk: bcm2835: Do not use prediv with bcm2711's PLLs

2020-07-30 Thread Nicolas Saenz Julienne
the aux UART, making its output unintelligible. Fixes: 42de9ad400af ("clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support") Reported-by: Nathan Chancellor Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Previous approach broken. Check if running on bcm2711 upon using fb_p

[PATCH] clk: bcm2835: Do not use prediv with bcm2711's PLLs

2020-07-30 Thread Nicolas Saenz Julienne
its output unintelligible. Fixes: 42de9ad400af ("clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support") Reported-by: Nathan Chancellor Signed-off-by: Nicolas Saenz Julienne --- FYI relevant discussion with RPi engineers: https://github.com/raspberrypi/firmware/issues/1435#issuecomment-666242077

Re: [PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-28 Thread Nicolas Saenz Julienne
On Tue, 2020-07-28 at 11:13 +0200, Christoph Hellwig wrote: > On Mon, Jul 27, 2020 at 07:56:56PM +0200, Nicolas Saenz Julienne wrote: > > Hi Christoph, > > thanks for having a look at this! > > > > On Fri, 2020-07-24 at 15:41 +0200, Christoph Hellwig wrote: > > &

Re: [PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-27 Thread Nicolas Saenz Julienne
Hi Christoph, thanks for having a look at this! On Fri, 2020-07-24 at 15:41 +0200, Christoph Hellwig wrote: > Yes, the iommu is an interesting case, and the current code is > wrong for that. Care to expand on this? I do get that checking dma_coherent_ok() on memory that'll later on be mapped

Re: [PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-24 Thread Nicolas Saenz Julienne
Hi Amit, On Thu, 2020-07-23 at 10:44 +0530, Amit Pundir wrote: > Hi Nicolas, > > Sorry I got stuck on other things yesterday. No worries :) > On Tue, 21 Jul 2020 at 21:57, Nicolas Saenz Julienne [...] > > > > Let's get a bigger hammer, I'm just looking for clues

Re: [PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-21 Thread Nicolas Saenz Julienne
On Tue, 2020-07-21 at 20:52 +0530, Amit Pundir wrote: [...] > > > > Can you try booting *without* my patch and this in the kernel > > > > command > > > > line: "cma=16M@0x1-0x2". > > > > > > It doesn't boot with this added kernel command line. > > > > For the record, this

Re: [PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-21 Thread Nicolas Saenz Julienne
On Tue, 2020-07-21 at 17:45 +0530, Amit Pundir wrote: > On Tue, 21 Jul 2020 at 16:45, Nicolas Saenz Julienne > wrote: > > On Tue, 2020-07-21 at 14:24 +0530, Amit Pundir wrote: > > > On Tue, 21 Jul 2020 at 14:09, Nicolas Saenz Julienne > > > wrote: > &g

Re: [PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-21 Thread Nicolas Saenz Julienne
On Tue, 2020-07-21 at 13:28 +0200, Christoph Hellwig wrote: > On Tue, Jul 21, 2020 at 01:15:23PM +0200, Nicolas Saenz Julienne > wrote: > > I'm at loss at what could be failing here. Your device should be > > able > > to address the whole 8GB memory space, which AFAIK

[PATCH v2] brcmfmac: Set timeout value when configuring power save

2020-07-21 Thread Nicolas Saenz Julienne
Set the timeout value as per cfg80211's set_power_mgmt() request. If the requested value value is left undefined we set it to 2 seconds, the maximum supported value. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Use min_t() .../net/wireless/broadcom/brcm80211/brcmfmac

Re: [PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-21 Thread Nicolas Saenz Julienne
On Tue, 2020-07-21 at 14:24 +0530, Amit Pundir wrote: > On Tue, 21 Jul 2020 at 14:09, Nicolas Saenz Julienne > wrote: > > Hi Amit, > > > Hi Nicolas, > > > > > > I see a boot regression with this commit d9765e41d8e9 "dma-pool: > > > Do no

Re: [PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-21 Thread Nicolas Saenz Julienne
Hi Amit, On Tue, 2020-07-21 at 12:51 +0530, Amit Pundir wrote: > On Wed, 8 Jul 2020 at 22:43, Nicolas Saenz Julienne > wrote: > > There is no guarantee to CMA's placement, so allocating a zone > > specific > > atomic pool from CMA might return memory from a completely

Re: [PATCH] dma-pool: Only allocate from CMA when in same memory zone

2020-07-16 Thread Nicolas Saenz Julienne
Hi Chritoph, On Fri, 2020-07-10 at 16:10 +0200, Nicolas Saenz Julienne wrote: > There is no guarantee to CMA's placement, so allocating a zone specific > atomic pool from CMA might return memory from a completely different > memory zone. To get around this double check CMA's placeme

[PATCH] drm/v3d: Use platform_get_irq_optional() to get optional IRQs

2020-07-16 Thread Nicolas Saenz Julienne
Aside from being more correct, the non optional version of the function prints an error when failing to find the IRQ. Fixes: eea9b97b4504 ("drm/v3d: Add support for V3D v4.2") Signed-off-by: Nicolas Saenz Julienne --- drivers/gpu/drm/v3d/v3d_irq.c | 2 +- 1 file changed, 1 inser

[PATCH] drm/v3d: Fix double free in gem code

2020-07-16 Thread Nicolas Saenz Julienne
Merge v5.4-rc7 into drm-next") Signed-off-by: Nicolas Saenz Julienne --- drivers/gpu/drm/v3d/v3d_gem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index 915f8bfdb58c..3cfbdb8e6a91 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++

[PATCH v2 1/4] dma-direct: Provide function to check physical memory area validity

2020-07-14 Thread Nicolas Saenz Julienne
dma_coherent_ok() checks if a physical memory area fits a device's DMA constraints. Signed-off-by: Nicolas Saenz Julienne --- include/linux/dma-direct.h | 1 + kernel/dma/direct.c| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/dma-direct.h b/include

[PATCH v2 4/4] dma-pool: Make sure atomic pool suits device

2020-07-14 Thread Nicolas Saenz Julienne
Suggested-by: Robin Murphy Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Rebase to linus' master kernel/dma/pool.c | 57 ++- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c index 5b

[PATCH v2 2/4] dma-pool: Get rid of dma_in_atomic_pool()

2020-07-14 Thread Nicolas Saenz Julienne
The function is only used once and can be simplified to a one-liner. Signed-off-by: Nicolas Saenz Julienne --- kernel/dma/pool.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c index 39ca26fa41b5..318035e093fb 100644

[PATCH v2 3/4] dma-pool: Introduce dma_guess_pool()

2020-07-14 Thread Nicolas Saenz Julienne
mitigate this, introduce dma_guess_pool() which can be fed a device's DMA constraints and atomic pools already known to be faulty, in order for it to provide an better guess on which pool to use. Signed-off-by: Nicolas Saenz Julienne --- kernel/dma/pool.c | 26 +++--- 1 file

[PATCH v2 0/4] dma-pool: Fix atomic pool selection

2020-07-14 Thread Nicolas Saenz Julienne
//lkml.org/lkml/2020/7/8/1108 --- Changes since v1: - Rebase into linus' master Nicolas Saenz Julienne (4): dma-direct: Provide function to check physical memory area validity dma-pool: Get rid of dma_in_atomic_pool() dma-pool: Introduce dma_guess_pool() dma-pool: Make sure atomic

Re: [PATCH v3 1/9] dt-bindings: reset: Add a binding for the RPi Firmware reset controller

2020-07-14 Thread Nicolas Saenz Julienne
On Mon, 2020-07-13 at 12:23 -0600, Rob Herring wrote: > On Fri, Jun 12, 2020 at 07:13:25PM +0200, Nicolas Saenz Julienne wrote: > > The firmware running on the RPi VideoCore can be used to reset and > > initialize HW controlled by the firmware. > > > > Signed-off

Re: [PATCH 3/4] dma-pool: Introduce dma_guess_pool()

2020-07-14 Thread Nicolas Saenz Julienne
On Tue, 2020-07-14 at 13:22 +0200, Christoph Hellwig wrote: > This one doesn't appear to actually apply on top of Linus' tree plus the > two previous patches. I'll take care of it. signature.asc Description: This is a digitally signed message part

[PATCH] dma-pool: Only allocate from CMA when in same memory zone

2020-07-10 Thread Nicolas Saenz Julienne
o map to gfp mask") Reported-by: Jeremy Linton Signed-off-by: Nicolas Saenz Julienne --- This is a code intensive alternative to "dma-pool: Do not allocate pool memory from CMA"[1]. [1] https://lkml.org/lkml/2020/7/8/1108 kernel/dma/pool.c | 36

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-10 Thread Nicolas Saenz Julienne
On Thu, 2020-07-09 at 14:49 -0700, David Rientjes wrote: > On Wed, 8 Jul 2020, Christoph Hellwig wrote: > > > On Wed, Jul 08, 2020 at 06:00:35PM +0200, Nicolas Saenz Julienne wrote: > > > On Wed, 2020-07-08 at 17:35 +0200, Christoph Hellwig wrote: > > > > On Tue,

[PATCH 2/4] dma-pool: Get rid of dma_in_atomic_pool()

2020-07-09 Thread Nicolas Saenz Julienne
The function is only used once and can be simplified to a one-liner. Signed-off-by: Nicolas Saenz Julienne --- kernel/dma/pool.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c index 8cfa01243ed2..7363640fc91c 100644

[PATCH 0/4] dma-pool: Fix atomic pool selection

2020-07-09 Thread Nicolas Saenz Julienne
//lkml.org/lkml/2020/7/8/1108 --- Nicolas Saenz Julienne (4): dma-direct: Provide function to check physical memory area validity dma-pool: Get rid of dma_in_atomic_pool() dma-pool: Introduce dma_guess_pool() dma-pool: Make sure atomic pool suits device include/linux/dma-direct.h | 1

[PATCH 4/4] dma-pool: Make sure atomic pool suits device

2020-07-09 Thread Nicolas Saenz Julienne
Suggested-by: Robin Murphy Signed-off-by: Nicolas Saenz Julienne --- kernel/dma/pool.c | 53 +-- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c index 3d518de07617..d48d9acb585f 100644 --- a/kernel/dma/po

[PATCH 1/4] dma-direct: Provide function to check physical memory area validity

2020-07-09 Thread Nicolas Saenz Julienne
dma_coherent_ok() checks if a physical memory area fits a device's DMA constraints. Signed-off-by: Nicolas Saenz Julienne --- include/linux/dma-direct.h | 1 + kernel/dma/direct.c| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/dma-direct.h b/include

[PATCH 3/4] dma-pool: Introduce dma_guess_pool()

2020-07-09 Thread Nicolas Saenz Julienne
mitigate this, introduce dma_guess_pool() which can be fed a device's DMA constraints or an atomic pool already known to be faulty in order for it to provide a better guess at which pool to use. Signed-off-by: Nicolas Saenz Julienne --- kernel/dma/pool.c | 26 +++--- 1 file

[PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-08 Thread Nicolas Saenz Julienne
Signed-off-by: Nicolas Saenz Julienne --- An more costly alternative would be adding an option to dma_alloc_from_contiguous() so it fails when the allocation doesn't fall in a specific zone. kernel/dma/pool.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/kernel/dm

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Nicolas Saenz Julienne
On Wed, 2020-07-08 at 17:35 +0200, Christoph Hellwig wrote: > On Tue, Jul 07, 2020 at 02:28:04PM +0200, Nicolas Saenz Julienne wrote: > > When allocating atomic DMA memory for a device, the dma-pool core > > queries __dma_direct_optimal_gfp_mask() to check which atomic pool to &g

Re: [PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-08 Thread Nicolas Saenz Julienne
Hi Jim, On Tue, 2020-07-07 at 17:08 -0500, Jeremy Linton wrote: > Hi, > > I spun this up on my 8G model using the PFTF firmware from: > > https://github.com/pftf/RPi4/releases > > Which allows me to switch between ACPI/DT on the machine. In DT mode it > works fine now, Nice, would that

[PATCH] brcmfmac: set timeout value when configuring power save

2020-07-07 Thread Nicolas Saenz Julienne
Set the timeout value as per cfg80211's set_power_mgmt() request. If the requested value value is left undefined we set it to 2 seconds, the maximum supported value. Signed-off-by: Nicolas Saenz Julienne --- Note: I got the 2 seconds value from the Raspberry Pi downstream kernel. .../wireless

[PATCH] dma-pool: use single atomic pool for both DMA zones

2020-07-07 Thread Nicolas Saenz Julienne
dma_pool_kernel for the non constrained ones. Fixes: c84dc6e68a1d ("dma-pool: add additional coherent pools to map to gfp mask") Reported-by: Jeremy Linton Suggested-by: Robin Murphy Signed-off-by: Nicolas Saenz Julienne --- kernel/dma/pool.c | 47 +++-

[GIT PULL 1/1] bcm2835-dt-next-2020-07-06

2020-07-06 Thread Nicolas Saenz Julienne
Hi Florian, The following changes since commit b3a9e3b9622ae10064826dccb4f7a52bd88c7407: Linux 5.8-rc1 (2020-06-14 12:45:04 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/nsaenz/linux-rpi.git tags/bcm2835-dt-next-2020-07-06 for you to fetch

Re: [PATCH v4 3/3] ARM: dts: bcm2711: Add HDMI DVP

2020-07-06 Thread Nicolas Saenz Julienne
On Thu, 2020-06-11 at 11:23 +0200, Maxime Ripard wrote: > Now that we have a driver for the DVP, let's add its DT node. > > Signed-off-by: Maxime Ripard > --- Applied for-next, Thanks, Nicolas signature.asc Description: This is a digitally signed message part

Re: [BUG] XHCI getting ZONE_DMA32 memory > than its bus_dma_limit

2020-07-06 Thread Nicolas Saenz Julienne
On Sun, 2020-07-05 at 16:41 -0700, David Rientjes wrote: > On Fri, 3 Jul 2020, Robin Murphy wrote: > > > > Just for the record the offending commit is: c84dc6e68a1d2 ("dma-pool: add > > > additional coherent pools to map to gfp mask"). > > > > > > On Thu, 2020-07-02 at 12:49 -0500, Jeremy Linton

Re: [BUG] XHCI getting ZONE_DMA32 memory > than its bus_dma_limit

2020-07-03 Thread Nicolas Saenz Julienne
Hi Jeremy, thanks for the bug report. Just for the record the offending commit is: c84dc6e68a1d2 ("dma-pool: add additional coherent pools to map to gfp mask"). On Thu, 2020-07-02 at 12:49 -0500, Jeremy Linton wrote: > Hi, > > Using 5.8rc3: > > The rpi4 has a 3G dev->bus_dma_limit on its XHCI

[PATCH v2 26/47] staging: vchiq: Export vchiq_get_service_userdata()

2020-06-29 Thread Nicolas Saenz Julienne
This is for service's callbacks to get their private data. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers

[PATCH v2 23/47] staging: vchiq: Move message queue into struct vchiq_service

2020-06-29 Thread Nicolas Saenz Julienne
to match vchiq's user_service message queue, which could be merged with this one in the future. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/Makefile| 1 - .../interface/vchiq_arm/vchiq_core.c | 46 .../interface/vchiq_arm/vchiq_core.h

[PATCH v2 18/47] staging: vchi: Get rid of flags argument in vchi_msg_hold()

2020-06-29 Thread Nicolas Saenz Julienne
All users are ignoring the flags argument. So for the sake of simplicity delete it. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 +-- drivers/staging/vc04_services/interface/vchi/vchi.h | 1 - .../vc04_services/interface/vchiq_arm

[PATCH v2 35/47] staging: vchi: Get rid of struct vchiq_instance forward declaration

2020-06-29 Thread Nicolas Saenz Julienne
It's already forward declared in vchiq_if.h. So no need to insist Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchi/vchi.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging

[PATCH v2 45/47] staging: vchiq: Use vchiq.h as the main header file for services

2020-06-29 Thread Nicolas Saenz Julienne
This used to be vchiq_if.h but vchiq.h is more concise for an include file that will hopefully be in the future in the includes directory. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/bcm2835-audio/bcm2835.h | 2 +- .../vc04_services/interface/vchiq_arm/vchiq.h | 107

[PATCH v2 38/47] staging: vchiq: Make vchiq_add_service() local

2020-06-29 Thread Nicolas Saenz Julienne
The function is being exported although there is no use for it outside of vchiq's core code. Keep it local then. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 +-- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h | 3

[PATCH v2 14/47] staging: vchi: Get rid of vchi_msg_dequeue()

2020-06-29 Thread Nicolas Saenz Julienne
Nobody uses it. Get rid of it. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 7 .../interface/vchiq_arm/vchiq_shim.c | 39 --- 2 files changed, 46 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi

[PATCH v2 31/47] staging: vchi: Get rid of struct vchi_service

2020-06-29 Thread Nicolas Saenz Julienne
The structure only contains a single parameter, which is the underlying vchiq handle. Get rid of the struct and directly pass the handle around. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 23 ++--- .../vc04_services/interface/vchi/vchi.h | 25

[PATCH v2 09/47] staging: vchi: Get rid of all useless callback reasons

2020-06-29 Thread Nicolas Saenz Julienne
They are neither produced nor expected, so just delete them. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchi/vchi_common.h | 40 ++- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi

[PATCH v2 40/47] staging: vchi: Get rid of vchi_bulk_queue_receive()

2020-06-29 Thread Nicolas Saenz Julienne
Its vchiq counterpart, vchiq_bulk_receive() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_receive()'s retry mechanism into vchiq_bulk_receive() and let services call the later. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h

[PATCH v2 11/47] staging: vchi: Get rid of struct vchi_instance_handle

2020-06-29 Thread Nicolas Saenz Julienne
The idea behind this was to create an opaque handle to struct vchiq_instance. This can be achieved without creating a new type by means of a forward declaration of struct vchiq_instance. This saves us from a lot of useless casting and overall simplifies code. Signed-off-by: Nicolas Saenz

[PATCH v2 32/47] staging: vchiq: Pass vchiq's message when holding a message

2020-06-29 Thread Nicolas Saenz Julienne
and directly pass struct vchiq_header, which is what ultimately vchiq consumes when handling callback messages. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 14 ++- .../interface/vchiq_arm/vchiq_shim.c | 25 ++- 2 files

[PATCH v2 27/47] staging: vchiq: Export vchiq_msg_queue_push

2020-06-29 Thread Nicolas Saenz Julienne
vchiq consumer drivers may need to use this function in order to get the benefits of vchiq's per service message queueing mechanism. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers

[PATCH v2 19/47] staging: vchi: Use enum vchiq_bulk_mode instead of vchi's transmission flags

2020-06-29 Thread Nicolas Saenz Julienne
vchi has a set of transfer flags which almost map 1:1 to vchiq's own transfer modes. For the sake of simplicity let's use the later and delete vchi's. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 2 +- .../vc04_services/bcm2835-audio/bcm2835.h

[PATCH v2 15/47] staging: vchi_common: Get rid of all unused definitions

2020-06-29 Thread Nicolas Saenz Julienne
There is a series of structures and enums defined but never used. Get rid of them. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchi/vchi_common.h | 65 --- 1 file changed, 65 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchi

[PATCH v2 33/47] staging: vchi: Rework vchi_msg_hold() to match vchiq_msg_hold()

2020-06-29 Thread Nicolas Saenz Julienne
The services have access to struct vchiq_header's internals, so we can let them get the data pointer. This pretty much makes both functions exactly the same, which will allow us to make a switch to vchiq_msg_hold() further down the road. Signed-off-by: Nicolas Saenz Julienne --- .../staging

[PATCH v2 16/47] staging: vchi: Get rid of unnecessary defines

2020-06-29 Thread Nicolas Saenz Julienne
Those defines aren't used by anyone. Get rid of them. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchi/vchi.h | 11 --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 1 - 2 files changed, 12 deletions(-) diff --git a/drivers/staging

[PATCH v2 36/47] staging: vchi: Don't include vchiq_core.h

2020-06-29 Thread Nicolas Saenz Julienne
This file is internal to vchiq. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface

[PATCH v2 12/47] staging: vchi: Unify struct shim_service and struct vchi_service_handle

2020-06-29 Thread Nicolas Saenz Julienne
struct shim_service into struvt vchi_service, which is more consistent with the rest of the exposed API. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Open service only if allocation was successful .../bcm2835-audio/bcm2835-vchiq.c | 24 +++ .../vc04_services

[PATCH v2 39/47] staging: vchiq: Move definitions only used by core into core header

2020-06-29 Thread Nicolas Saenz Julienne
vchiq_if.h is used by service consumers and only the exported API should be present. Move the rest of definitions, which were not exported by the way, to vchiq_core.h where they belong. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_core.h | 22

[PATCH v2 34/47] staging: vchiq: Unify fourcc definition mechanisms

2020-06-29 Thread Nicolas Saenz Julienne
There is already enough duplication with regard to fourcc generation in the kernel. Let's at least use the same macro all over the vchiq ecosystem. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- .../vc04_services/bcm2835-audio

[PATCH v2 03/47] staging: mmal-vchiq: Fixup vchiq-mmal include ordering

2020-06-29 Thread Nicolas Saenz Julienne
From: Dave Stevenson There were dependencies on including the headers in the correct order. Fix up the headers so that they include the other headers that they depend on themselves. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers

[PATCH v2 29/47] staging: vchiq: Don't use a typedef for vchiq_callback

2020-06-29 Thread Nicolas Saenz Julienne
Linux coding style says to avoid typdefs. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchi/vchi.h| 5 - .../vc04_services/interface/vchiq_arm/vchiq_if.h | 14 -- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH v2 00/47] staging: vchiq: Getting rid of the vchi/vchiq split

2020-06-29 Thread Nicolas Saenz Julienne
ays return the param size from param_get staging: mmal-vchiq: If the VPU returns an error, don't negate it Naushir Patuck (1): staging: mmal-vchiq: Fix formatting errors in mmal_parameters.h Nicolas Saenz Julienne (39): staging: vchi: Get rid of all useless callback reasons st

[PATCH v2 41/47] staging: vchi: Get rid of vchi_bulk_queue_transmit()

2020-06-29 Thread Nicolas Saenz Julienne
Its vchiq counterpart, vchiq_bulk_transmit() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_transmit()'s retry mechanism into vchiq_bulk_transmit() and let services call the later. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c

[PATCH v2 10/47] staging: vchi: Get rid of vchi_msg_peek()

2020-06-29 Thread Nicolas Saenz Julienne
-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 12 .../interface/vchiq_arm/vchiq_shim.c | 64 --- .../interface/vchiq_arm/vchiq_util.c | 12 .../interface/vchiq_arm/vchiq_util.h | 1 - 4 files changed, 89 deletions

[PATCH v2 13/47] staging: vc04_services: bcm2835-audio: Use vchi_msg_hold()

2020-06-29 Thread Nicolas Saenz Julienne
() instead. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 25 +++ 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835

[PATCH v2 05/47] staging: mmal-vchiq: Always return the param size from param_get

2020-06-29 Thread Nicolas Saenz Julienne
-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

[PATCH v2 17/47] staging: vc04_services: Get rid of vchi_cfg.h

2020-06-29 Thread Nicolas Saenz Julienne
Nothing in it is being used. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 1 - .../vc04_services/interface/vchi/vchi_cfg.h | 238 -- 2 files changed, 239 deletions(-) delete mode 100644 drivers/staging/vc04_services/interface

[PATCH v2 30/47] staging: vchi: Use struct vchiq_service_params

2020-06-29 Thread Nicolas Saenz Julienne
For initialization, vchi has its own params structure, which is then translated to vchiq's params structure. They are essentially the same, so lets directly use vchiq's. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 9 + .../vc04_services

[PATCH v2 02/47] staging: mmal-vchiq: Make a mmal_buf struct for passing parameters

2020-06-29 Thread Nicolas Saenz Julienne
for the struct, and pass the appropriate members. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-camera/bcm2835-camera.c | 64 +++ .../vc04_services/vchiq-mmal/mmal-common.h| 5 ++ .../vc04_services/vchiq

[PATCH v2 44/47] staging: vchiq: Move conditional barrier definition into vchiq_core.h

2020-06-29 Thread Nicolas Saenz Julienne
The barrier is only used by core code. So keep the barrier definition in the core header. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq.h| 11 --- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 12 2 files changed, 12

[PATCH v2 06/47] staging: mmal-vchiq: If the VPU returns an error, don't negate it

2020-06-29 Thread Nicolas Saenz Julienne
. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers

[PATCH v2 25/47] staging: vchi: Expose struct vchi_service

2020-06-29 Thread Nicolas Saenz Julienne
This will make further changes easier. The struct will ultimately disappear. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchi/vchi.h| 10 +++--- .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 7 --- 2 files changed, 7 insertions

[PATCH v5 1/9] dt-bindings: reset: Add a binding for the RPi Firmware reset controller

2020-06-29 Thread Nicolas Saenz Julienne
The firmware running on the RPi VideoCore can be used to reset and initialize HW controlled by the firmware. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- Changes since v2: - Add include file for reset IDs Changes since v1: - Correct cells binding as per Florian's

[PATCH v5 7/9] usb: host: pci-quirks: Bypass xHCI quirks for Raspberry Pi 4

2020-06-29 Thread Nicolas Saenz Julienne
The board doesn't need the quirks to be run, and takes care of its own initialization through a reset controller device. So let's bypass them. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- Changes since v2: - Correct reference counting on parent device node Changes

[PATCH v5 5/9] usb: xhci-pci: Add support for reset controllers

2020-06-29 Thread Nicolas Saenz Julienne
Some atypical users of xhci-pci might need to manually reset their xHCI controller before starting the HCD setup. Check if a reset controller device is available to the PCI bus and trigger a reset. Signed-off-by: Nicolas Saenz Julienne Acked-by: Mathias Nyman Reviewed-by: Philipp Zabel

[PATCH v5 0/9] Raspberry Pi 4 USB firmware initialization rework

2020-06-29 Thread Nicolas Saenz Julienne
less USB centric - Use correct reset controller API in xhci-pci - Correct typos Nicolas Saenz Julienne (9): dt-bindings: reset: Add a binding for the RPi Firmware reset controller reset: Add Raspberry Pi 4 firmware reset controller ARM: dts: bcm2711: Add firmware usb reset node ARM: dts

[PATCH v5 3/9] ARM: dts: bcm2711: Add firmware usb reset node

2020-06-29 Thread Nicolas Saenz Julienne
Now that the reset driver exposing Raspberry Pi 4's firmware based USB reset routine is available, let's add the device tree node exposing it. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- Changes since v1: - Update cell nr to match new bindings --- arch/arm/boot

[PATCH v5 2/9] reset: Add Raspberry Pi 4 firmware reset controller

2020-06-29 Thread Nicolas Saenz Julienne
-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli Reviewed-by: Philipp Zabel --- Changes since v4: - use np instead of fw_node, to explicitly mark this as OF centric Changes since v2: - Get ids from dt-binding Changes since v1: - Make the whole driver less USB centric as per Florian's

[PATCH v5 4/9] ARM: dts: bcm2711: Add reset controller to xHCI node

2020-06-29 Thread Nicolas Saenz Julienne
The chip is hardwired to the board's PCIe bus and needs to be properly setup trough a firmware routine after a PCI fundamental reset. Pass the reset controller phandle that takes care of triggering the initialization to the relevant PCI device. Signed-off-by: Nicolas Saenz Julienne --- Changes

[PATCH v5 8/9] Revert "firmware: raspberrypi: Introduce vl805 init routine"

2020-06-29 Thread Nicolas Saenz Julienne
This reverts commit fbbc5ff3f7f9f4cad562e530ae2cf5d8964fe6d3. The vl805 init routine has moved into drivers/reset/reset-raspberrypi.c Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- drivers/firmware/raspberrypi.c | 61 -- include/soc

[PATCH v5 9/9] Revert "PCI: brcmstb: Wait for Raspberry Pi's firmware when present"

2020-06-29 Thread Nicolas Saenz Julienne
This reverts commit 44331189f9082c7e659697bbac1747db3def73e7. Now that the VL805 init routine is run through a reset controller driver the device dependencies are being taken care of by the device core. No need to do it manually here. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian

Re: [PATCH v3 2/9] reset: Add Raspberry Pi 4 firmware reset controller

2020-06-29 Thread Nicolas Saenz Julienne
On Fri, 2020-06-26 at 12:43 +0200, Philipp Zabel wrote: > On Wed, 2020-06-17 at 12:44 +0200, Nicolas Saenz Julienne wrote: > > On Wed, 2020-06-17 at 12:02 +0200, Philipp Zabel wrote: > > > Hi Nicolas, > > > > > > On Fri, 2020-06-12 at 19:13 +0200, Nicolas Sae

[PATCH v5 6/9] Revert "USB: pci-quirks: Add Raspberry Pi 4 quirk"

2020-06-29 Thread Nicolas Saenz Julienne
This reverts commit c65822fef4adc0ba40c37a47337376ce75f7a7bc. The initialization of Raspberry Pi 4's USB chip is now handled through a reset controller. No need to directly call the firmware routine through a PCI quirk. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli

[PATCH v2 04/47] staging: mmal-vchiq: Fix client_component for 64 bit kernel

2020-06-29 Thread Nicolas Saenz Julienne
are already held in an array per VCHI instance, so use the array index as the client_component handle to avoid having to create a new IDR for this purpose. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/vchiq-mmal/mmal

[PATCH v2 20/47] staging: vchi: Use vchiq's enum vchiq_reason

2020-06-29 Thread Nicolas Saenz Julienne
enum vchi_callback_reason maps 1:1 to enum vchiq_reason, in an effort to simplify things, let's use the later, and get rid of the extra indirection. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 5 +-- .../interface/vchi/vchi_common.h

[PATCH v2 07/47] staging: mmal-vchiq: Fix formatting errors in mmal_parameters.h

2020-06-29 Thread Nicolas Saenz Julienne
From: Naushir Patuck No functional changes in this commit. - Remove erroneous whitespace. - Remove _t postfix label on structs and enums. Signed-off-by: Naushir Patuck Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-camera/bcm2835-camera.c | 2

[PATCH v2 01/47] staging: mmal-vchiq: Make timeout a defined parameter

2020-06-29 Thread Nicolas Saenz Julienne
From: Dave Stevenson The timeout period for VPU communications is a useful thing to extend when debugging. Set it via a define, rather than a magic number buried in the code. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers/staging

[PATCH v2 47/47] staging: vchiq: Move vchiq.h into include directory

2020-06-29 Thread Nicolas Saenz Julienne
To make the separation clear between vchiq's header files and vchiq.h, which is to be used by services and is the 'public' API, move it into a dedicated includes directory. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Remove unwarranted include drivers/staging/vc04_services

[PATCH v2 24/47] staging: vchiq: Get rid of vchiq_util.h

2020-06-29 Thread Nicolas Saenz Julienne
The header file only provides other includes. Move the relevant includes to their respective C files and delete it for good. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq.h | 1 - .../interface/vchiq_arm/vchiq_2835_arm.c | 1 + .../interface

[PATCH v2 42/47] staging: vchi: Move vchi_queue_kernel_message() into vchiq

2020-06-29 Thread Nicolas Saenz Julienne
We can't really merge it with vchiq_queue_message() as it has internal users that will not benefit from the retry mechanism vchiq_queue_kernel_message() uses. So, for the sake of getting rid of vchi, move it into vchiq. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c

[PATCH v2 37/47] staging: vchiq: Get rid of unnecessary definitions in vchiq_if.h

2020-06-29 Thread Nicolas Saenz Julienne
Those functions don't actually exist, nor have any use, nor the macros. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_if.h | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h b

[PATCH v2 43/47] staging: vchiq: Get rid of vchi

2020-06-29 Thread Nicolas Saenz Julienne
-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/Makefile| 1 - .../bcm2835-audio/bcm2835-vchiq.c | 24 +-- .../vc04_services/bcm2835-audio/bcm2835.h | 1 - .../vc04_services/interface/{vchi => }/TODO | 0 .../vc04_services/interface/vchi/vch

[PATCH v2 08/47] staging: vchiq_arm: Add a matching unregister call

2020-06-29 Thread Nicolas Saenz Julienne
Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 28

[PATCH v2 22/47] staging: vchiq: Introduce vchiq_validate_params()

2020-06-29 Thread Nicolas Saenz Julienne
When adding a new service validate the configuration parameters provided, and remove unnecessary checks in vchi, now that we have validated service's config. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_core.c | 15 +++ .../interface/vchiq_arm

[PATCH v2 46/47] staging: vchiq: Move defines into core header

2020-06-29 Thread Nicolas Saenz Julienne
Those are only used in the core vchiq code, while present in vchiq's 'public' API header. Move them into the right place. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq.h| 5 - .../staging/vc04_services/interface/vchiq_arm/vchiq_core.h

[PATCH v2 28/47] staging: vchi: Get rid of vchiq_shim's message callback

2020-06-29 Thread Nicolas Saenz Julienne
code in the end. Signed-off-by: Nicolas Saenz Julienne --- .../bcm2835-audio/bcm2835-vchiq.c | 20 ++--- .../vc04_services/interface/vchi/vchi.h | 9 +- .../interface/vchi/vchi_common.h | 12 --- .../interface/vchiq_arm/vchiq_shim.c | 42

[PATCH v2 21/47] staging: vchi: Get rid of effect less expression

2020-06-29 Thread Nicolas Saenz Julienne
It was probably there to trick compilers into ignoring unused variables, which isn't needed in Linux. Signed-off-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/vc04_services

Re: [PATCH 50/50] staging: vchiq: Move vchiq.h into include directory

2020-06-25 Thread Nicolas Saenz Julienne
> diff --git a/drivers/staging/vc04_services/vchiq-mmal/Makefile > b/drivers/staging/vc04_services/vchiq-mmal/Makefile > index f8164c33aec3..b2a830f48acc 100644 > --- a/drivers/staging/vc04_services/vchiq-mmal/Makefile > +++ b/drivers/staging/vc04_services/vchiq-mmal/Makefile > @@ -5,4 +5,5 @@

Re: [PATCH v5 24/27] ARM: dts: bcm2711: Add firmware clocks node

2020-06-25 Thread Nicolas Saenz Julienne
On Mon, 2020-06-15 at 10:41 +0200, Maxime Ripard wrote: > Now that we have a clock driver for the clocks exposed by the firmware, > let's add the device tree nodes for it. > > Tested-by: Nicolas Saenz Julienne > Signed-off-by: Maxime Ripard > --- Applied for-next

Re: [PATCH 15/50] staging: vchi: Unify struct shim_service and struct vchi_service_handle

2020-06-24 Thread Nicolas Saenz Julienne
On Wed, 2020-06-24 at 17:11 +0300, Dan Carpenter wrote: > On Tue, Jun 23, 2020 at 06:42:01PM +0200, Nicolas Saenz Julienne wrote: > > @@ -437,12 +432,10 @@ static void service_free(struct shim_service *service) > > > > int32_t vchi_service_open(struct vchiq_instance *ins

<    1   2   3   4   5   6   7   8   9   10   >