Re: [PATCH 03/50] staging: mmal-vchiq: Avoid use of bool in structures

2020-06-24 Thread Nicolas Saenz Julienne
On Tue, 2020-06-23 at 15:11 -0700, Joe Perches wrote: > On Tue, 2020-06-23 at 18:41 +0200, Nicolas Saenz Julienne wrote: > > From: Dave Stevenson > > > > Fixes up a checkpatch error "Avoid using bool structure members > > because of possible alignment issues

[PATCH 04/50] staging: mmal-vchiq: Make timeout a defined parameter

2020-06-23 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 09/50] staging: mmal-vchiq: If the VPU returns an error, don't negate it

2020-06-23 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 05/50] staging: mmal-vchiq: Make a mmal_buf struct for passing parameters

2020-06-23 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 08/50] staging: mmal-vchiq: Always return the param size from param_get

2020-06-23 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 07/50] staging: mmal-vchiq: Fix client_component for 64 bit kernel

2020-06-23 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 03/50] staging: mmal-vchiq: Avoid use of bool in structures

2020-06-23 Thread Nicolas Saenz Julienne
From: Dave Stevenson Fixes up a checkpatch error "Avoid using bool structure members because of possible alignment issues". 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

[PATCH 10/50] staging: mmal-vchiq: Fix formatting errors in mmal_parameters.h

2020-06-23 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 00/50] staging: vchiq: Getting rid of the vchi/vchiq split

2020-06-23 Thread Nicolas Saenz Julienne
camera 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 staging: vchi: Get rid of vchi_msg_peek() staging: vchi: Get rid of struct vchi_instance_handle staging: vchi

[PATCH 16/50] staging: vc04_services: bcm2835-audio: Use vchi_msg_hold()

2020-06-23 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 11/50] staging: vchiq_arm: Add a matching unregister call

2020-06-23 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 15/50] staging: vchi: Unify struct shim_service and struct vchi_service_handle

2020-06-23 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 --- .../bcm2835-audio/bcm2835-vchiq.c | 24 +++ .../vc04_services/interface/vchi/vchi.h | 27 .../interface/vchiq_arm

[PATCH 13/50] staging: vchi: Get rid of vchi_msg_peek()

2020-06-23 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 14/50] staging: vchi: Get rid of struct vchi_instance_handle

2020-06-23 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 17/50] staging: vchi: Get rid of vchi_msg_dequeue()

2020-06-23 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 29/50] staging: vchiq: Export vchiq_get_service_userdata()

2020-06-23 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 18/50] staging: vchi_common: Get rid of all unused definitions

2020-06-23 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 23/50] staging: vchi: Use vchiq's enum vchiq_reason

2020-06-23 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 21/50] staging: vchi: Get rid of flags argument in vchi_msg_hold()

2020-06-23 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 20/50] staging: vc04_services: Get rid of vchi_cfg.h

2020-06-23 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 27/50] staging: vchiq: Get rid of vchiq_util.h

2020-06-23 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 28/50] staging: vchi: Expose struct vchi_service

2020-06-23 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 22/50] staging: vchi: Use enum vchiq_bulk_mode instead of vchi's transmission flags

2020-06-23 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 34/50] staging: vchi: Get rid of struct vchi_service

2020-06-23 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 32/50] staging: vchiq: Don't use a typedef for vchiq_callback

2020-06-23 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 33/50] staging: vchi: Use struct vchiq_service_params

2020-06-23 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 25/50] staging: vchiq: Introduce vchiq_validate_params()

2020-06-23 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 31/50] staging: vchi: Get rid of vchiq_shim's message callback

2020-06-23 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 30/50] staging: vchiq: Export vchiq_msg_queue_push

2020-06-23 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 39/50] staging: vchi: Don't include vchiq_core.h

2020-06-23 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 38/50] staging: vchi: Get rid of struct vchiq_instance forward declaration

2020-06-23 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 46/50] staging: vchiq: Get rid of vchi

2020-06-23 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 48/50] staging: vchiq: Use vchiq.h as the main header file for services

2020-06-23 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 49/50] staging: vchiq: Move defines into core header

2020-06-23 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 41/50] staging: vchiq: Make vchiq_add_service() local

2020-06-23 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 43/50] staging: vchi: Get rid of vchi_bulk_queue_receive()

2020-06-23 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 35/50] staging: vchiq: Pass vchiq's message when holding a message

2020-06-23 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 37/50] staging: vchiq: Unify fourcc definition mechanisms

2020-06-23 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 26/50] staging: vchiq: Move message queue into struct vchiq_service

2020-06-23 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 40/50] staging: vchiq: Get rid of unnecessary definitions in vchiq_if.h

2020-06-23 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 47/50] staging: vchiq: Move conditional barrier definition into vchiq_core.h

2020-06-23 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 36/50] staging: vchi: Rework vchi_msg_hold() to match vchiq_msg_hold()

2020-06-23 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 44/50] staging: vchi: Get rid of vchi_bulk_queue_transmit()

2020-06-23 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 01/50] staging: bcm2835: Break MMAL support out from camera

2020-06-23 Thread Nicolas Saenz Julienne
for the ISP driver to use it as well. The only modification to the existing mmal code is the introduction of EXPORT_SYMBOL() for symbols required by bcm2835-camera and the addition of the module author and licenses. Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne --- drivers

[PATCH 42/50] staging: vchiq: Move definitions only used by core into core header

2020-06-23 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 50/50] staging: vchiq: Move vchiq.h into include directory

2020-06-23 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 --- drivers/staging/vc04_services/Makefile| 2 +- drivers

[PATCH 45/50] staging: vchi: Move vchi_queue_kernel_message() into vchiq

2020-06-23 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 12/50] staging: vchi: Get rid of all useless callback reasons

2020-06-23 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 06/50] staging: mmal-vchiq: Fixup vchiq-mmal include ordering

2020-06-23 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 02/50] staging: mmal-vchiq: Allocate and free components as required

2020-06-23 Thread Nicolas Saenz Julienne
From: Dave Stevenson The existing code assumed that there would only ever be 4 components, and never freed the entries once used. Allow arbitrary creation and destruction of components. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne

[PATCH 24/50] staging: vchi: Get rid of effect less expression

2020-06-23 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

[PATCH 19/50] staging: vchi: Get rid of unnecessary defines

2020-06-23 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

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

2020-06-22 Thread Nicolas Saenz Julienne
Hi Andy, On Mon, 2020-06-22 at 17:44 +0300, Andy Shevchenko wrote: > On Mon, Jun 22, 2020 at 5:26 PM Nicolas Saenz Julienne > wrote: > > This reverts commit c65822fef4adc0ba40c37a47337376ce75f7a7bc. > > > > The initialization of Raspberry Pi 4's USB chip is now han

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

2020-06-22 Thread Nicolas Saenz Julienne
Hi Andy, On Mon, 2020-06-22 at 17:42 +0300, Andy Shevchenko wrote: > On Mon, Jun 22, 2020 at 5:26 PM Nicolas Saenz Julienne > wrote: > > Raspberry Pi 4's co-processor controls some of the board's HW > > initialization process, but it's up to Linux to trigger it when >

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

2020-06-22 Thread Nicolas Saenz Julienne
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: bcm2711: Add reset controller to xHCI node usb: xhci-pci: Add support for reset

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

2020-06-22 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 v4 1/9] dt-bindings: reset: Add a binding for the RPi Firmware reset controller

2020-06-22 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 v4 7/9] usb: host: pci-quirks: Bypass xHCI quirks for Raspberry Pi 4

2020-06-22 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 v4 2/9] reset: Add Raspberry Pi 4 firmware reset controller

2020-06-22 Thread Nicolas Saenz Julienne
-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli Reviewed-by: Philipp Zabel --- Changes since v2: - Get ids from dt-binding Changes since v1: - Make the whole driver less USB centric as per Florian's comments drivers/reset/Kconfig | 11 +++ drivers/reset/Makefile

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

2020-06-22 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 v4 5/9] usb: xhci-pci: Add support for reset controllers

2020-06-22 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 v4 3/9] ARM: dts: bcm2711: Add firmware usb reset node

2020-06-22 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/dts

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

2020-06-22 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 trough a pci quirk. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli

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

2020-06-22 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 v5 00/27] clk: bcm: rpi: Add support for BCM2711 firmware clocks

2020-06-19 Thread Nicolas Saenz Julienne
On Fri, 2020-06-19 at 02:37 -0700, Stephen Boyd wrote: > Quoting Maxime Ripard (2020-06-15 01:40:40) > > Hi, > > > > Since the whole DRM/HDMI support began to grow fairly big, I've chosen > > to split away the two discussions between the firmware clocks and the > > HDMI support. > > > > Let me

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

2020-06-17 Thread Nicolas Saenz Julienne
Hi All, On Fri, 2020-06-12 at 19:13 +0200, Nicolas Saenz Julienne wrote: > 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 > in

Re: [PATCH v4 4/5] dm: pci: Assign controller device node to root bridge

2020-06-17 Thread Nicolas Saenz Julienne
On Tue, 2020-06-16 at 17:31 -0600, Simon Glass wrote: > Hi Nicolas, > > On Tue, 16 Jun 2020 at 08:09, Nicolas Saenz Julienne > wrote: > > On Tue, 2020-06-16 at 07:43 -0600, Simon Glass wrote: > > > Hi Nicolas, > > > > > > On Fri, 12 Jun 2020

[GIT PULL 1/1] bcm2835-drivers-fixes-2020-0-17

2020-06-17 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-drivers-fixes-2020-0-17 for you to

Re: [PATCH v1] ARM: bcm2835: Fix integer overflow in rpi_firmware_print_firmware_revision()

2020-06-17 Thread Nicolas Saenz Julienne
iable > of time64_t type to correctly handle lesser types. > > Fixes: 4a60f58ee002 ("ARM: bcm2835: Switch to use %ptT") > Reported-by: Stefan Wahren > Reported-by: Nicolas Saenz Julienne > Signed-off-by: Andy Shevchenko > Cc: Petr Mladek > Cc: Steven Roste

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

2020-06-17 Thread Nicolas Saenz Julienne
On Wed, 2020-06-17 at 12:02 +0200, Philipp Zabel wrote: > Hi Nicolas, > > On Fri, 2020-06-12 at 19:13 +0200, Nicolas Saenz Julienne wrote: > > Raspberry Pi 4's co-processor controls some of the board's HW > > initialization process, but it's up to Linux to trigger it when &g

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

2020-06-17 Thread Nicolas Saenz Julienne
Hi, On Wed, 2020-06-17 at 11:55 +0200, Philipp Zabel wrote: > Hi Nicolas, > > On Fri, 2020-06-12 at 19:13 +0200, Nicolas Saenz Julienne wrote: > > The firmware running on the RPi VideoCore can be used to reset and > > initialize HW controlled by the firmware. > >

Re: [PATCH v1] ARM: bcm2835: Fix integer overflow in rpi_firmware_print_firmware_revision()

2020-06-16 Thread Nicolas Saenz Julienne
iable > of time64_t type to correctly handle lesser types. > > Fixes: 4a60f58ee002 ("ARM: bcm2835: Switch to use %ptT") > Reported-by: Stefan Wahren > Reported-by: Nicolas Saenz Julienne > Signed-off-by: Andy Shevchenko > Cc: Petr Mladek > Cc: Steven Rostedt

Re: [PATCH v3 2/3] ARM: bcm2835: Switch to use %ptT

2020-06-16 Thread Nicolas Saenz Julienne
On Tue, 2020-06-16 at 19:13 +0300, Andy Shevchenko wrote: > On Tue, Jun 16, 2020 at 05:53:23PM +0200, Nicolas Saenz Julienne wrote: > > On Wed, 2020-04-15 at 20:00 +0300, Andy Shevchenko wrote: > > > Use %ptT instead of open coded variant to print content of > > > time

Re: [PATCH v3 2/3] ARM: bcm2835: Switch to use %ptT

2020-06-16 Thread Nicolas Saenz Julienne
Hi, On Wed, 2020-04-15 at 20:00 +0300, Andy Shevchenko wrote: > Use %ptT instead of open coded variant to print content of > time64_t type in human readable format. > > Signed-off-by: Andy Shevchenko > --- as originally reported by Stefan Wahren, this patch is likely to be the cause for a

Re: [PATCH v4 4/5] dm: pci: Assign controller device node to root bridge

2020-06-16 Thread Nicolas Saenz Julienne
On Tue, 2020-06-16 at 07:43 -0600, Simon Glass wrote: > Hi Nicolas, > > On Fri, 12 Jun 2020 at 10:47, Nicolas Saenz Julienne > wrote: > > There is no distinction in DT between the PCI controller device and the > > root bridge, whereas such distinction exists from dm's pe

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

2020-06-15 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 > --- I can take this patch, but I guess the rest should go trough the clock tree. Is it OK with you? Regards, Nicolas signature.asc

Re: [PATCH v4 2/3] clk: bcm: Add BCM2711 DVP driver

2020-06-15 Thread Nicolas Saenz Julienne
e > Cc: Stephen Boyd > Cc: Rob Herring > Cc: linux-...@vger.kernel.org > Cc: devicet...@vger.kernel.org > Reviewed-by: Stephen Boyd > Signed-off-by: Maxime Ripard > --- Reviewed-by: Nicolas Saenz Julienne Regards, Nicolas signature.asc Description: This is a digitally signed message part

Re: [PATCH v4 5/5] usb: xhci-pci: Add reset controller support

2020-06-15 Thread Nicolas Saenz Julienne
On Fri, 2020-06-12 at 19:08 +0200, Marek Vasut wrote: > On 6/12/20 6:46 PM, Nicolas Saenz Julienne wrote: > > 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 ava

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

2020-06-12 Thread Nicolas Saenz Julienne
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: bcm2711: Add reset

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

2020-06-12 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 v3 5/9] usb: xhci-pci: Add support for reset controllers

2020-06-12 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 --- Changes since v2: - Also reset on resume Changes

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

2020-06-12 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 v3 6/9] Revert "USB: pci-quirks: Add Raspberry Pi 4 quirk"

2020-06-12 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 trough a pci quirk. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli

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

2020-06-12 Thread Nicolas Saenz Julienne
-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli --- Changes since v2: - Get ids from dt-binding Changes since v1: - Make the whole driver less USB centric as per Florian's comments drivers/reset/Kconfig | 11 +++ drivers/reset/Makefile| 1 + drivers/reset

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

2020-06-12 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

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

2020-06-12 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 Reviewed

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

2020-06-12 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

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

2020-06-12 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/dts

[PATCH v4 2/5] reset: Add Raspberry Pi 4 firmware reset controller

2020-06-12 Thread Nicolas Saenz Julienne
-by: Nicolas Saenz Julienne --- drivers/reset/Kconfig | 10 drivers/reset/Makefile| 1 + drivers/reset/reset-raspberrypi.c | 60 +++ .../reset/raspberrypi,firmware-reset.h| 13 4 files changed, 84 insertions

[PATCH v4 3/5] configs: Enable support for reset controllers on RPi4

2020-06-12 Thread Nicolas Saenz Julienne
This is required in order to access the reset controller used to initialize the board's xHCI chip. Signed-off-by: Nicolas Saenz Julienne --- configs/rpi_4_32b_defconfig | 1 + configs/rpi_4_defconfig | 1 + configs/rpi_arm64_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git

[PATCH v4 5/5] usb: xhci-pci: Add reset controller support

2020-06-12 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 --- drivers/usb/host/xhci-pci.c | 38

[PATCH v4 1/5] arm: rpi: Add function to trigger VL805's firmware load

2020-06-12 Thread Nicolas Saenz Julienne
Saenz Julienne --- Changes since v1: - Rename function so it's not mistaken with regular firmware loading --- arch/arm/mach-bcm283x/include/mach/mbox.h | 13 +++ arch/arm/mach-bcm283x/include/mach/msg.h | 7 arch/arm/mach-bcm283x/msg.c | 46 +++ 3 files

[PATCH v4 4/5] dm: pci: Assign controller device node to root bridge

2020-06-12 Thread Nicolas Saenz Julienne
er than expected. Signed-off-by: Nicolas Saenz Julienne --- drivers/pci/pci-uclass.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 9ab3539a49..ea27e78465 100644 --- a/drivers/pci/pci-uclass.c +++ b

[PATCH v4 0/5] usb: xhci: Load Raspberry Pi 4 VL805's firmware

2020-06-12 Thread Nicolas Saenz Julienne
kernel.org/patch/11596409/ --- Changes since v3: - Use reset controller Changes since v2: - Correct comment on patch #1 - Address Matthias' comments Changes since v1: - Rename function - Use callback in xhci-pci.c Nicolas Saenz Julienne (5): arm: rpi: Add function to trigger VL805's fir

Re: [PATCH v4 00/27] clk: bcm: rpi: Add support for BCM2711 firmware clocks

2020-06-11 Thread Nicolas Saenz Julienne
; With patch #25 manually fixed, the series is: Tested-by: Nicolas Saenz Julienne Regards, Nicolas signature.asc Description: This is a digitally signed message part

Re: [PATCH v4 27/27] clk: bcm: rpi: Remove the quirks for the CPU clock

2020-06-11 Thread Nicolas Saenz Julienne
: Maxime Ripard > --- Acked-by: Nicolas Saenz Julienne Regards, Nicolas signature.asc Description: This is a digitally signed message part

Re: [PATCH v4 26/27] clk: bcm2835: Don't cache the PLLB rate

2020-06-11 Thread Nicolas Saenz Julienne
On Thu, 2020-06-11 at 09:32 +0200, Maxime Ripard wrote: > The PLLB rate will be changed through the firmware clocks drivers and will > change behind this drivers' back, so we don't want to cache the rate. > > Signed-off-by: Maxime Ripard > --- Thanks! Acked-by: Nicolas Saenz Jul

Re: [PATCH v4 23/27] Revert "clk: bcm2835: remove pllb"

2020-06-11 Thread Nicolas Saenz Julienne
properly, so having that clock in the MMIO driver will allow that. > > Signed-off-by: Maxime Ripard > --- Acked-by: Nicolas Saenz Julienne Regards, Nicolas signature.asc Description: This is a digitally signed message part

Re: [PATCH v4 21/27] clk: bcm: rpi: Discover the firmware clocks

2020-06-11 Thread Nicolas Saenz Julienne
: linux-...@vger.kernel.org > Reviewed-by: Stephen Boyd > Signed-off-by: Maxime Ripard > --- Acked-by: Nicolas Saenz Julienne Regards, Nicolas signature.asc Description: This is a digitally signed message part

Re: [PATCH v4 25/27] clk: bcm2835: Allow custom CCF flags for the PLLs

2020-06-11 Thread Nicolas Saenz Julienne
ct clk_hw *bcm2835_register_pll(struct > bcm2835_cprman *cprman, > init.num_parents = 1; > init.name = pll_data->name; > init.ops = _pll_clk_ops; > - init.flags = CLK_IGNORE_UNUSED; > + init.flags = data->flags | CLK_IGNORE_UNUSED; This should be 'p

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