From patchwork Fri May 31 19:42:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13682074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 171C0C25B75 for ; Fri, 31 May 2024 19:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=EvjmPBNGbXR24yO34oT9fwIqPDZ6RpOVIA05kXLFF5E=; b=U+Z6OsDmdxTGSp AIE9Id+5KZgMlNVyjOyLfMx7nqR3TDm2Evbtb9B/ZzPUdSnSXVXjErh5i4I3jQPDq9t3lsaC9lhh/ De6W5XeYCyDzUtbnZSEhiqeO1X8FVLTSTJutpUZ95roE2FJ6o3vIOTInd6YTB2B4RRYJlgejOdkVq RRGgHzqkRvlEPeAnjQXtaDPJCy7iUFo1qpkF0J+RqzO6useTdOKu8ZeoPNOQtgfFb0InWuJ/yh+IA vMb9V8Lebul7CagBXQKo4bcx4ZU+8r3UAW8J6qsZO4soFsPWscAHWu7ShZZRoPgEkeZhOcXlKeh77 5ZfWyckts74CHanCtHQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD8E7-0000000BISx-2gg0; Fri, 31 May 2024 19:47:47 +0000 Received: from mgamail.intel.com ([192.198.163.7]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD8Du-0000000BIOc-1t3h for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2024 19:47:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717184855; x=1748720855; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ONMDe0AeAis0si41LBoi+8F/DBMmBIHYuIzcZWniouM=; b=UI0z9ojIwyQfRhyAF1M0e8o7bSwDmoS0xFA259tnvJZHobpAkQJjxAkB H3QdYzXz+tT/6HTQSOh+P0A9yZUeRBGU2gCuRIMpu9GbZKezRluBr/wVI UT2P0hZbCVL3yJQ172Vy/A4gb16e/xBLjS0hyx2kWbEyCmBY2FeDq1O7r KpsbKrb9eO5MIeLy0xfGPv18GBEdWXc13LqO2RwYF+SJkPXAlXOLTVGEC 8SYRhNgwvUYlKk0lyeT+W6XrJl0S6OyHl6izLqIZTX+LbsH1OtHutC0zr RfEcAgD5bpohAwn5+zbVwFnGsxJx6iqN5Lllvv9rdRrsYAkA5+HUs+mHH w==; X-CSE-ConnectionGUID: uVEvAqweT7WdE+Q6GFVisA== X-CSE-MsgGUID: dS+t6t2jRKSwDr0Z4nGgBg== X-IronPort-AV: E=McAfee;i="6600,9927,11089"; a="39144631" X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="39144631" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 12:47:29 -0700 X-CSE-ConnectionGUID: L/T6RM0KQwWWXDKRMF4JAA== X-CSE-MsgGUID: HHuZNyPCQbuMsitkKuFmWw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,205,1712646000"; d="scan'208";a="67452618" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP; 31 May 2024 12:47:26 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E391E228; Fri, 31 May 2024 22:47:24 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Mark Brown , Yang Yingliang , Christophe JAILLET , Thangaraj Samynathan , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Cc: Serge Semin , Daniel Mack , Haojian Zhuang , Robert Jarzmik , =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E?= =?utf-8?q?_A_=2E_Prado?= , Neil Armstrong Subject: [PATCH v1 0/8] spi: Rework DMA mapped flag Date: Fri, 31 May 2024 22:42:32 +0300 Message-ID: <20240531194723.1761567-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240531_124734_641226_6B17B357 X-CRM114-Status: GOOD ( 11.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The first part of the series (patches 1 to 7) is an introduction of a new helper followed by the user conversion. This consolidates the same code and also makes patch 8 (last one) be localised to the SPI core part. The last patch is the main rework to get rid of a recently introduced hack with a dummy SG list and move to the transfer-based DMA mapped flag. That said, the patches 1 to 7 may be applied right away since they have no functional change intended, while the last one needs more testing and reviewing. Andy Shevchenko (8): spi: Introduce internal spi_xfer_is_dma_mapped() helper spi: dw: Use new spi_xfer_is_dma_mapped() helper spi: ingenic: Use new spi_xfer_is_dma_mapped() helper spi: omap2-mcspi: Use new spi_xfer_is_dma_mapped() helper spi: pxa2xx: Use new spi_xfer_is_dma_mapped() helper spi: pci1xxxx: Use new spi_xfer_is_dma_mapped() helper spi: qup: Use new spi_xfer_is_dma_mapped() helper spi: Rework per message DMA mapped flag to be per transfer drivers/spi/internals.h | 8 ++++ drivers/spi/spi-dw-core.c | 4 +- drivers/spi/spi-ingenic.c | 4 +- drivers/spi/spi-omap2-mcspi.c | 8 ++-- drivers/spi/spi-pci1xxxx.c | 5 ++- drivers/spi/spi-pxa2xx.c | 6 +-- drivers/spi/spi-qup.c | 9 ++--- drivers/spi/spi.c | 73 +++++++++++++---------------------- include/linux/spi/spi.h | 11 ++++-- 9 files changed, 59 insertions(+), 69 deletions(-) Tested-by: Neil Armstrong # on SM8650-QRD Tested-by: NĂ­colas F. R. A. Prado