From patchwork Wed Jan 7 02:40:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 17068 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 5CFA0474D2 for ; Wed, 7 Jan 2009 19:50:16 +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 1LKU4o-00077A-PT; Wed, 07 Jan 2009 08:47:46 +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 1LKOfK-0003mG-4V for linux-mtd@lists.infradead.org; Wed, 07 Jan 2009 03:01:06 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3) with ESMTP id n072fYa8002465; Wed, 7 Jan 2009 03:41:50 +0100 Received: (from sumo@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id n072fXGs002464; Wed, 7 Jan 2009 03:41:33 +0100 From: Marcel Ziswiler To: linux-mtd@lists.infradead.org Subject: [PATCH 1/3] Fix typo that prevented non DMA aka polling mode from working correctly. Date: Wed, 7 Jan 2009 03:40:51 +0100 Message-Id: <1231296053-2378-2-git-send-email-marcel@ziswiler.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1231296053-2378-1-git-send-email-marcel@ziswiler.com> References: <1231296053-2378-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: Wed, 07 Jan 2009 03:47:44 -0500 Cc: eric.y.miao@gmail.com, Marcel Ziswiler 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". 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 fc41444..761e43d 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__,