mailbox: mpfs: fix handling of the reg property
authorConor Dooley <conor.dooley@microchip.com>
Wed, 24 Aug 2022 07:08:11 +0000 (08:08 +0100)
committerJassi Brar <jaswinder.singh@linaro.org>
Thu, 6 Oct 2022 02:48:31 +0000 (21:48 -0500)
commit2e10289d1f304f5082a4dda55a677b72b3bdb581
tree056d8357957bd26abbe23522390c89d27d203393
parent6e2bdf7dc3c817dd91d84adb306a5dfab999c309
mailbox: mpfs: fix handling of the reg property

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". Optionally get the "data" register address
from the 3rd reg property in the devicetree & fall back to using the
old base + MAILBOX_REG_OFFSET that the current code uses.

Fixes: 83d7b1560810 ("mbox: add polarfire soc system controller mailbox")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/mailbox-mpfs.c