From patchwork Mon Nov 15 08:53:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519136 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5344966imj; Mon, 15 Nov 2021 00:54:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5AbOW3hXZs+uiRGYx7gObYvi1XouXP1vQWT8RUPmQheKmuvA5acfIn0sRnL6nc5ZCiFO2 X-Received: by 2002:a65:530d:: with SMTP id m13mr23487587pgq.128.1636966496730; Mon, 15 Nov 2021 00:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966496; cv=none; d=google.com; s=arc-20160816; b=HrFtWBNeTWa6uAGUHjXDO1tIU7vJpFNkjdTrQNT8QCc+6AxHN8/LD0xHFytnDEwsnW RaQ6bDz2Sb9WC3imKr6/o6H7nUtAe2tJmxIQhe3O6XK3BztcDul7aK2Psf0SQo7eZT/K E9DQh0GGRNcpafxrHBuey11bCPm4EB1atHdrGYTEgLKXmgH8RXd/Q8itAw9MajcxVzwr S8JaYiYlEc7pXhJ9o6AY1J1i6xYwcX1J2pTmUbYIJZRuvJrJgRk+1q1wujpsPdUd/a3Q kWsPlh/+Lug3rRzMw9lEd7dZLjl0GDO5M8YO2w6G1ZJy0EUi5aTK5ExT9ykp4BnWepNc nDSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=Zwv0PoVXp7+dtzQrtfPXiUiBi2HDy7bjWoxoSl9Jvyk=; b=o+Y0oDP1IaO5BnQLHQ5f6yaZH1n3upXVlViB+Nz06pmWId34dvQusyE4gCF0rts+gj UsajvtwF3cZgAEm8wF7tmmTEyH9EuPxVBlIFJeXE/9N962qgh6it0rAiOHR3TnjzNPAB 2bJxYHs96GxxSCdsPuF6DyrsiV5HF6JWIqm49Zm0dEWwCCZ+c8ZBf5/ooXSL3Yyk+Vf4 nrrtjXxQsymwnXCp5LstGHSUkREI6IxRMgrp6SbK84iJtSpiAgWJ4zezpQhyqihMU4qC npTD7MZK5x1r7lLMy+uPBpHAYdI1mvgKHlei5wJnu344LoDDRkZLAyVnOtywptlewoc/ uSGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=YpPwnQ+Z; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id p10si22778537pld.73.2021.11.15.00.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:54:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=YpPwnQ+Z; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B0D36E92A; Mon, 15 Nov 2021 08:54:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5E5906E92A for ; Mon, 15 Nov 2021 08:54:53 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 1F29161BF5; Mon, 15 Nov 2021 08:54:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966493; bh=wn57j1S+OVDPjchxqdayqaIicCxtINUEg6GRzjIlw5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YpPwnQ+ZywWiftbIGbvSME2DSkHoKYPFuU4+pHFPnVCL6fAFGd6mYmtgljVBSkmRJ pW1JZbsvnPgbWG3BIB1WxilpINGEKjCw9qhXl3qcYTQJs2ryMXJDzUYFTmV+bJ9clv 93VV93b94yY9B4TxZ7B7hXK8AU350k/nQ0LP+ecDwB1REeriP9jE3UDWkfZnuLaeVM cjhwo1GJ6NlZbpRmqItwSJjTxt9iFUH4XKy1kf5swVCl5yYiAgReOUL0BXKR3AN91G tnDG8UAkjd/mH7+NAsriu0rVVog9i3scmEbYwpdOQPUe3HixNhQXEB6g/mtLNh/erJ SzxSnZNolHWtg== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 01/11] ASoC: dai_dma: remove slave_id field Date: Mon, 15 Nov 2021 09:53:53 +0100 Message-Id: <20211115085403.360194-2-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann This field is never set, and serves no purpose, so remove it. Signed-off-by: Arnd Bergmann --- include/sound/dmaengine_pcm.h | 2 -- sound/core/pcm_dmaengine.c | 5 ++--- sound/soc/tegra/tegra20_spdif.c | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index 9144bd547851..7403870c28bd 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h @@ -58,7 +58,6 @@ struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream) * @maxburst: Maximum number of words(note: words, as in units of the * src_addr_width member, not bytes) that can be send to or received from the * DAI in one burst. - * @slave_id: Slave requester id for the DMA channel. * @filter_data: Custom DMA channel filter data, this will usually be used when * requesting the DMA channel. * @chan_name: Custom channel name to use when requesting DMA channel. @@ -72,7 +71,6 @@ struct snd_dmaengine_dai_dma_data { dma_addr_t addr; enum dma_slave_buswidth addr_width; u32 maxburst; - unsigned int slave_id; void *filter_data; const char *chan_name; unsigned int fifo_size; diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c index af08bb4bf578..6762fb2083e1 100644 --- a/sound/core/pcm_dmaengine.c +++ b/sound/core/pcm_dmaengine.c @@ -91,8 +91,8 @@ EXPORT_SYMBOL_GPL(snd_hwparams_to_dma_slave_config); * @dma_data: DAI DMA data * @slave_config: DMA slave configuration * - * Initializes the {dst,src}_addr, {dst,src}_maxburst, {dst,src}_addr_width and - * slave_id fields of the DMA slave config from the same fields of the DAI DMA + * Initializes the {dst,src}_addr, {dst,src}_maxburst, {dst,src}_addr_width + * fields of the DMA slave config from the same fields of the DAI DMA * data struct. The src and dst fields will be initialized depending on the * direction of the substream. If the substream is a playback stream the dst * fields will be initialized, if it is a capture stream the src fields will be @@ -124,7 +124,6 @@ void snd_dmaengine_pcm_set_config_from_dai_data( slave_config->src_addr_width = dma_data->addr_width; } - slave_config->slave_id = dma_data->slave_id; slave_config->peripheral_config = dma_data->peripheral_config; slave_config->peripheral_size = dma_data->peripheral_size; } diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 9fdc82d58db3..1c3385da6f82 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c @@ -284,7 +284,6 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT; spdif->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; spdif->playback_dma_data.maxburst = 4; - spdif->playback_dma_data.slave_id = dmareq->start; pm_runtime_enable(&pdev->dev); From patchwork Mon Nov 15 08:53:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519137 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345048imj; Mon, 15 Nov 2021 00:55:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjlgtz/9BXn3qHPBJ0r7otgq0HRq7JwLily0XyjGOK+qcxl4ul4+JIx5go7igjLIALbp5a X-Received: by 2002:a17:90b:1c0e:: with SMTP id oc14mr64250452pjb.113.1636966502323; Mon, 15 Nov 2021 00:55:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966502; cv=none; d=google.com; s=arc-20160816; b=wRZrHF3vKHXfeCAlgrR0eRGllG/j1TZlNLVBSU7gbjyvU3zHOQ082jjib9AhEgXb+s zQddmH152hBCQuZ4mkrEiHcbJTrxQrt+c4V6mOhWTqiyo3mH3XUP7Hay85HyY/jHdWjY rM5LO5LZUVaoalMWDniSLXwh36qRwlFhidjhoELv6arYFmPYtmHK8oCiyJUb1fhc81FJ iSfMNAzuXRsTzB0bwZ5T4MezDQA6P3j5XZKWq4Cypq2gPVuhcuBfFuvRSkiB9TYugPj+ BZOK2U8wM7DX7kCmLfG0txszPlxwLiUFYSxCv2g54eFfeTRlyOLwibcECxVk1DCwBnSL MtBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=Nn+GZog+AKpSfTF2PdqTeHCCUnOrbCRYDNL4Wo18/Oc=; b=ujoA8fKiAq3cE6ryKF227XJakFhYvePpclI0H1ub34hzevOdlE9QVlsQPkzQFA6JcI sedtfWVyp3r/udQHiLMMjqLIVW2vh+hgDOL01ucuHdbll0bdIcqODO0cDl1/xB79wwkE fHQC916l/pnTkzJc2ulEMWGlr5l+iWMSp+8MS90PCpVhs/sTrzo3M/pvL4tjUCL5BX54 ewfT56d4scbV0w5rwiheA+YT9HdJGPyvy5ds2ZPhi7E19Upvmj5otSaonDivXzaR60D2 wQr6DSBqcN+ObUaru0k701PqbyeJg6ebWY170ylXVSyAael0Cm2xZswoBwNulxwPfh1d /7Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=IWPlOAoN; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id u33si25996759pfg.30.2021.11.15.00.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:55:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=IWPlOAoN; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E89636E989; Mon, 15 Nov 2021 08:55:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id D73276E94C for ; Mon, 15 Nov 2021 08:54:59 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9224463222; Mon, 15 Nov 2021 08:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966499; bh=SSVFq8V5QgZ8AMrKjuNifJwPRFV2bwVTfXVHbqPj2aU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IWPlOAoNVZ+ir7KGxrildoWGM1mQnaf7ewCJRGxAlh7sp55Kq08VXBsh2HJq0UNxl eJrtqrhd9f07DrNoIIYQxXcw0Dj7MyBMWvAjpLeDa0bPZnGyAXGf8Nn/iif0W7tUNF aASGKwu2D0mv1fB6bh3667PFZmstR+abS6MkboFwlFENPAACABf6i0vQqciiacp6D+ CIa/shXrYU7IuqNvw2zRLT7DL94AW8AmV/eR1AVEhs5f+SoYebk81ievQQ/PH1ufo+ sAfTJSFcuSqXozuveEFZbfN7PIQy3f0IbF7les+K9TRndRM/0BhX+9Zl6TK4QdhdOX HbQ0zPRM57fFg== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 02/11] spi: pic32: stop setting dma_config->slave_id Date: Mon, 15 Nov 2021 09:53:54 +0100 Message-Id: <20211115085403.360194-3-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Setting slave_id makes no sense with DT based probing, and should eventually get removed entirely. Address this driver by no longer setting the field here. I could not find which DMA driver is used on PIC32, if it's in the tree at all, but none of the obvious ones even care about slave_id any more. Signed-off-by: Arnd Bergmann Acked-by: Mark Brown --- drivers/spi/spi-pic32.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/spi-pic32.c b/drivers/spi/spi-pic32.c index 5eb7b61bbb4d..f86433b29260 100644 --- a/drivers/spi/spi-pic32.c +++ b/drivers/spi/spi-pic32.c @@ -370,7 +370,6 @@ static int pic32_spi_dma_config(struct pic32_spi *pic32s, u32 dma_width) cfg.src_addr_width = dma_width; cfg.dst_addr_width = dma_width; /* tx channel */ - cfg.slave_id = pic32s->tx_irq; cfg.direction = DMA_MEM_TO_DEV; ret = dmaengine_slave_config(master->dma_tx, &cfg); if (ret) { @@ -378,7 +377,6 @@ static int pic32_spi_dma_config(struct pic32_spi *pic32s, u32 dma_width) return ret; } /* rx channel */ - cfg.slave_id = pic32s->rx_irq; cfg.direction = DMA_DEV_TO_MEM; ret = dmaengine_slave_config(master->dma_rx, &cfg); if (ret) From patchwork Mon Nov 15 08:53:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519138 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345161imj; Mon, 15 Nov 2021 00:55:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9ILQNMQf6gw0sTpg7Dmj1kFMs2zSjW9LJd56B2svxkAUItSTvaqadJTzsSYI/RB+FT5Wz X-Received: by 2002:a17:90a:7e86:: with SMTP id j6mr59964950pjl.25.1636966509620; Mon, 15 Nov 2021 00:55:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966509; cv=none; d=google.com; s=arc-20160816; b=XXMuipyd+5xMQWpr09wL23A2hPUg88dVomT9DM3g0064+QU2lMc/oN9pGLobVprzl7 VeNTAuw+ynH1wov4qpZSrttDlvoVG3i6WCcB4AmW59qShnXggH9h4+YDO1fN8v85Lv7X e6eHBQSP8BOX9YP7UEMR789OC+QwrM6yn7LtmV8wHZ9esJ3Mc9wxRVhKFUzpQU1SlN/X kgbU2HU9vfAUA/bNO/9t86dYZJeNV6Bq6bfpmROF2WeT3fWNwXVp0J6PImiPyH9c9DKJ jzophij9mKxZS4HD1eyzdfA5NksxhgpfUtAL5vvHlA/pFKaJ4U0u0P/ydR5lINhIvj0o ZG0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=78D+zHBZ6FycMcczaGY0ahzIT0BR4euv4hmSrOVPfFE=; b=TPZtlk+G7/DRUMQbfFRyainYlNtKIlhkN21TcuK4DCACXXoXqMiwvV2LrHJCGToWSe w6v1t9GmHyaWe74VKzA2Y9iRim5UbXKlpn1mZeuTHcwRAfQIQDDKHAvtMFc/x8R4/Yu8 vnZkOlQA0IgmuQfaETU0bKz68KCoba7oVJFnUZfok/qcT4nImCwoY3wdbRhf3xXWo8kT dN2lZqVVhIENCDfkN9O0PDvKr1/2eOoRMYGLnAz8XlwMkP5AVA0nsM2No6hFJw0sGObM Xz2ENY0W2Vnbo18sbyQ1PWcuzMYn4qSHJzQdRpvJQ7aH1xTw/D7kY9gABz3/EacuEvbv j4mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=XE1rkoS2; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id v30si23946507pga.396.2021.11.15.00.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:55:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=XE1rkoS2; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F25926E97B; Mon, 15 Nov 2021 08:55:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 865C26E972 for ; Mon, 15 Nov 2021 08:55:06 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 1C1DE63227; Mon, 15 Nov 2021 08:54:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966506; bh=6T6nVYUZYeuHx0KVvy6d2aAfM4hqSW/xkD9UxCrEiew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XE1rkoS26Hg1qVOUe/8JhihPWyqzwdxtSu6KpZSliRxpkj1mrD33TUzc4f3D7Z563 QLiO1buUzxFjE4Smwu3DKTXQuDLm+gytZAgIqSOnAvyzoAXeDNMVaxRSz5FfYVxdzx fxlDZ6etPDPs4+Tui9Els9qLGXd+sLiGd5gsTfkJ6/smITicktBYHNkHB4AAvmw0pc NRLtSgumom3wapnQ8lOIVnzIUsTm+82JiaSwVIuKcuOx5tpNurM5w5orGkJkyh4UkT ImBiCpR78cdAYk6E0uXXpxENctgamiDTvLJByR5cyn6kcnDn0EUp+6TdkBa4HYzUNn uP4cknrvguDtA== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 03/11] mmc: bcm2835: stop setting chan_config->slave_id Date: Mon, 15 Nov 2021 09:53:55 +0100 Message-Id: <20211115085403.360194-4-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The field is not interpreted by the DMA engine driver, as all the data is passed from devicetree instead. Remove the assignment so the field can eventually be deleted. Signed-off-by: Arnd Bergmann Reviewed-by: Nicolas Saenz Julienne Acked-by: Ulf Hansson --- drivers/mmc/host/bcm2835.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 8c2361e66277..463b707d9e99 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1293,14 +1293,12 @@ static int bcm2835_add_host(struct bcm2835_host *host) host->dma_cfg_tx.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; host->dma_cfg_tx.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; - host->dma_cfg_tx.slave_id = 13; /* DREQ channel */ host->dma_cfg_tx.direction = DMA_MEM_TO_DEV; host->dma_cfg_tx.src_addr = 0; host->dma_cfg_tx.dst_addr = host->phys_addr + SDDATA; host->dma_cfg_rx.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; host->dma_cfg_rx.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; - host->dma_cfg_rx.slave_id = 13; /* DREQ channel */ host->dma_cfg_rx.direction = DMA_DEV_TO_MEM; host->dma_cfg_rx.src_addr = host->phys_addr + SDDATA; host->dma_cfg_rx.dst_addr = 0; From patchwork Mon Nov 15 08:53:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519139 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345247imj; Mon, 15 Nov 2021 00:55:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJziVy8oVjfDnFjlEL01rCxAWDOyq4cnkJLPskw4T5kK1Ap5VaHYEbWjQ1E1yy0Z3nfiEn4K X-Received: by 2002:a17:90a:4d0c:: with SMTP id c12mr63544123pjg.151.1636966516257; Mon, 15 Nov 2021 00:55:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966516; cv=none; d=google.com; s=arc-20160816; b=urz/YCdvBlo2vPCS2szWRUj8DEJ05ioAGp483FCv+RjIzCmqaLeRVTs/MHzNfd+W8a 8/RjJbXLrSBuAXWnMfnnk8RjG+WD/c/91ZrevxYtyTZF9iPT2ncjx8hmn1zSDliCZt+D 64WUPcUgXQfYxiXd1mVgIxJ7+t6OMBslzacJx0RmbFApaoZyIGIyBKUCZmpCW+JoubFG 1r9qKxVxt9rm2HfjMgAOpoS/sT5pyjjhH71PViNUHGMALl+keZq2H4MqkykQ1g7CTM9e NnWT2PTQEDp4HweKdUF1d5SLa6I6lDvfjprjFIN/upr2k5bmZ8A5ee4CkVeLahn2vlqn qR3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=NHFrJZBbWAtqaoeG8PBVDw7TCzMIDCkdMv82Y9MXmao=; b=gAnX7fpBsshnhOTPTaFROYUcoVv8JYwZNR8+6alrKxP7ku02A8MkHpK5xSrQfXa+Ht UJ9MyRDhZH4y8AxuWALUwEbxYmUyWFFsVD7ZFVv2hJybbYVjZt5jO7PbfnbnWLL37D3d 6msHlFQaIRKfArQQiKqU5AcIIiD5ZMVq9e6Yq6UW27Cmg0mv5Xh5tsz2NDS1H4OH9Ut3 ZFr/e8H641uSR8eFS1qjr4OLWpsjFZ9t09JgEXwxGhFkhCiOWOaPwQa71tjsh6WotlgY JpYKq+Hlnuc+1w9EH2ExYjP9eYZ0GVsiKz7olmHKdQ6AmXuQ/KKzLwrq9brhonkRz0+7 Ur9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=lAj0mIyH; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j14si25649901pfj.381.2021.11.15.00.55.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:55:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=lAj0mIyH; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 95B4C6E975; Mon, 15 Nov 2021 08:55:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE27A6E975 for ; Mon, 15 Nov 2021 08:55:12 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id A02B96322E; Mon, 15 Nov 2021 08:55:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966512; bh=0aNffjFyOwM4u0Oo7aAQAYOuioDBDQQgvS3dt9nDAoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lAj0mIyHUENlkP6yrlZxkqYSD5hocgglcT83E2dvJW5vsfypS+bCmhcsFYUNOkxLb VGm36iEtIrx5MsVBXb22F/vG+l2XPNfSwWhLmNnpXY2YEg1WtV9h7uDQ4GwxtuNv9L drDvkpdeYSJiDY3sEkXjDYk0eXhjJUhkOOej7yEfUcc6kxARiOwLRZ91ApCbkZq51a 1DlM4aygC8K+7tMPsuyHuPXgtlhUMsrKFmzWe5QnTopYr5GRXxpXJp9kRg4sUJG2px 7btIXMzPZaupxro9KeNOsc8eN7Q4CrodjLRdG9uMjUnyKFs+UCAV79ctDov27Vvgoc 1WIStRJ1SW5ww== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 04/11] dmaengine: shdma: remove legacy slave_id parsing Date: Mon, 15 Nov 2021 09:53:56 +0100 Message-Id: <20211115085403.360194-5-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The slave device is picked through either devicetree or a filter function, and any remaining out-of-tree drivers would have warned about this usage since 2015. Stop interpreting the field finally so it can be removed from the interface. Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart --- drivers/dma/sh/shdma-base.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c index 7f72b3f4cd1a..41c6bc650fa3 100644 --- a/drivers/dma/sh/shdma-base.c +++ b/drivers/dma/sh/shdma-base.c @@ -786,14 +786,6 @@ static int shdma_config(struct dma_chan *chan, if (!config) return -EINVAL; - /* - * overriding the slave_id through dma_slave_config is deprecated, - * but possibly some out-of-tree drivers still do it. - */ - if (WARN_ON_ONCE(config->slave_id && - config->slave_id != schan->real_slave_id)) - schan->real_slave_id = config->slave_id; - /* * We could lock this, but you shouldn't be configuring the * channel, while using it... From patchwork Mon Nov 15 08:53:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519140 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345312imj; Mon, 15 Nov 2021 00:55:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhQIw56MGwKgcCz0oT2jLfoHRrcV9Ubl8KO9jRcTkj7Nt9LWgsXUCWVoTooRLqbl4Dzmut X-Received: by 2002:a17:90b:38c1:: with SMTP id nn1mr44746926pjb.91.1636966521955; Mon, 15 Nov 2021 00:55:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966521; cv=none; d=google.com; s=arc-20160816; b=ZacKY6aQNwhA3ZVVuO0l/CMw4ntZ3kSiFkPQ1ra/VivGCgP+1zLrETg9QgorCSN454 y4k74DVmH0cm/Cygz+jpjk8HV6BiNU365CPSHjYypXATTp2WflA9FZ7AcWbu0WjFzXbk 8A+ulLYgP7g/+/PYsKhi5TBtBajTk3bLEL0HbeUO8xuJHirJmMce7acJQaL1cWmswixa 4y3RaHxg4PLA7Noj6IIIwX19acNAfWLH3dfKEAVp573CPZ5RvQo1Bxhf8/JzNujkIgoO sW53peeVhqAmMTVzaEwILdIaNTIUQCU+ySMpaZz2flDjRB/JVkf5pZ39bViOqsmnMB6W rbuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=WLQjYWwVxyIoAoFF44p2FQ014Sv+wF3wSRb+phdc7tw=; b=HzMmBRl1PnBgd5CWyTwLhLh9W2Opl60XuHjVHg3KSPdk98TDmDVuFfoP/1wa0PEb/f y2Z5vTVyIO/P7AylveWu2sjZ3EDwXDqhpwV6akW9YiuD8q/TYptVOvNw3NEBwPfqQpLX vCSXWHl3kAb0u18Ny4oot3OyFTvZ1egudRW5JPrif2PNRVpAUB273OTPbymJ2uV0m4s2 USOi2QFAvAm4qrvReLh1rYZRWJdIbRiIZYwHKp7kkv9fAjG7FL1C6c3gtPuufzz4hIgQ BW7vvQpETCi2GwzsO0H6gH+8UYRYelh9TxBJcMnEVm5BsLjEn4UtZY5/2Ce/ZteLVi+r YfyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b="mRK/MrLI"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j6si23342909pgq.187.2021.11.15.00.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:55:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b="mRK/MrLI"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 991226EB81; Mon, 15 Nov 2021 08:55:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 671FC6E98E for ; Mon, 15 Nov 2021 08:55:19 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 22ED66322D; Mon, 15 Nov 2021 08:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966519; bh=dVdHkl1ZmLXmEp0TH/FEFVdiPBDZ+d25p7vGAAo1Op0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mRK/MrLIW0u6LLOVooQ0gN1KOgXTYhYKylaX2S32I4HonnlCFZurjXmSS8SVAK8uT oms9xEfRjWR6ZFbM4n5WvC4swJa/tAasyMhklsk5Ir56gwJUPrslsn7ElKpFldUp/E NlCAON7rV+dPkbJZagetmzGzxn9jWITAvoJTC1bh7hJM72/9cXRXvCjnZS1ul8EL2p VBOA3hBnrk0Eb28v5ySeU5CAXlmyQ/9KxPR888YYSAX5yJSbDRY/Q7gBtrNNVxZYXZ 1ZwPE4au/UVHJxcKYNQikMHfKZ7UNLmAPuOP8AEjGq++T8L8DQUNKbV7hN6zPua+j8 yXgozqEEWHHIg== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 05/11] dmaengine: pxa/mmp: stop referencing config->slave_id Date: Mon, 15 Nov 2021 09:53:57 +0100 Message-Id: <20211115085403.360194-6-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The last driver referencing the slave_id on Marvell PXA and MMP platforms was the SPI driver, but this stopped doing so a long time ago, so the TODO from the earlier patch can no be removed. Fixes: b729bf34535e ("spi/pxa2xx: Don't use slave_id of dma_slave_config") Fixes: 13b3006b8ebd ("dma: mmp_pdma: add filter function") Signed-off-by: Arnd Bergmann --- drivers/dma/mmp_pdma.c | 6 ------ drivers/dma/pxa_dma.c | 7 ------- 2 files changed, 13 deletions(-) diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index a23563cd118b..5a53d7fcef01 100644 --- a/drivers/dma/mmp_pdma.c +++ b/drivers/dma/mmp_pdma.c @@ -727,12 +727,6 @@ static int mmp_pdma_config_write(struct dma_chan *dchan, chan->dir = direction; chan->dev_addr = addr; - /* FIXME: drivers should be ported over to use the filter - * function. Once that's done, the following two lines can - * be removed. - */ - if (cfg->slave_id) - chan->drcmr = cfg->slave_id; return 0; } diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c index 52d04641e361..6078cc81892e 100644 --- a/drivers/dma/pxa_dma.c +++ b/drivers/dma/pxa_dma.c @@ -909,13 +909,6 @@ static void pxad_get_config(struct pxad_chan *chan, *dcmd |= PXA_DCMD_BURST16; else if (maxburst == 32) *dcmd |= PXA_DCMD_BURST32; - - /* FIXME: drivers should be ported over to use the filter - * function. Once that's done, the following two lines can - * be removed. - */ - if (chan->cfg.slave_id) - chan->drcmr = chan->cfg.slave_id; } static struct dma_async_tx_descriptor * From patchwork Mon Nov 15 08:53:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519141 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345415imj; Mon, 15 Nov 2021 00:55:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5jKbQ2IBuTOefu82nugOG3raiFxdKFCNv7ngGFvjwGXHX6chNilvInmN67AfUZqyLmGs3 X-Received: by 2002:a17:90b:4d8c:: with SMTP id oj12mr44406459pjb.100.1636966528490; Mon, 15 Nov 2021 00:55:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966528; cv=none; d=google.com; s=arc-20160816; b=yc/6wn7R8nKF5VWjrv+y49dEjXSqj+9TbUivh9dfekG9pULJ5vt3pOKWPIgW/PPHn1 e/tuu1GiVOTuHkFUCDEePziQ22mf7+UcM+IKMHvw3mvog0CfT/X8jKOzdB4kyt5EBXFL MT0tQjc6e/zUiFsD9YmY6nxRte9p2babBZG/rn9mZIqtLai0SKaAt4/1lWwIP1i6J5N1 hC9zl34kZpyWGtms0yAK2+u/MSmaVy3SITUeSwXTgVg7KiGQezCKLHfotdMMr8ZAVpzI 0HWmMUWMO/nvMjle0FmxkQRfikX93E9kOl4GVZqzaZf9foSKw0QKCq55Uf2P5t3tr3Xw VaTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=Rz4CLAnwhynJRfG6FsiQWtWf5jwUmw/2wwhmExd0/fg=; b=luqqo5wp8pXpBLniNQf2ZK6pSDc9p+uAp9dEpb1coa4mfcz9Er9nEWdVgRbZPOKgVj KpEKnShwPDT7zEBvOaz1BLEUa5VO+VUHoGi/NQ30rNs5SyHnPoaJuZ03fa7QA1wAxbjO 1BuMaLipbHyl9KCss6ehkXjg2Vhr+SkbrlAoNF+AwLPoho9y+kLgddYp6Pl+3s/tnPnP 0k604YUEg0JPUzOYgF+wowRBMwcUgxC8hYLJJdZTHEHHIgnZrOR2MFoDW72CsDGTaDlh PQ70OmajfhOnhd8nNBsJrLiutrFSj+iE8qSE0lcL6WT1jatEIaDG3ZiVDJ+7BNNXgvrN UO9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=BVo2LZMT; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id x24si26305428pgl.568.2021.11.15.00.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:55:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=BVo2LZMT; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D57386EB8A; Mon, 15 Nov 2021 08:55:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id E1CBD6EB8D for ; Mon, 15 Nov 2021 08:55:25 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9EF0B6322A; Mon, 15 Nov 2021 08:55:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966525; bh=5QR5v6614zTOntPsUILdpgvMgyj2h7YC8v32L7VdrY8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BVo2LZMTKnvi18fTU1oVyCcq5hSRkXwUKaqwxPxFj8ksBb3j3ZAMGnnyUBzxyju35 JD89ztkndvHbilbR165m9u29eYAyiAZP/352auOvSmoASz8QbySIAkx8sx6HqA3Fi+ NajC4qp9b42h6JI1IOXBv9o4BCffOY7AZgYVuLKQ7HNB7CtLqpCFYPXpzybPothEc7 iVAogxjPLeJtqekWAMFQpZU9AzNb/YLn/6ECUKqDOQJhupZ04BtGq9L1VopOyBhPBv zquvlt2qbQvpw7jHxz0Ax3OX5az2YhpYpHthYZCr7jXdKg9XrvsUnmDM+vt780Vm2H YQtg0r4AXxFjg== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 06/11] dmaengine: sprd: stop referencing config->slave_id Date: Mon, 15 Nov 2021 09:53:58 +0100 Message-Id: <20211115085403.360194-7-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann It appears that the code that reads the slave_id from the channel config was copied incorrectly from other drivers. Nothing ever sets this field on platforms that use this driver, so remove the reference. Signed-off-by: Arnd Bergmann --- drivers/dma/sprd-dma.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 4357d2395e6b..7f158ef5672d 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -795,9 +795,6 @@ static int sprd_dma_fill_desc(struct dma_chan *chan, return dst_datawidth; } - if (slave_cfg->slave_id) - schan->dev_id = slave_cfg->slave_id; - hw->cfg = SPRD_DMA_DONOT_WAIT_BDONE << SPRD_DMA_WAIT_BDONE_OFFSET; /* From patchwork Mon Nov 15 08:53:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519142 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345519imj; Mon, 15 Nov 2021 00:55:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzM2MkXxz72c85IsdnWy3T70CaYtoaXhGD+4cWtqqMSav5RUF5BVYnqOZ+mOjzJCRkxU2fZ X-Received: by 2002:a17:902:758b:b0:13e:8b1:e49f with SMTP id j11-20020a170902758b00b0013e08b1e49fmr34098013pll.6.1636966535659; Mon, 15 Nov 2021 00:55:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966535; cv=none; d=google.com; s=arc-20160816; b=yea2wotmrBCfs3f9/rQ2MiknfoGDks5zepIfx1qQJXh4/BemgOPcCy8m6NOWhMkpPD XfG3HOkNBMy/Oz25l/XR14Q3rYcq6SvB/p3OThvAMsX4PisIFYsWaDFg6YfhxSAugNZg kD6nQMV6LCNHFqydlo9FrbRpZnoF0w7kO3G9RY3k10lDbUleJBGjfZOAEaaR6s8BiYqf +OqryC20nA2l0wjc9vEwhZsyI9RRZyOo1k0EawpbbOJfLV4SmUmF3yrsUBFptTIegorN Wgv/2O2ixx5qe6HIEHKzBuVEwuPvEDLVbdso194bXV8IbMemFqgwMHi5lSAX+07tCiyw GDvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=LnMO2OYRQZaio9vecAEk2OVq2Mz7sQUjAEJIIllvH/w=; b=IKlrMXfVFNNtu9Eu5aasRnhpZqwvZhN1NfGtf+6eHweE5FQQqqvNpeG2Nqknx7YJNJ 2CAn1ysQvCeJe+skw/FNU4VZ18HU0yO6tNaeRsGiShehHPLugS7NTcS4Niwk3sn7Ta7/ fA7g3FpzJyKgSlFKrTv7X/cmpYPvK/7Hrq49GUbniwqsePu3XouVO5AsezbSTw43yhJH Yq7aYW8h6bY70BbUAZ5MIiqMbUUQYbsW/aN+cwakoy1r/cwPlaCffhoaRbULHbJFdpMq IKCOAqj4bsZ33f0vqcc7fQfcrO1yZXyn5EZNUNnfiYjwHkqDLeZ9xQCs95vDJ7IIXZIp KA4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=rwUrTphl; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id q18si20695069pla.217.2021.11.15.00.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:55:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=rwUrTphl; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E4A36EB80; Mon, 15 Nov 2021 08:55:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 686E26EB88 for ; Mon, 15 Nov 2021 08:55:32 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 2650E63231; Mon, 15 Nov 2021 08:55:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966532; bh=rWn7fwL4jE1Ib3BnxgNaC10hhrTID/u9x8pJYbds6hA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rwUrTphlMw8HJ9VnDWmnfi04Z++0QMRlAz95GaW7OS1q8qZNIBTkO5QiaZugxOt8N 1mbE/z9LO+912MOTgqOy2Fu3iCnfylRNZNLUEtErYihz3U3/3OKs3xK7fC0hImtGX7 vvd3cBsUg8KPgEovHhXExGCLl18S9ZT1m5Z7LCfmcsgzx1kJEdB42MUvVK4s2VTYl7 Jah3Us03hw3EKccqeON6WwAeJJzFj7wvT3lDlSzZkJMfLKbLy1s1f0CeTmN6Jmt3zF ke7usfxwY8raXd5BVWxGUFEyZnwrkpaX/uOdw9bVtALCO2Dwk4LWpad8wzTSNIAQKm 9X1AzkWRKWXoA== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 07/11] dmaengine: qcom-adm: stop abusing slave_id config Date: Mon, 15 Nov 2021 09:53:59 +0100 Message-Id: <20211115085403.360194-8-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The slave_id was previously used to pick one DMA slave instead of another, but this is now done through the DMA descriptors in device tree. For the qcom_adm driver, the configuration is documented in the DT binding to contain a tuple of device identifier and a "crci" field, but the implementation ends up using only a single cell for identifying the slave, with the crci getting passed in nonstandard properties of the device, and passed through the dma driver using the old slave_id field. Part of the problem apparently is that the nand driver ends up using only a single DMA request ID, but requires distinct values for "crci" depending on the type of transfer. Change both the dmaengine driver and the two slave drivers to allow the documented binding to work in addition to the ad-hoc passing of crci values. In order to no longer abuse the slave_id field, pass the data using the "peripheral_config" mechanism instead. Signed-off-by: Arnd Bergmann Reported-by: kernel test robot Reported-by: kernel test robot --- drivers/dma/qcom/qcom_adm.c | 56 +++++++++++++++++++++++++++---- drivers/mtd/nand/raw/qcom_nandc.c | 14 ++++++-- drivers/tty/serial/msm_serial.c | 15 +++++++-- include/linux/dma/qcom_adm.h | 12 +++++++ 4 files changed, 86 insertions(+), 11 deletions(-) create mode 100644 include/linux/dma/qcom_adm.h diff --git a/drivers/dma/qcom/qcom_adm.c b/drivers/dma/qcom/qcom_adm.c index ee78bed8d60d..bb338b303af6 100644 --- a/drivers/dma/qcom/qcom_adm.c +++ b/drivers/dma/qcom/qcom_adm.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -140,6 +141,8 @@ struct adm_chan { struct adm_async_desc *curr_txd; struct dma_slave_config slave; + u32 crci; + u32 mux; struct list_head node; int error; @@ -379,8 +382,8 @@ static struct dma_async_tx_descriptor *adm_prep_slave_sg(struct dma_chan *chan, return ERR_PTR(-EINVAL); } - crci = achan->slave.slave_id & 0xf; - if (!crci || achan->slave.slave_id > 0x1f) { + crci = achan->crci & 0xf; + if (!crci || achan->crci > 0x1f) { dev_err(adev->dev, "invalid crci value\n"); return ERR_PTR(-EINVAL); } @@ -403,9 +406,7 @@ static struct dma_async_tx_descriptor *adm_prep_slave_sg(struct dma_chan *chan, if (!async_desc) return ERR_PTR(-ENOMEM); - if (crci) - async_desc->mux = achan->slave.slave_id & ADM_CRCI_MUX_SEL ? - ADM_CRCI_CTL_MUX_SEL : 0; + async_desc->mux = achan->mux ? ADM_CRCI_CTL_MUX_SEL : 0; async_desc->crci = crci; async_desc->blk_size = blk_size; async_desc->dma_len = single_count * sizeof(struct adm_desc_hw_single) + @@ -488,10 +489,13 @@ static int adm_terminate_all(struct dma_chan *chan) static int adm_slave_config(struct dma_chan *chan, struct dma_slave_config *cfg) { struct adm_chan *achan = to_adm_chan(chan); + struct qcom_adm_peripheral_config *config = cfg->peripheral_config; unsigned long flag; spin_lock_irqsave(&achan->vc.lock, flag); memcpy(&achan->slave, cfg, sizeof(struct dma_slave_config)); + if (cfg->peripheral_size == sizeof(config)) + achan->crci = config->crci; spin_unlock_irqrestore(&achan->vc.lock, flag); return 0; @@ -694,6 +698,45 @@ static void adm_channel_init(struct adm_device *adev, struct adm_chan *achan, achan->vc.desc_free = adm_dma_free_desc; } +/** + * adm_dma_xlate + * @dma_spec: pointer to DMA specifier as found in the device tree + * @ofdma: pointer to DMA controller data + * + * This can use either 1-cell or 2-cell formats, the first cell + * identifies the slave device, while the optional second cell + * contains the crci value. + * + * Returns pointer to appropriate dma channel on success or NULL on error. + */ +struct dma_chan *adm_dma_xlate(struct of_phandle_args *dma_spec, + struct of_dma *ofdma) +{ + struct dma_device *dev = ofdma->of_dma_data; + struct dma_chan *chan, *candidate = NULL; + struct adm_chan *achan; + + if (!dev || dma_spec->args_count > 2) + return NULL; + + list_for_each_entry(chan, &dev->channels, device_node) + if (chan->chan_id == dma_spec->args[0]) { + candidate = chan; + break; + } + + if (!candidate) + return NULL; + + achan = to_adm_chan(candidate); + if (dma_spec->args_count == 2) + achan->crci = dma_spec->args[1]; + else + achan->crci = 0; + + return dma_get_slave_channel(candidate); +} + static int adm_dma_probe(struct platform_device *pdev) { struct adm_device *adev; @@ -838,8 +881,7 @@ static int adm_dma_probe(struct platform_device *pdev) goto err_disable_clks; } - ret = of_dma_controller_register(pdev->dev.of_node, - of_dma_xlate_by_chan_id, + ret = of_dma_controller_register(pdev->dev.of_node, adm_dma_xlate, &adev->common); if (ret) goto err_unregister_dma; diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 04e6f7b26706..7c6efa3b6255 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -952,6 +953,7 @@ static int prep_adm_dma_desc(struct qcom_nand_controller *nandc, bool read, struct dma_async_tx_descriptor *dma_desc; struct scatterlist *sgl; struct dma_slave_config slave_conf; + struct qcom_adm_peripheral_config periph_conf = {}; enum dma_transfer_direction dir_eng; int ret; @@ -983,11 +985,19 @@ static int prep_adm_dma_desc(struct qcom_nand_controller *nandc, bool read, if (read) { slave_conf.src_maxburst = 16; slave_conf.src_addr = nandc->base_dma + reg_off; - slave_conf.slave_id = nandc->data_crci; + if (nandc->data_crci) { + periph_conf.crci = nandc->data_crci; + slave_conf.peripheral_config = &periph_conf; + slave_conf.peripheral_size = sizeof(periph_conf); + } } else { slave_conf.dst_maxburst = 16; slave_conf.dst_addr = nandc->base_dma + reg_off; - slave_conf.slave_id = nandc->cmd_crci; + if (nandc->cmd_crci) { + periph_conf.crci = nandc->cmd_crci; + slave_conf.peripheral_config = &periph_conf; + slave_conf.peripheral_size = sizeof(periph_conf); + } } ret = dmaengine_slave_config(nandc->chan, &slave_conf); diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index fcef7a961430..c6be09f44dc1 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -290,6 +291,7 @@ static void msm_request_tx_dma(struct msm_port *msm_port, resource_size_t base) { struct device *dev = msm_port->uart.dev; struct dma_slave_config conf; + struct qcom_adm_peripheral_config periph_conf = {}; struct msm_dma *dma; u32 crci = 0; int ret; @@ -308,7 +310,11 @@ static void msm_request_tx_dma(struct msm_port *msm_port, resource_size_t base) conf.device_fc = true; conf.dst_addr = base + UARTDM_TF; conf.dst_maxburst = UARTDM_BURST_SIZE; - conf.slave_id = crci; + if (crci) { + conf.peripheral_config = &periph_conf; + conf.peripheral_size = sizeof(periph_conf); + periph_conf.crci = crci; + } ret = dmaengine_slave_config(dma->chan, &conf); if (ret) @@ -333,6 +339,7 @@ static void msm_request_rx_dma(struct msm_port *msm_port, resource_size_t base) { struct device *dev = msm_port->uart.dev; struct dma_slave_config conf; + struct qcom_adm_peripheral_config periph_conf = {}; struct msm_dma *dma; u32 crci = 0; int ret; @@ -355,7 +362,11 @@ static void msm_request_rx_dma(struct msm_port *msm_port, resource_size_t base) conf.device_fc = true; conf.src_addr = base + UARTDM_RF; conf.src_maxburst = UARTDM_BURST_SIZE; - conf.slave_id = crci; + if (crci) { + conf.peripheral_config = &periph_conf; + conf.peripheral_size = sizeof(periph_conf); + periph_conf.crci = crci; + } ret = dmaengine_slave_config(dma->chan, &conf); if (ret) diff --git a/include/linux/dma/qcom_adm.h b/include/linux/dma/qcom_adm.h new file mode 100644 index 000000000000..af20df674f0c --- /dev/null +++ b/include/linux/dma/qcom_adm.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-only +#ifndef __LINUX_DMA_QCOM_ADM_H +#define __LINUX_DMA_QCOM_ADM_H + +#include + +struct qcom_adm_peripheral_config { + u32 crci; + u32 mux; +}; + +#endif /* __LINUX_DMA_QCOM_ADM_H */ From patchwork Mon Nov 15 08:54:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519143 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345575imj; Mon, 15 Nov 2021 00:55:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzD54Tf0aOHiUiSHlTBKis+R12Jrh6gNDdypbtWE0YYDj3L0FqACWT/QOXvObtLMnrCaOPM X-Received: by 2002:a63:cc09:: with SMTP id x9mr23597051pgf.349.1636966541980; Mon, 15 Nov 2021 00:55:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966541; cv=none; d=google.com; s=arc-20160816; b=hnrv7Ix0v2fIZDxUxvcnhWZwAJXIGdpi/RcUIZirUaw7SdAVSWImiA7ZsO0gwv2xRH 6TR11RaYZJqyOs3zToY2HDfqWfYDQluxEtFe0/e8ROn7k3i5loxA6YbG3I27p50O+NQl IX1LYfr08o63l8iOzvKCqGr8/nWTmQl+iF1r1wVqZplaWVjA0CEnwLLkGhDCZVOHEPOA IIMpw5cEypUwPlOqJdL5omADXYBorBk2tueLnIYHq/l3du3Xt1J3abaoBl+Uj7uvJgZs MthNf3tvE6sqXPh0yr6Hb2f2Jp6Ar7iHQFR17Ig6+IXe90mvfz5Kn9X/ViWHT7so62JB 92zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=ufNoEBGcynUsggDn4pvOjHMS2VGjKxNOQyCKhhB2q4s=; b=XxdfxjU1p+5+PWCoDEKDWvCigBOfkV0EJlItRhrRtqbIGjtQ7DeOLqWrn3CVXjRK7S PlKNJYlBS/3qXr38eA35e+lHPBlZF8t9aMbnJi7BO7Be30B9RvFaypwqXRR5gE4nDalQ Pr9SHksfbNXIA23wiZ3H0OjrBoa3frD+ja1tsk9UEbjVbJNAH1//Znsr2EeD4HUEtHVq 2baBnRPIMlImcamBMkuZjDCF5vcNLw+kQbyyLfzfTkYazJNquGGf3OM3SUQnVjYGgEFR GsH8cW0qW6p968rw9sskt7QGPzrYAjU7XlU5edny9kpcKY+8/Asnue2/U2uoHWwP73rQ jzEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=pHgGGVZQ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id kb5si47052607pjb.110.2021.11.15.00.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:55:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=pHgGGVZQ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F19C6EB9B; Mon, 15 Nov 2021 08:55:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD6A06EB9A for ; Mon, 15 Nov 2021 08:55:38 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id A00EC61BE2; Mon, 15 Nov 2021 08:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966538; bh=2mwiQpykEAXMR4c+gQ0r0Cque843ND6M/qUoWmqOlf8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pHgGGVZQvgwKAmuviD4hubeWYMREgXxWJfeEBFZjz9j7lBnAjNfaItSixiYQ6tjsd jlNLqSO0tvDtiPP2nku90UBbbEHEImWKTSBEcAumAqCmZQgGOYbpyk8Rb61A5J0ESC 99O3hsO+/+1bwks/a9SZtbcyG0O+O/00i2AbMnY7eG3n//Jaz8vyE/OfHd8obW8zPq 3Ut6okySvy2UdYHuRjo3kbCZGY58jshqcW/NX5g436dbVwon7Kj6IlVof7U6GVjRvg 28QwkGliURHIe9Bf7nzdJhzb6dqoRlNUVZg2hdB7bsOSgpPSdfvbPnSPLYKcfSwNZz a4RwOAKAjsSCg== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 08/11] dmaengine: xilinx_dpdma: stop using slave_id field Date: Mon, 15 Nov 2021 09:54:00 +0100 Message-Id: <20211115085403.360194-9-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The display driver wants to pass a custom flag to the DMA engine driver, which it started doing by using the slave_id field that was traditionally used for a different purpose. As there is no longer a correct use for the slave_id field, it should really be removed, and the remaining users changed over to something different. The new mechanism for passing nonstandard settings is using the .peripheral_config field, so use that to pass a newly defined structure here, making it clear that this will not work in portable drivers. Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart --- drivers/dma/xilinx/xilinx_dpdma.c | 12 ++++++++---- drivers/gpu/drm/xlnx/zynqmp_disp.c | 9 +++++++-- include/linux/dma/xilinx_dpdma.h | 11 +++++++++++ 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 include/linux/dma/xilinx_dpdma.h diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c index ce5c66e6897d..e2c1ef7a659c 100644 --- a/drivers/dma/xilinx/xilinx_dpdma.c +++ b/drivers/dma/xilinx/xilinx_dpdma.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -1273,6 +1274,7 @@ static int xilinx_dpdma_config(struct dma_chan *dchan, struct dma_slave_config *config) { struct xilinx_dpdma_chan *chan = to_xilinx_chan(dchan); + struct xilinx_dpdma_peripheral_config *pconfig; unsigned long flags; /* @@ -1285,11 +1287,13 @@ static int xilinx_dpdma_config(struct dma_chan *dchan, spin_lock_irqsave(&chan->lock, flags); /* - * Abuse the slave_id to indicate that the channel is part of a video - * group. + * Abuse the peripheral_config to indicate that the channel is part + * of a video group. */ - if (chan->id <= ZYNQMP_DPDMA_VIDEO2) - chan->video_group = config->slave_id != 0; + pconfig = config->peripheral_config; + if (chan->id <= ZYNQMP_DPDMA_VIDEO2 && + config->peripheral_size == sizeof(*pconfig)) + chan->video_group = pconfig->video_group; spin_unlock_irqrestore(&chan->lock, flags); diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index ff2b308d8651..11c409cbc88e 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -1058,14 +1059,18 @@ static void zynqmp_disp_layer_set_format(struct zynqmp_disp_layer *layer, zynqmp_disp_avbuf_set_format(layer->disp, layer, layer->disp_fmt); /* - * Set slave_id for each DMA channel to indicate they're part of a + * Set pconfig for each DMA channel to indicate they're part of a * video group. */ for (i = 0; i < info->num_planes; i++) { struct zynqmp_disp_layer_dma *dma = &layer->dmas[i]; + struct xilinx_dpdma_peripheral_config pconfig = { + .video_group = true, + }; struct dma_slave_config config = { .direction = DMA_MEM_TO_DEV, - .slave_id = 1, + .peripheral_config = &pconfig, + .peripheral_size = sizeof(pconfig), }; dmaengine_slave_config(dma->chan, &config); diff --git a/include/linux/dma/xilinx_dpdma.h b/include/linux/dma/xilinx_dpdma.h new file mode 100644 index 000000000000..83a1377f03f8 --- /dev/null +++ b/include/linux/dma/xilinx_dpdma.h @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef __LINUX_DMA_XILINX_DPDMA_H +#define __LINUX_DMA_XILINX_DPDMA_H + +#include + +struct xilinx_dpdma_peripheral_config { + bool video_group; +}; + +#endif /* __LINUX_DMA_XILINX_DPDMA_H */ From patchwork Mon Nov 15 08:54:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519144 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345646imj; Mon, 15 Nov 2021 00:55:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQzNFWyAY4hZo6YZ4CD9Sk1cn+lWkCf7b0s2BbE8Dd+RZji5U29J3huXXtULIuoPf28Cxd X-Received: by 2002:a17:90a:ac0b:: with SMTP id o11mr3984546pjq.143.1636966548207; Mon, 15 Nov 2021 00:55:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966548; cv=none; d=google.com; s=arc-20160816; b=Dc4zEOsugqAlCr1LX/zQGexz0povymXfHl1jiE2paJLEUbUekviW/NeBheXi/c6338 w1IrMIp06Flb2Ealya2kqvHwMGO1wM4J3KN5vyvzKDDOFtDCXVocvTOm0vSSDX0wzaX/ Tl2Y5pdgUVbRxitEwEIvxaxCXcWdsZDKsvANfmnWB4N2mjBR1oP4UDbb21tIvM7Q7zGa 3wskY2hDTScvglFsvlT9kMo0keG2rDcuQcdDtdBW00L3a/FdQsYH7ANEzUtcPs6SxnnR JPs5Cb572PEdyiqStriWzrZKnUxN4bF/i3whlTLA1O9j5nLOTUYCFPsVUxkfg6RliBrw sc3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=/oX+NR3nQdel12JUBJVsIdxOIjSVMda3bzuGVBCgbxk=; b=hNt/piC7Ef2MNZe06SUkD5weAlZg8Cwv+o7m+y+KVqAbxWcjGzsM+iuEByXqYZDhFJ bUGPzWBQ5P9TtLEJzZhflgsDkHCk5xGnk3vRZkoCrjFmLI6oj8G2L1NBwimFHXOga+pd A0ICTQlXlQ7Iq2KDEcQ/hVUSKdfhKuDoA30NEFCCO/41vEOfNr02cYy5e/wfzj23O2Pe HdYkzCoOYsPUwYdgkGs3IZTu4cV+xF8R20vfbUpsogqSf5rLNgci3TeyWMVBwEEMod6y YW3TmXCwPTj50CFR0lRmsnY2WzQK6RD/VHEZ74aC9rnVc3bokCOIzOllBOn9XWO03omm c3vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=VYuJvxO5; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id j27si25934770pgn.38.2021.11.15.00.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:55:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=VYuJvxO5; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1FAB6EB9A; Mon, 15 Nov 2021 08:55:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5CE7B6EB9A for ; Mon, 15 Nov 2021 08:55:45 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 2223663223; Mon, 15 Nov 2021 08:55:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966545; bh=dcMQMZncG8IjNijKZNej/gmwTiTYDPeCFK23hEXOfto=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VYuJvxO5lVR/GiGcXXlpTenpQL8tS/RiB2q/z0CMEjbvV3OtExgDGliJ9mPslll9Z gJF9jW4NvrAMcYVtan/DOPn491D5evV0DjVoLO4PKbj3djKSiupC9gs/o/JDRousmF VfKHtJYY+yuBV0OABHqDiHSUkpE6qGp8SFfe7NSJEmA0l/mxODuVE3wHHx7vsA5sov Wa36nu6IAmzkpbTK/7+6RaXeDPwWYCIT8QDeBGczguXuJlI760X3i1oAk8E/g82B3L MDBneNRRk20n1rSG1Z9mUgJiWRhrqnptEhFZTTbLf+wXfy+4WmVGvjS1fVUD20TPas ktKoOqahs6Lsg== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 09/11] dmaengine: tegra20-apb: stop checking config->slave_id Date: Mon, 15 Nov 2021 09:54:01 +0100 Message-Id: <20211115085403.360194-10-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Nothing sets the slave_id field any more, so stop accessing it to allow the removal of this field. Signed-off-by: Arnd Bergmann --- drivers/dma/tegra20-apb-dma.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index b7260749e8ee..eaafcbe4ca94 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -343,12 +343,6 @@ static int tegra_dma_slave_config(struct dma_chan *dc, } memcpy(&tdc->dma_sconfig, sconfig, sizeof(*sconfig)); - if (tdc->slave_id == TEGRA_APBDMA_SLAVE_ID_INVALID && - sconfig->device_fc) { - if (sconfig->slave_id > TEGRA_APBDMA_CSR_REQ_SEL_MASK) - return -EINVAL; - tdc->slave_id = sconfig->slave_id; - } tdc->config_init = true; return 0; From patchwork Mon Nov 15 08:54:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519145 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345715imj; Mon, 15 Nov 2021 00:55:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwb16nBX17tyWYQBjfZoBHbZwoOWv2GCcJ5S7188D/xGsFG0mv1IBSSHbr7+ZzALfVZ7CmP X-Received: by 2002:a63:9518:: with SMTP id p24mr23359573pgd.80.1636966553846; Mon, 15 Nov 2021 00:55:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966553; cv=none; d=google.com; s=arc-20160816; b=BMVMz/3pUxmxe8dPCppeZKTytGp478Cz3iaWbQbylHAdJUap4A0X1K4o3ZAJXyAq7Q 0M3OmPLV6Obhg5DH87aJzc9kMqvHaYUK+Mry2BtHTaY60HKBG8HzXrKhfgagbv0Tvyi9 W1tMFQb7C9NF8onOqCv/OhYa+lFnbhapmxcslZAXzSQ1NnMCFYoL01Dq4glm12UkQgxg fhyy+goKU/uly7G8mSIt2Z/7aSmJgtIosCVBZkNLSoXfN8mu8ImkHxhTKWkpcIQfrLqM 8Jdz9SvPgs5YM0DSB/L7M+CRSXzLZpF9f8brTb7UkJcLqPT679FJDLI2Pb/WtKO+FEF9 f6Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=Z53XpBSkP+iXq1oDYXoWhobjTehjbUJRpQI1QlVj4BU=; b=IbSHxt1b7Hra4/4QdpEWYtDlQodYYrr+b335H7EGcPcANMQ4J5VYGbpt890AEoiMk8 s6xRm3gNZgFmyFrdlPPFFFGsEXKmjzZDgMwIPTtlNFwSfXiQ1qi0BBiVuJceF+03FdUT K04wcDZenMqtloLozoJUx/6meOT3yhrCFtXOR4IVJw1bRo+NcgUn/PsukpAjGUbCXjW+ SBQk2k8HYwAeWBcmRQdr6Sc4LPAEtB43Ugw6ExBUUz1LgYAkAWP+R2qE0F3794IRW4KO fNiWsLlrrOyTHxFiPgYlEzNbX7Vo/CNIHkphcT0ixhyfVPrR05B2AmEHRqgAIDG67bYE TjSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=E3hAwHAF; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id nm6si19143756pjb.100.2021.11.15.00.55.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:55:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=E3hAwHAF; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BCBE86EB9D; Mon, 15 Nov 2021 08:55:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8FC76EBA8 for ; Mon, 15 Nov 2021 08:55:51 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 97B2063227; Mon, 15 Nov 2021 08:55:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966551; bh=t+sujmlGUVrYtWCA2Iqgm4qzwcVm4cE+7MUCYHiTmt8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E3hAwHAFBi1veWTZ9KC3LUqplVBzvhHkJdmHwzLmUaxHGxHQt/Uao9jUuL7+wYtM1 t5/KCd2DhDnIMvpS1fzLHld+q6AChRUElQMbmbJgDaTpHm5vW1Uyudi7cSpoV3wALW 3+TEcRqIWccqr7FIxw+On4njyPKMPuD/VUQ+uBZMxLJI2xjFiVqAFgV6Ym1M8MXblp H3AtGfulWPCW1XQE3Nvr6vFEwAXxjhfbUBy3AmIdd5/EjenYc84yhK4dgbFVtzWJe/ uGxVZ0BY9bYvtABbO19Hw4xqxf+bkbhZDmO0g57I7eSW+8dnN8ZNhH3IrlxeCNnqJt h19+P/ZGx52Ig== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 10/11] staging: ralink-gdma: stop using slave_id config Date: Mon, 15 Nov 2021 09:54:02 +0100 Message-Id: <20211115085403.360194-11-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Picking the connection between a DMA controller and its attached device is done through devicetree using the "dmas" property, which is implemented by the gdma driver, but it also allows overriding the "req" configuration with the slave_id field, as it was done in some linux-2.6 era drivers. There is no driver in the tree that sets these values, so stop interpreting them before anything accidentally starts relying on it. Rename the field in the channel from "slave_id" to "req" to better match the purpose and the naming in the hardware. If any driver actually starts using this DMA engine, it may be necessary to implement a .xlate callback that sets this field at probe time. Signed-off-by: Arnd Bergmann --- drivers/staging/ralink-gdma/ralink-gdma.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c index b5229bc6eae5..f00240e62e1b 100644 --- a/drivers/staging/ralink-gdma/ralink-gdma.c +++ b/drivers/staging/ralink-gdma/ralink-gdma.c @@ -106,7 +106,7 @@ struct gdma_dma_desc { struct gdma_dmaengine_chan { struct virt_dma_chan vchan; unsigned int id; - unsigned int slave_id; + unsigned int req; dma_addr_t fifo_addr; enum gdma_dma_transfer_size burst_size; @@ -194,7 +194,6 @@ static int gdma_dma_config(struct dma_chan *c, dev_err(dma_dev->ddev.dev, "only support 4 byte buswidth\n"); return -EINVAL; } - chan->slave_id = config->slave_id; chan->fifo_addr = config->dst_addr; chan->burst_size = gdma_dma_maxburst(config->dst_maxburst); break; @@ -203,7 +202,6 @@ static int gdma_dma_config(struct dma_chan *c, dev_err(dma_dev->ddev.dev, "only support 4 byte buswidth\n"); return -EINVAL; } - chan->slave_id = config->slave_id; chan->fifo_addr = config->src_addr; chan->burst_size = gdma_dma_maxburst(config->src_maxburst); break; @@ -288,12 +286,12 @@ static int rt305x_gdma_start_transfer(struct gdma_dmaengine_chan *chan) dst_addr = chan->fifo_addr; ctrl0 = GDMA_REG_CTRL0_DST_ADDR_FIXED | (8 << GDMA_RT305X_CTRL0_SRC_REQ_SHIFT) | - (chan->slave_id << GDMA_RT305X_CTRL0_DST_REQ_SHIFT); + (chan->req << GDMA_RT305X_CTRL0_DST_REQ_SHIFT); } else if (chan->desc->direction == DMA_DEV_TO_MEM) { src_addr = chan->fifo_addr; dst_addr = sg->dst_addr; ctrl0 = GDMA_REG_CTRL0_SRC_ADDR_FIXED | - (chan->slave_id << GDMA_RT305X_CTRL0_SRC_REQ_SHIFT) | + (chan->req << GDMA_RT305X_CTRL0_SRC_REQ_SHIFT) | (8 << GDMA_RT305X_CTRL0_DST_REQ_SHIFT); } else if (chan->desc->direction == DMA_MEM_TO_MEM) { /* @@ -365,12 +363,12 @@ static int rt3883_gdma_start_transfer(struct gdma_dmaengine_chan *chan) dst_addr = chan->fifo_addr; ctrl0 = GDMA_REG_CTRL0_DST_ADDR_FIXED; ctrl1 = (32 << GDMA_REG_CTRL1_SRC_REQ_SHIFT) | - (chan->slave_id << GDMA_REG_CTRL1_DST_REQ_SHIFT); + (chan->req << GDMA_REG_CTRL1_DST_REQ_SHIFT); } else if (chan->desc->direction == DMA_DEV_TO_MEM) { src_addr = chan->fifo_addr; dst_addr = sg->dst_addr; ctrl0 = GDMA_REG_CTRL0_SRC_ADDR_FIXED; - ctrl1 = (chan->slave_id << GDMA_REG_CTRL1_SRC_REQ_SHIFT) | + ctrl1 = (chan->req << GDMA_REG_CTRL1_SRC_REQ_SHIFT) | (32 << GDMA_REG_CTRL1_DST_REQ_SHIFT) | GDMA_REG_CTRL1_COHERENT; } else if (chan->desc->direction == DMA_MEM_TO_MEM) { From patchwork Mon Nov 15 08:54:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 519146 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp5345818imj; Mon, 15 Nov 2021 00:56:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+ZheHoc1+E7x7Y4O8OkcHZNskBpcjNQUFCHCC4N4UvzAdie4lQuBqTOJ63jHdCkT5hqIs X-Received: by 2002:a63:2020:: with SMTP id g32mr23018326pgg.208.1636966560630; Mon, 15 Nov 2021 00:56:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636966560; cv=none; d=google.com; s=arc-20160816; b=scS9UP21GFOZ+n6gW6XRICPdfriAy7WfdR55dLzr2GZkKYyBAPCsYYc8aBeIE8xr/4 ZErdfJTC22phCSp/zLatGOitrOPWqp311o81JKqV9jfEcstXc5s3CKiy+d4wZ7W0SCBt 71U4d+BbzERYZ7ezsRKoA9dM0k1fDMcJJrhYeV15KJPIKccjWKTpVbR+1Ah9gudlH5Mn VXgGPd7DhGhOT3lNza0+8YUijtTPjlFDYk8h7RHBLmBYrYWZKss+uCe9eb22I0bjIQ2s MDP2awHkaycQxSfAwn3oh0yiJjPS/8jzGJIKMfWQHVulhHOmAG0D0cG4c4Kns5+viO0i e8eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=8iScmhED4vjM0v72Z4VPJ6LuI5KTNRHCd4uZ45V6VCc=; b=PjaWd3GMT0A7r/yDtBNi+fMU+FfZK6UXXqTfebyJ6tqB2aTzuLgVpXlkcSnwZWEVM3 phzWkoBp6+aj2i2SzpXIXllqUcD8uG34CEBUMfkXeU5G22kA3UF/WPrlp6UD7eaj82oF mJ/a/gVleu8urW99PZTEQOrzWDvXC3bKWdEGOVZYpnj1URy84hbNzI+cFMT/tcgE3Tsw l/JM2ERL1g/dJOjJHkELEjfWSAdsQSRnc0S1zgh6vMEpAoDBnnVVM2jBMIWb0KWrh76T bunAEF+2YWTH+RUWohE5UdiD0k3qGlGr7tgmh1Juw2eHaYIRg7KsYB3Yh8Y5wGDo3F2D ga7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=LdZ6xF0x; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id bf4si3718014pjb.119.2021.11.15.00.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 00:56:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=LdZ6xF0x; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 055496EBA8; Mon, 15 Nov 2021 08:55:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5A4DF6EBA8 for ; Mon, 15 Nov 2021 08:55:58 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 1D85961BF5; Mon, 15 Nov 2021 08:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636966558; bh=KymEuSb1ZBu9d4ip60ZapuAOc2fPUmm65BckI1F9t+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LdZ6xF0xp+O72e2bWrz1JbVB8H175gzm3ebqcgB4b1TFRnEbOtg/Co/2UVmy2RSYO K4PGopsAL2+EPUBQXn3pIZuRLnOiV7Z4ZHRzhRaGpOOilkyT8qB7djWEyRGQxY+o07 0pURtU5ha6Bqhqi3VRo20hpuTebBqhRUMgKKcND/ItqTEUbbBG6gtFAFRdgoUlbWQv nllnKfHGybN+48IS6aBEK9XM+8ihm/vdNwSp8OLBPdHs4lV1MKpoIy38LN4jK4yIhT e7DvDqpq2WV2gb8/H5hLIdnkM9Qc2HOyUeSrulI8xZE0lHPXJ5SUm3GD7JPkNCpR/k kEJCWgx/yAgzA== From: Arnd Bergmann To: Vinod Koul Subject: [PATCH 11/11] dmaengine: remove slave_id config field Date: Mon, 15 Nov 2021 09:54:03 +0100 Message-Id: <20211115085403.360194-12-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211115085403.360194-1-arnd@kernel.org> References: <20211115085403.360194-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-mtd@lists.infradead.org, Laurent Pinchart , linux-spi@vger.kernel.org, Robert Jarzmik , Chunyan Zhang , linux-staging@lists.linux.dev, Michal Simek , Jon Hunter , Andy Gross , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Orson Zhai , Nicolas Saenz Julienne , Arnd Bergmann , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Mark Brown , linux-rpi-kernel@lists.infradead.org, Jaroslav Kysela , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, Scott Branden , Hyun Kwon , Greg Kroah-Hartman , linux-mmc@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org, Laxman Dewangan , Baolin Wang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann All references to the slave_id field have been removed, so remove the field as well to prevent new references from creeping in again. Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart --- include/linux/dmaengine.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 9000f3ffce8b..0349b35235e6 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -418,9 +418,6 @@ enum dma_slave_buswidth { * @device_fc: Flow Controller Settings. Only valid for slave channels. Fill * with 'true' if peripheral should be flow controller. Direction will be * selected at Runtime. - * @slave_id: Slave requester id. Only valid for slave channels. The dma - * slave peripheral will have unique id as dma requester which need to be - * pass as slave config. * @peripheral_config: peripheral configuration for programming peripheral * for dmaengine transfer * @peripheral_size: peripheral configuration buffer size @@ -448,7 +445,6 @@ struct dma_slave_config { u32 src_port_window_size; u32 dst_port_window_size; bool device_fc; - unsigned int slave_id; void *peripheral_config; size_t peripheral_size; };