From patchwork Mon Apr 14 06:29:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barry Song <21cnbao@gmail.com> X-Patchwork-Id: 3976691 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 89FD79F2CC for ; Mon, 14 Apr 2014 06:30:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C03D7201C8 for ; Mon, 14 Apr 2014 06:30:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEB81201D3 for ; Mon, 14 Apr 2014 06:30:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750819AbaDNGaw (ORCPT ); Mon, 14 Apr 2014 02:30:52 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:56089 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbaDNGaw (ORCPT ); Mon, 14 Apr 2014 02:30:52 -0400 Received: by mail-pd0-f172.google.com with SMTP id p10so7702106pdj.17 for ; Sun, 13 Apr 2014 23:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ko/UocSPAE9Fi9TeD7H18D7yXileWAw3IQWtx+5qzXY=; b=x2EGrEsGgUIN8daNPDLuYqxEYJqK0rmXqXbSjU2phFtzCKy8a7KHA4pZL9cR1Ewily 2+iMUX5T34unFK5gtrLF+1RCPaXlPOScaisEmg4T90QIKthmqGcv18WUIkhsVk8/RVrz NiPiHnlWJUyWXtyyTlbafFE1GblbA4q5fTj1WO1r+pqX6hEdHBf88+Ow8yLW6c+vXRaD i8Tg3l4h31nzc0tYy1n5b+lTm4Tw9M8GDk11uQCvjQPhSv53HweompHRBtknpyXAn9uX YvdFB3ZUOE5gFx4iOEyWxk+ktE/bBCr5DR8PxGpORlVjo+y8RrJhx6Ft4WcbarsZh3Q1 gzMA== X-Received: by 10.68.242.68 with SMTP id wo4mr42682268pbc.32.1397457051824; Sun, 13 Apr 2014 23:30:51 -0700 (PDT) Received: from localhost.localdomain ([117.136.8.58]) by mx.google.com with ESMTPSA id cz3sm31653608pbc.9.2014.04.13.23.30.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 13 Apr 2014 23:30:51 -0700 (PDT) From: Barry Song <21cnbao@gmail.com> To: broonie@kernel.org, linux-spi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, workgroup.linux@csr.com, Qipan Li , Barry Song Subject: [PATCH 1/5] spi: sirf: correct TXFIFO empty interrupt status bit Date: Mon, 14 Apr 2014 14:29:57 +0800 Message-Id: <1397457001-5266-2-git-send-email-21cnbao@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397457001-5266-1-git-send-email-21cnbao@gmail.com> References: <1397457001-5266-1-git-send-email-21cnbao@gmail.com> 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Qipan Li the old code uses wrong marco - SIRFSOC_SPI_FIFO_FULL is not for FIFO interrupt status, it is for FIFO status. here in the ISR, SIRFSOC_SPI_TXFIFO_EMPTY is the right bit for SPI TXFIFO interrupt status. Signed-off-by: Qipan Li Signed-off-by: Barry Song --- drivers/spi/spi-sirf.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index 1a77ad5..51d7c98 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c @@ -287,8 +287,8 @@ static irqreturn_t spi_sirfsoc_irq(int irq, void *dev_id) sspi->left_rx_word) sspi->rx_word(sspi); - if (spi_stat & (SIRFSOC_SPI_FIFO_EMPTY - | SIRFSOC_SPI_TXFIFO_THD_REACH)) + if (spi_stat & (SIRFSOC_SPI_TXFIFO_EMPTY | + SIRFSOC_SPI_TXFIFO_THD_REACH)) while (!((readl(sspi->base + SIRFSOC_SPI_TXFIFO_STATUS) & SIRFSOC_SPI_FIFO_FULL)) && sspi->left_tx_word)