[PATCH] soc: imx: gpcv2: allow to disable individual power domains
Tim Harvey
tharvey at gateworks.com
Sun Oct 3 09:49:18 PDT 2021
On Sat, Oct 2, 2021 at 5:48 AM Lucas Stach <l.stach at pengutronix.de> wrote:
>
> Some board designs don't supply power to all of the power domains,
> as they are not used anyways. In that case we must make sure to
> not touch those power domains at all, as trying to power up a
> domain that has no power supplied to it will obviously end in a
> system crash. Allow to disable those domains via the standard DT
> status property.
>
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> ---
> drivers/soc/imx/gpcv2.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> index 811e9d29a079..b8d52d8d29db 100644
> --- a/drivers/soc/imx/gpcv2.c
> +++ b/drivers/soc/imx/gpcv2.c
> @@ -1035,6 +1035,9 @@ static int imx_gpcv2_probe(struct platform_device *pdev)
> struct imx_pgc_domain *domain;
> u32 domain_index;
>
> + if (!of_device_is_available(np))
> + continue;
> +
> ret = of_property_read_u32(np, "reg", &domain_index);
> if (ret) {
> dev_err(dev, "Failed to read 'reg' property\n");
> --
> 2.30.2
>
Thanks Lucas, this resolves the issue I have with the
imx8mm-venice-gw7901 and blk-ctl.
Reviewed-By: Tim Harvey <tharvey at gateworks.com>
Tested-By: Tim Harvey <tharvey at gateworks.com>
Tested on an imx8mm-venice-gw7901 with v5 blk-ctl series [1]
Best regards,
Tim
[1] https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=556563
More information about the linux-arm-kernel
mailing list