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: 8264651 Return-Path: X-Original-To: patchwork-linux-spi@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 B07669F4DD for ; Tue, 9 Feb 2016 18:11:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2A762021F for ; Tue, 9 Feb 2016 18:11:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 041C420218 for ; Tue, 9 Feb 2016 18:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756833AbcBISLT (ORCPT ); Tue, 9 Feb 2016 13:11:19 -0500 Received: from mout.gmx.net ([212.227.15.18]:50146 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756803AbcBISLS (ORCPT ); Tue, 9 Feb 2016 13:11:18 -0500 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 Cc: Stephan Olbrich 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= Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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);