From patchwork Wed Sep 12 15:27:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 10597789 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 599D914E0 for ; Wed, 12 Sep 2018 15:28:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 099102A49A for ; Wed, 12 Sep 2018 15:28:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1C4D2A4B0; Wed, 12 Sep 2018 15:27:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 40D362A49A for ; Wed, 12 Sep 2018 15:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=7onRwrx2vOLu4H1aa609SHiCYqryemIedmEaBZWrf/8=; b=Fz8 x9+eb7ydfnObFyUB9xdoJEHRwn+4DvH5aJZS+tFoIxjgvmz0gML73iaiXJ0TyuxVTiDRV3MrqdpJy JzuaU7M+DNM2BwognLvuAonx2DvzHPF8KHK8W4Mft1NxnLgIa9H6EhoLFmOebw6LUyt8sNAIe70jV 5x/PKrvYpx8HawlzVpmAga+qW5d2pZpvGo3pwtSGTyUBvwleNYemIWYPDp9UOnXg+p19ssLm2z+fv Wn4RMxV+ivRPdePNSrS/euTYbeYOCfl5dYHTrPMwvO9UmfncaSkpbl4FlBRlLliDdjKx2Y9aiSzgz WQGweqGxTK91YLWSoVEcOGc7NxtcxEg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g073Q-0003Cm-OX; Wed, 12 Sep 2018 15:27:44 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g0732-0002n0-E6 for linux-arm-kernel@lists.infradead.org; Wed, 12 Sep 2018 15:27:36 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7] helo=dude.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1g072l-0008JV-Cs; Wed, 12 Sep 2018 17:27:03 +0200 From: Lucas Stach To: Shawn Guo Subject: [PATCH] soc: imx: gpc: set DMA mask for PD platform devices Date: Wed, 12 Sep 2018 17:27:02 +0200 Message-Id: <20180912152702.14640-1-l.stach@pengutronix.de> X-Mailer: git-send-email 2.18.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180912_082720_670160_BF8D17D1 X-CRM114-Status: GOOD ( 11.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , patchwork-lst@pengutronix.de, NXP Linux Team , linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The PD platform devices aren't DMA capable (as is correctly reflected in with a zero mask coherent_dma_mask). As they have a of_node attached they will go through of_dma_configure, which will warn if it finds an uninitialized DMA mask. Let the driver core know that this isn't a missing configuration, but a non DMA capable device by pointing the dma_mask to the coherent_dma_mask. Signed-off-by: Lucas Stach Tested-by: Fabio Estevam --- Since the warning that is triggered with the incomplete configuration has been introduced in the v4.19 cycle, it would nice to get this in as a fix. --- drivers/soc/imx/gpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c index f301fcd96c07..a897c851f305 100644 --- a/drivers/soc/imx/gpc.c +++ b/drivers/soc/imx/gpc.c @@ -493,6 +493,7 @@ static int imx_gpc_probe(struct platform_device *pdev) pd_pdev->dev.parent = &pdev->dev; pd_pdev->dev.of_node = np; + pd_pdev->dev.dma_mask = &pd_pdev->dev.coherent_dma_mask; ret = platform_device_add(pd_pdev); if (ret) {