From patchwork Tue Feb 9 18:10:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Olbrich X-Patchwork-Id: 8264691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EC2139F38B for ; Tue, 9 Feb 2016 18:13:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3052B2021F for ; Tue, 9 Feb 2016 18:13:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6341C20218 for ; Tue, 9 Feb 2016 18:13:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aTCle-0003fo-0t; Tue, 09 Feb 2016 18:12:02 +0000 Received: from mout.gmx.net ([212.227.15.18]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aTCkn-0002t1-89; Tue, 09 Feb 2016 18:11:15 +0000 Received: from chaos-desktop.fritz.box ([92.217.39.22]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LZiLk-1ZkCoW1Qke-00lV10; Tue, 09 Feb 2016 19:10:40 +0100 From: stephanolbrich@gmx.de To: Mark Brown , Stephen Warren , Lee Jones , Eric Anholt , linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] spi: bcm2835aux: disable tx fifo empty irq Date: Tue, 9 Feb 2016 19:10:33 +0100 Message-Id: <1455041435-8015-3-git-send-email-stephanolbrich@gmx.de> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455041435-8015-1-git-send-email-stephanolbrich@gmx.de> References: <1455041435-8015-1-git-send-email-stephanolbrich@gmx.de> X-Provags-ID: V03:K0:R9NMkV43Jjk00ZDSgZa03xkZ0v2wGXwZYLFzYmaN1H1yccNGly3 x1ICxbDWBPFJxuSUYKB74iLGEzXiceH3AJM148l1aEb/ZAtgo17afHmGz4bCQIu7kGzdXRK VovECMRqkF0Czhv8vc8l0x1RL39jBC3wlQXfIXFmrSIMrYMC3A/r3QvdmIOrhaMwHnH9Z5L gYb9h/OtYT1BKtPPNu5yw== X-UI-Out-Filterresults: notjunk:1; V01:K0:wmLJ9vn8Zu4=:AnAlmPYBFDVnEN+GBtbA87 nSHRoklRtHlm7Y+ETmvVHGFIOeMsbDLKFyPbXKgb7DcFQw3rK6Qi+U0vGhglf82/PS/VV8s60 yv2x+9JiHQecObCejPTSLe1KvnosvuAXHE+qdzsyhG4qGsHVs2H9PpoClegFG3AypWAVpXP8I C2VJJS/dY9HoyljDB38aTTCsnGvLMdWkEa+nAscmP1koMqSfXmaTDbL5nNY4VRrzrnXEodzQz fUjsetiAp+efyRFes5QVnhK9PtaLhcwRbs/wrtjzLQyqcA0bvtptRSwUbTy6O8auLe09b8RUz vr6pESlb1RH40S8uzBYbgAecVK/ZHIh76deNDFWnlSoaHF1Wy6UowBNwLlITDGI6sJDjvJDZr EZHZN6dXeXgaL/mBNOIkxrRTyT/LrSSh2Xg9U/sj90hMVNrVxmm4ZLMm1z755/GOjuKpRm5Gj RUjGG//3C1Io6Wb8RnNTewTAo+c+mXaE8pp/qG3yvMI7BaaERI11KXJnXjspMKyuV/kOCoF2o ix3ITgMUC/Jbf7Zz48rw20ckdyWYCUKbIcLIJJH0FHpkv35mzPmCr7naE0gVta1CFNWxNepar 9g42Zojrtz6BYworqlXNzhnD4ae3GwFkjh/FOHHoS3nzU9gqSjtcITH6vrALk93UFnvY+dOay 0GE6frL572D6d7maPvWNyccZ7jrSNNKJ7b7QMlKHmH98K/N7+eMSaRmE3ceYJB0yqLtVyPlQQ oQDOjL4jk/A2LfMGAv0MOfN0teN3pYBoZ/QVYWkAQ65ekyP3+KV1MDmjwjA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160209_101109_841649_159C1E57 X-CRM114-Status: UNSURE ( 7.08 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephan Olbrich MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Stephan Olbrich The tx empty irq can be disabled when all data was copied. This prevents unnecessary interrupts while the last bytes are sent. Signed-off-by: Stephan Olbrich Reviewed-by: Eric Anholt --- drivers/spi/spi-bcm2835aux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c index ecc73c0..d2f0067 100644 --- a/drivers/spi/spi-bcm2835aux.c +++ b/drivers/spi/spi-bcm2835aux.c @@ -212,6 +212,12 @@ static irqreturn_t bcm2835aux_spi_interrupt(int irq, void *dev_id) ret = IRQ_HANDLED; } + if (!bs->tx_len) { + /* disable tx fifo empty interrupt */ + bcm2835aux_wr(bs, BCM2835_AUX_SPI_CNTL1, bs->cntl[1] | + BCM2835_AUX_SPI_CNTL1_IDLE); + } + /* and if rx_len is 0 then wake up completion and disable spi */ if (!bs->rx_len) { bcm2835aux_spi_reset_hw(bs);