staging: vchiq_arm: Improve error log for vchiq_platform_init

During sending the base address of the slots to the VideoCore
firmware via mailbox property, issues could happened on the ARM
and on the VideoCore side. So better separate the error handling
in order to provide more details. This should help to narrow
down the possible cause.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230123191629.21019-1-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Stefan Wahren
2023-01-23 20:16:29 +01:00
committed by Greg Kroah-Hartman
parent cfe635af8a
commit f9a8a19230

View File

@@ -541,9 +541,15 @@ int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
channelbase = slot_phys;
err = rpi_firmware_property(fw, RPI_FIRMWARE_VCHIQ_INIT,
&channelbase, sizeof(channelbase));
if (err || channelbase) {
dev_err(dev, "failed to set channelbase\n");
return err ? : -ENXIO;
if (err) {
dev_err(dev, "failed to send firmware property: %d\n", err);
return err;
}
if (channelbase) {
dev_err(dev, "failed to set channelbase (response: %x)\n",
channelbase);
return -ENXIO;
}
vchiq_log_info(vchiq_arm_log_level, "vchiq_init - done (slots %pK, phys %pad)",