diff options
author | Conor Dooley <conor.dooley@microchip.com> | 2022-11-23 17:56:52 +0000 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2022-12-18 20:40:30 -0600 |
commit | ab47d0bfdf88faac0eb02749e5bfaa306e004300 (patch) | |
tree | 9aa423c19d5fe210a2302eb32ae2edacea857214 /include | |
parent | 926d6214f66955f0c066175127cbcf2eaae5ad6b (diff) |
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: 83d7b1560810 ("mbox: add polarfire soc system controller mailbox")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions