From patchwork Mon Jan 2 16:08:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Whitchurch X-Patchwork-Id: 13086829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71031C3DA7A for ; Mon, 2 Jan 2023 16:15:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :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=aRr5CbB8TfxnFYlCMA8Q980utl4+QSsU66MWovag58s=; b=LDpTT16vxetM9a TnxRvj0FOdMrmsCrHvTyjsqg+yFnJGlxdXB2m//TfGOsKJIqWJf9ldcU1IDiUP6aZnU9AGf8BNHuY 9vrn0Lv8QDcTmmylK1F6YRDWP90pPCs5hokVn7agi7bTIWCc1L/DeIo1eHvpU4gCSWIG+0H2DIZtj 2A8YGawkvoUM/8pvAYPkaSgfE58Hya0+epilJnpcL+ua7GMtl7pAfVPjKJxPVOq2mQjZoMvoy3ag0 Ri7v+rKg4zgcyCyfdOnOYhmQBem+mbJSZjQEsJXSkE/Tv3uUAdQvQulRTfmLVV7+lG5hvpn7qQAdn dxZveCU7tBWBMHAcmY5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCNRw-00CeQa-Pa; Mon, 02 Jan 2023 16:14:09 +0000 Received: from smtp2.axis.com ([195.60.68.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCNN4-00Cbya-O2 for linux-arm-kernel@lists.infradead.org; Mon, 02 Jan 2023 16:09:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1672675747; x=1704211747; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=iP33hlrhB9wWueTXIDCyi4gTYEeLyDUJ0/Qk+A7NRVo=; b=Z+am8f0+dTDR/jiHMX8sylS+E11pmNgoNjAgjU7J2BUOtNqaIyipfhTz 6BevsJNdDhQ1IWgztfVq1CJ4aiSqL/9e9z0/D/ZpI6kUZwKFjN795cbZu z4hw7it/6V3d4+4b8T3H7e1J3+ZaM5x34ZXlE3sOOzB5bQmsXb8G/kqy+ 54dEcnPZl5ZU3dVT8GWkTgrZMhTxUVYX4trG3a87+FnbVNMurYuu2JsAC aXX9bmwR4kiEqddGGQeV6nHX2rymcRZSYz7BbbUq1bbWNgNlC8nkw1Aq+ NlWp8fmIwP2Ar831JZnRDcKZl/q65orOelLno1LtJx8T8i7dMmdoud43e A==; From: Vincent Whitchurch To: Linus Walleij , Mark Brown CC: , Vincent Whitchurch , , , Subject: [PATCH] spi: pl022: Only use DT-specified DMA channels Date: Mon, 2 Jan 2023 17:08:51 +0100 Message-ID: <20230102160852.3090202-1-vincent.whitchurch@axis.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230102_080907_329086_7B26879D X-CRM114-Status: GOOD ( 10.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When a platform is booted with devicetree and does not provide a platform data structure, the driver creates one internally. enable_dma should not be set in this structure when creating it; the probe function will set it later if DMA channels are specified via the devicetree. Setting enable_dma = 1 when creating this internal platform data can lead to pl022_dma_probe() finding bogus DMA channels (since there is no channel filter specified) when no DMA channels are specified in the devicetree. Signed-off-by: Vincent Whitchurch Acked-by: Dhruva Gole --- drivers/spi/spi-pl022.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index e4484ace584e..a17ff839117f 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2091,7 +2091,6 @@ pl022_platform_data_dt_get(struct device *dev) return NULL; pd->bus_id = -1; - pd->enable_dma = 1; of_property_read_u32(np, "pl022,autosuspend-delay", &pd->autosuspend_delay); pd->rt = of_property_read_bool(np, "pl022,rt");