mbox series

[0/3] MPFS mailbox fixes

Message ID 20220805125618.733628-1-conor.dooley@microchip.com
Headers show
Series MPFS mailbox fixes | expand

Message

Conor Dooley Aug. 5, 2022, 12:56 p.m. UTC
Hey all,

I spotted a couple of bugs in my mailbox driver while developing some
new features. None of the features these bugs relate to were in use so
they've gone unnoticed until now. The binding screwup is unfortunate
and I don't really know how I misread the register map so badly.

Jassi:
Not sure if you prefer developers to add a CC: stable or not to patches
so I have left them out, but I would like to see them backported.

Thanks,
Conor.

Conor Dooley (3):
  dt-bindings: mailbox: fix the mpfs' reg property
  mailbox: mpfs: fix handling of the reg property
  mailbox: mpfs: account for mbox offsets while sending

 .../mailbox/microchip,mpfs-mailbox.yaml       | 15 ++++++++---
 drivers/mailbox/mailbox-mpfs.c                | 25 +++++++++++--------
 2 files changed, 25 insertions(+), 15 deletions(-)

Comments

Conor Dooley Aug. 5, 2022, 1:01 p.m. UTC | #1
On 05/08/2022 13:56, Conor Dooley wrote:
> The "data" region of the PolarFire SoC's system controller mailbox is
> not one continuous register space - the system controller's QSPI sits
> between the control and data registers. Split the "data" reg into two
> parts: "data" & "control".
> 
> Fixes: 213556235526 ("dt-bindings: soc/microchip: update syscontroller compatibles")

I omitted the second fixes tag:
Fixes: ed9543d6f2c4 ("dt-bindings: add bindings for polarfire soc mailbox")

> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
>   .../bindings/mailbox/microchip,mpfs-mailbox.yaml  | 15 +++++++++++----
>   1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/microchip,mpfs-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/microchip,mpfs-mailbox.yaml
> index 082d397d3e89..935937c67133 100644
> --- a/Documentation/devicetree/bindings/mailbox/microchip,mpfs-mailbox.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/microchip,mpfs-mailbox.yaml
> @@ -14,9 +14,15 @@ properties:
>       const: microchip,mpfs-mailbox
>   
>     reg:
> -    items:
> -      - description: mailbox data registers
> -      - description: mailbox interrupt registers
> +    oneOf:
> +      - items:
> +          - description: mailbox control & data registers
> +          - description: mailbox interrupt registers
> +        deprecated: true
> +      - items:
> +          - description: mailbox control registers
> +          - description: mailbox interrupt registers
> +          - description: mailbox data registers
>   
>     interrupts:
>       maxItems: 1
> @@ -39,7 +45,8 @@ examples:
>         #size-cells = <2>;
>         mbox: mailbox@37020000 {
>           compatible = "microchip,mpfs-mailbox";
> -        reg = <0x0 0x37020000 0x0 0x1000>, <0x0 0x2000318c 0x0 0x40>;
> +        reg = <0x0 0x37020000 0x0 0x58>, <0x0 0x2000318C 0x0 0x40>,
> +              <0x0 0x37020800 0x0 0x100>;
>           interrupt-parent = <&L1>;
>           interrupts = <96>;
>           #mbox-cells = <1>;