[PATCH] staging: vchiq_arm: Improve error log for vchiq_platform_init

Umang Jain umang.jain at ideasonboard.com
Tue Jan 24 21:30:18 PST 2023


Hi Stefan,

Thank you for the patch

On 1/24/23 12:46 AM, Stefan Wahren wrote:
> 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 at i2se.com>

Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>

> ---
>   .../vc04_services/interface/vchiq_arm/vchiq_arm.c    | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> index 4a57ff760106..2ae1d3f5d500 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> @@ -546,9 +546,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)",




More information about the linux-rpi-kernel mailing list