From patchwork Thu Jun 30 12:38:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmavathi Venna X-Patchwork-Id: 931722 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5U6psXI008684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 30 Jun 2011 06:52:15 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1QcB6N-0003cK-HD; Thu, 30 Jun 2011 06:51:51 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1QcB6M-0003cF-1G for spi-devel-general@lists.sourceforge.net; Thu, 30 Jun 2011 06:51:50 +0000 X-ACL-Warn: Received: from mailout1.samsung.com ([203.254.224.24]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1QcB6J-0006W3-SW for spi-devel-general@lists.sourceforge.net; Thu, 30 Jun 2011 06:51:50 +0000 Received: from epcpsbgm2.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LNL00MJACDL1VC0@mailout1.samsung.com> for spi-devel-general@lists.sourceforge.net; Thu, 30 Jun 2011 15:51:39 +0900 (KST) X-AuditID: cbfee61b-b7bfdae000006d51-52-4e0c1cfa0751 Received: from epmmp1 ( [203.254.227.16]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 99.C4.27985.AFC1C0E4; Thu, 30 Jun 2011 15:51:39 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LNL00EXBCDRRJ@mmp1.samsung.com> for spi-devel-general@lists.sourceforge.net; Thu, 30 Jun 2011 15:51:38 +0900 (KST) Date: Thu, 30 Jun 2011 08:38:56 -0400 From: Padmavathi Venna Subject: [PATCH 2/2] SPI: SAMSUNG: Bug fix for SPI with different FIFO level In-reply-to: <1309437536-9315-1-git-send-email-padma.v@samsung.com> To: kgene.kim@samsung.com, jassisinghbrar@gmail.com, sbkim73@samsung.com, grant.likely@secretlab.ca, spi-devel-general@lists.sourceforge.net, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Message-id: <1309437536-9315-2-git-send-email-padma.v@samsung.com> X-Mailer: git-send-email 1.7.0.4 References: <1309437536-9315-1-git-send-email-padma.v@samsung.com> X-Brightmail-Tracker: AAAAAA== X-Spam-Score: 2.4 (++) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 2.4 DATE_IN_FUTURE_03_06 Date: is 3 to 6 hours after Received: date 0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1QcB6J-0006W3-SW X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Jun 2011 06:52:16 +0000 (UTC) Fixed the bug in transmission status check for 64 bytes FIFO level. Signed-off-by: Padmavathi Venna Acked-by: Jassi Brar Acked-by: Grant Likely --- drivers/spi/spi_s3c64xx.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi_s3c64xx.c b/drivers/spi/spi_s3c64xx.c index 795828b..8945e20 100644 --- a/drivers/spi/spi_s3c64xx.c +++ b/drivers/spi/spi_s3c64xx.c @@ -116,9 +116,7 @@ (((i)->fifo_lvl_mask + 1))) \ ? 1 : 0) -#define S3C64XX_SPI_ST_TX_DONE(v, i) ((((v) >> (i)->rx_lvl_offset) & \ - (((i)->fifo_lvl_mask + 1) << 1)) \ - ? 1 : 0) +#define S3C64XX_SPI_ST_TX_DONE(v, i) (((v) & (1 << (i)->tx_st_done)) ? 1 : 0) #define TX_FIFO_LVL(v, i) (((v) >> 6) & (i)->fifo_lvl_mask) #define RX_FIFO_LVL(v, i) (((v) >> (i)->rx_lvl_offset) & (i)->fifo_lvl_mask)