From patchwork Thu Nov 8 07:06:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 10673613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80FDC1057 for ; Thu, 8 Nov 2018 07:12:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DD1F2D926 for ; Thu, 8 Nov 2018 07:12:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61FE82D935; Thu, 8 Nov 2018 07:12:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57E822D926 for ; Thu, 8 Nov 2018 07:12:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725945AbeKHQq4 (ORCPT ); Thu, 8 Nov 2018 11:46:56 -0500 Received: from mailout3.hostsharing.net ([176.9.242.54]:43049 "EHLO mailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725724AbeKHQqz (ORCPT ); Thu, 8 Nov 2018 11:46:55 -0500 X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Thu, 08 Nov 2018 11:46:54 EST Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by mailout3.hostsharing.net (Postfix) with ESMTPS id 0F337101E6B31; Thu, 8 Nov 2018 08:06:10 +0100 (CET) Received: from localhost (unknown [89.246.108.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id 77135603E05D; Thu, 8 Nov 2018 08:06:09 +0100 (CET) X-Mailbox-Line: From 901ff28c305e56d3349d3e044781c095d8e77a3d Mon Sep 17 00:00:00 2001 Message-Id: From: Lukas Wunner Date: Thu, 8 Nov 2018 08:06:10 +0100 Subject: [PATCH 0/7] Raspberry Pi spi0 improvements MIME-Version: 1.0 To: Mark Brown , Eric Anholt , Stefan Wahren Cc: Mathias Duckeck , Frank Pavlic , Martin Sperl , Noralf Tronnes , linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Here's a first batch of improvements for the spi0 master on the Raspberry Pi. The meat of the series is in its last two patches: * Patch [6/7] allows DMA for transfer buffers starting at an offset not a multiple of 4. This overcomes a limitation affecting Ethernet drivers such as ks8851 which call netdev_alloc_skb_ip_align() to allocate deliberately unaligned receive buffers. * Patch [7/7] speeds up PIO transfers by not polling the RX FIFO when it is known to contain data, or the TX FIFO when it is known to have free space. The preceding patches fix rarely encountered bugs, remove obsolete code and add documentation. The series has been tested extensively on the "Revolution Pi" family of open source PLCs (https://revolution.kunbus.com/), but further testing would be welcome to raise the confidence. Thanks, Lukas Lukas Wunner (7): spi: bcm2835: Avoid finishing transfer prematurely in IRQ mode spi: bcm2835: Fix book-keeping of DMA termination spi: bcm2835: Fix race on DMA termination spi: bcm2835: Drop unused code for native Chip Select spi: bcm2835: Document struct bcm2835_spi spi: bcm2835: Overcome sglist entry length limitation spi: bcm2835: Speed up FIFO access if fill level is known drivers/spi/spi-bcm2835.c | 478 ++++++++++++++++++++++++++------------ 1 file changed, 334 insertions(+), 144 deletions(-) Reviewed-By: Martin Sperl