From patchwork Tue Sep 27 11:21:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Whitchurch X-Patchwork-Id: 12990460 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57C6DC6FA94 for ; Tue, 27 Sep 2022 11:23:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231906AbiI0LX3 (ORCPT ); Tue, 27 Sep 2022 07:23:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230461AbiI0LWv (ORCPT ); Tue, 27 Sep 2022 07:22:51 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 768C513C86E; Tue, 27 Sep 2022 04:21:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1664277701; x=1695813701; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=h7GywIaLDpaaXMq+bfRFzam8dsivXNekzUyZgu12Jds=; b=UeNSzlgIq4jOf6qEanfXMu57mF/IXqYC6rVJRG7HwXpM0gNgdisqXZxU 12JtbyBrbZO8hMuOALT5rTRPXKTghWBIF8ImvU2redjCbpgrg27VSQooW FchmKGkZ/e1sjN96773hqopa4P3e0+dnv6mB4W/F9SpDkQ5YjGimshh33 ECwpyEdheytthxYuoCQ5J1QDCzz1LkGHQGVPdvRL9i/02V50BOw8fX4pM OgZLXFYlz1/Ztx6MJnIgfpTN22yvaBzU6GIcZVGm3EciUdY5hfNmY5fFf DwOYAuEylmLe1Vpsi6031tbo3NS/rdvMtIxpWF1CAOJvK+1XDuT6oa51a Q==; From: Vincent Whitchurch To: , , CC: , Vincent Whitchurch , , , , , Subject: [PATCH v2 0/4] spi: Fix DMA bugs in (not only) spi-s3c64xx Date: Tue, 27 Sep 2022 13:21:13 +0200 Message-ID: <20220927112117.77599-1-vincent.whitchurch@axis.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org v2: - Drop merged patch adding new test to spi-loopback-test - Fix compiler warning in !HAS_DMA builds - Add support to split transfers to core This series fixes some bugs I found while running spi-loopback-test with spi-s3c64xx. The first problem (which I actually noticed while trying to fix the second problem with transfers >64KiB) seems to be a generic issue which affects several drivers so I fixed it in the core. The series has been tested on ARTPEC-8, which has a version of the IP similar to Exynos 7 and with 64 byte FIFOs (compatible with "tesla,fsd-spi"). Cc: alim.akhtar@samsung.com Cc: linux-spi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Vincent Whitchurch (4): spi: Save current RX and TX DMA devices spi: Fix cache corruption due to DMA/PIO overlap spi: Split transfers larger than max size spi: s3c64xx: Fix large transfers with DMA drivers/spi/spi-s3c64xx.c | 9 +++ drivers/spi/spi.c | 137 ++++++++++++++++++++++++++++---------- include/linux/spi/spi.h | 4 ++ 3 files changed, 114 insertions(+), 36 deletions(-)