From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iPlxx-00055j-HX for barebox@lists.infradead.org; Wed, 30 Oct 2019 11:16:42 +0000 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1iPlxw-0004O5-1u for barebox@lists.infradead.org; Wed, 30 Oct 2019 12:16:40 +0100 From: Lucas Stach Date: Wed, 30 Oct 2019 12:16:39 +0100 Message-Id: <20191030111640.12367-1-l.stach@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/2] soc: imx: gpcv2: skip registering devices for unavailable power domains To: barebox@lists.infradead.org Allows to disable domains in the DT, as we don't need all of them in Barebox. Signed-off-by: Lucas Stach --- drivers/soc/imx/gpcv2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index bc373ecf40cc..7d33e8297829 100644 --- a/drivers/soc/imx/gpcv2.c +++ b/drivers/soc/imx/gpcv2.c @@ -449,6 +449,10 @@ static int imx_gpcv2_probe(struct device_d *dev) struct device_d *pd_dev; 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.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox