From patchwork Thu Jan 8 00:06:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 17290 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 625F3DE3CA for ; Thu, 8 Jan 2009 17:03:20 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1LKnxV-0005Bo-Hg; Thu, 08 Jan 2009 06:01:33 +0000 Received: from vpn.static.83-173-204-231.cybernet.ch ([83.173.204.231] helo=localhost.localdomain) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1LKibU-00087o-70 for linux-mtd@lists.infradead.org; Thu, 08 Jan 2009 00:18:28 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3) with ESMTP id n0806gg8019279; Thu, 8 Jan 2009 01:06:43 +0100 Received: (from sumo@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id n0806gWN019277; Thu, 8 Jan 2009 01:06:42 +0100 From: Marcel Ziswiler To: linux-mtd@lists.infradead.org Subject: [PATCH 1/3] [MTD] [NAND] pxa3xx_nand.c: Fix typo that prevented non DMA aka polling mode from working correctly. Date: Thu, 8 Jan 2009 01:06:38 +0100 Message-Id: <1231373200-19248-2-git-send-email-marcel@ziswiler.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1231373200-19248-1-git-send-email-marcel@ziswiler.com> References: <1231373200-19248-1-git-send-email-marcel@ziswiler.com> X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-Spam-Score: 3.7 (+++) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (3.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 2.9 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL [83.173.204.231 listed in zen.spamhaus.org] 0.8 HELO_LH_LD HELO_LH_LD X-Mailman-Approved-At: Thu, 08 Jan 2009 01:01:32 -0500 Cc: Marcel Ziswiler , eric.y.miao@gmail.com, Marcel Ziswiler , LW@KARO-electronics.de X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Due to __raw_{read,write}sl() being 'long' size based the shift operations need to divide the size in bytes by 4 which is achieved by ">> 2". Acked-by: Eric Miao Signed-off-by: Marcel Ziswiler --- drivers/mtd/nand/pxa3xx_nand.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index cc55cbc..dc1cc76 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -468,7 +468,7 @@ static int handle_data_pio(struct pxa3xx_nand_info *info) switch (info->state) { case STATE_PIO_WRITING: __raw_writesl(info->mmio_base + NDDB, info->data_buff, - info->data_size << 2); + info->data_size >> 2); enable_int(info, NDSR_CS0_BBD | NDSR_CS0_CMDD); @@ -480,7 +480,7 @@ static int handle_data_pio(struct pxa3xx_nand_info *info) break; case STATE_PIO_READING: __raw_readsl(info->mmio_base + NDDB, info->data_buff, - info->data_size << 2); + info->data_size >> 2); break; default: printk(KERN_ERR "%s: invalid state %d\n", __func__,