Skip to content
Commit ab47d0bf authored by Conor Dooley's avatar Conor Dooley Committed by Jassi Brar
Browse files

mailbox: mpfs: read the system controller's status



Some services explicitly return an error code in their response, but
others rely on the system controller to set a status in its status
register. The meaning of the bits varies based on what service is
requested, so pass it back up to the driver that requested the service
in the first place. The field in the message struct already existed, but
was unused until now.

If the system controller is busy, in which case we should never actually
be in the interrupt handler, or if the service fails the mailbox itself
should not be read. Callers should check the status before operating on
the response.

There's an existing, but unused, #define for the mailbox mask - but it
was incorrect. It was doing a GENMASK_ULL(32, 16) which should've just
been a GENMASK(31, 16), so fix that up and start using it.

Fixes: 83d7b156 ("mbox: add polarfire soc system controller mailbox")
Signed-off-by: default avatarConor Dooley <conor.dooley@microchip.com>
Reviewed-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 926d6214
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment