Message ID | 20230102160852.3090202-1-vincent.whitchurch@axis.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4222876wrt; Mon, 2 Jan 2023 08:13:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXtlPLYkPdJIBj6VW/A8B9BykfPFe03UVkzjPndCQh27FIeHmdKUWM1hvQxWDkOo8n0uQCqf X-Received: by 2002:a05:6a20:2d0c:b0:b2:46c0:819b with SMTP id g12-20020a056a202d0c00b000b246c0819bmr12620107pzl.2.1672676002613; Mon, 02 Jan 2023 08:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672676002; cv=none; d=google.com; s=arc-20160816; b=Lalz9WLoL2kGbWOxulG/NEN9jELxgDUnsCYK5A4UIxuw9d3ecHZc9yN8zJRqhtakz9 dfgYE6VTIr6T110+Zj78n7cKd0MUghUBc1dKNFRVXsrtAXiYc2WTSD3GvWGnd73sMLS9 FqJ/CGnuZtZaBxNPoQYTmLiuf7cmKQIJeh5L/QpLdO52XkDSW4O3CKoLnNIqsrkOF4I+ FoKrZVGZnDMjE0Bl0EibAa9HdApKKBCqvdZgQI5Uj6aBLHW7496WvzRWVUuxIrjq3n+x Ut2pX+dlXZ8j2S50lViLoMutVnILX88F1ACGq0r5oXFk+T03Kfg3K3E0Qgq8TZEIK/RF +poA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=iP33hlrhB9wWueTXIDCyi4gTYEeLyDUJ0/Qk+A7NRVo=; b=W50x7uCwC08Pa9zmgZ10YVArcVVLkvuOSAISoxDjHEgPAAcJQiTe6+5rx+rzG/PUiY QPduz18E01FPVKKI8uasGq983+n1jpDbSY+MqgoKeHGek7dL7Pvqg/53UhPpR0LttfBB Of1nPkJ4u7LFZyDusZrFf3+KSrkweDrSGwoq8wl7SdDGgo33iNBZtzfz6AA14G6rHMXN utjT3/xKMfEPHWwRS2pxaNsPEAPl9fG5tIbzyCNlffBV5cpiUXkZNL2VrE1O0rYVzN8E aFKfAzKsE8TnZ8M0w4YrWSBFVGITxRhA9f59qreUEBrAVp6XVAPwkvP2RNaGo5sncC7e NevQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b="ThRqm/Su"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cp7-20020a170902e78700b00189feee4923si28119656plb.534.2023.01.02.08.13.10; Mon, 02 Jan 2023 08:13:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b="ThRqm/Su"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232976AbjABQJL (ORCPT <rfc822;yugsuo@gmail.com> + 99 others); Mon, 2 Jan 2023 11:09:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231589AbjABQJD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 2 Jan 2023 11:09:03 -0500 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F10DAE70; Mon, 2 Jan 2023 08:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1672675743; x=1704211743; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=iP33hlrhB9wWueTXIDCyi4gTYEeLyDUJ0/Qk+A7NRVo=; b=ThRqm/SuCUMbSwRqTWWqHzv0kDpO80NXkZFCL310FJN6n1QELNDfThVO O7NP90Me4RLU73oMJF4klw1PGHnWrY287jM1HV9Y34LUx4XRemzNWvHll LvqtWngXoMKl6U/rYxq2S6m6fPQXv2xci+X/LyhygcDBaamsWxD5aUc6e 1TwUt3bauRFOuIMdlfMwX4nR+xbZ/N9XBOwKuWSZ4WJFxUumXEBwr5LOn j5cRsg2TkTcpNc7hGIcf+dm7K1ADqSVUkiKdN2hCmfTRhvT3HYXeFwPq2 mI5PIBJdFQhBKdONnNPplaIYEbN4gVruI7GHpOC239LOPxHF9rDtb+G3C A==; From: Vincent Whitchurch <vincent.whitchurch@axis.com> To: Linus Walleij <linus.walleij@linaro.org>, Mark Brown <broonie@kernel.org> CC: <kernel@axis.com>, Vincent Whitchurch <vincent.whitchurch@axis.com>, <linux-arm-kernel@lists.infradead.org>, <linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org> 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753927912038713882?= X-GMAIL-MSGID: =?utf-8?q?1753927912038713882?= |
Series |
spi: pl022: Only use DT-specified DMA channels
|
|
Commit Message
Vincent Whitchurch
Jan. 2, 2023, 4:08 p.m. UTC
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 <vincent.whitchurch@axis.com>
---
drivers/spi/spi-pl022.c | 1 -
1 file changed, 1 deletion(-)
Comments
Hey Vincent, On 02/01/23 21:38, Vincent Whitchurch wrote: > 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. Yeah, I agree. > > 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 <vincent.whitchurch@axis.com> > --- Acked-by: Dhruva Gole <d-gole@ti.com> > 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");
On Mon, 02 Jan 2023 17:08:51 +0100, Vincent Whitchurch wrote: > 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. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi: pl022: Only use DT-specified DMA channels commit: dfce16722b9cb842a6f23500ee80b3d07b47bdd4 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
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");