On Tue, 2 Jun 2026 at 07:34, Kuan-Jui Chiu <[email protected]> wrote:
>
> This patch add a new model for Axiado SD host controller which is compatible
> with SDHCI 3.0 spec
>
> This device model also includes a eMMC PHY which helps to control SD/eMMC
>
> Signed-off-by: Kuan-Jui Chiu <[email protected]>

> +static void axiado_sdhci_realize(DeviceState *dev, Error **errp)
> +{
> +    AxiadoSDHCIState *s = AXIADO_SDHCI(dev);
> +    SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
> +    SysBusDevice *sdhci_sbd;
> +
> +    qdev_prop_set_uint64(DEVICE(&s->sdhci), "capareg", 0x216737eed0b0);
> +    qdev_prop_set_uint64(DEVICE(&s->sdhci), "sd-spec-version", 3);
> +
> +    sdhci_sbd = SYS_BUS_DEVICE(&s->sdhci);
> +    sysbus_realize(sdhci_sbd, errp);
> +    if (*errp) {
> +        return;
> +    }

You need an "ERRP_GUARD();" line at the top of this function,
because otherwise errp can be NULL here. (There's a long comment
in include/qapi/error.h that discusses the various ways of
handling Error objects and the standard patterns to use.)

Otherwise
Reviewed-by: Peter Maydell <[email protected]>

thanks
-- PMM

Reply via email to