From patchwork Thu Jan 8 22:38:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 17467 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 298C84750F for ; Fri, 9 Jan 2009 15:20:15 +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 1LL8on-0004Db-NT; Fri, 09 Jan 2009 04:17:57 +0000 Received: from mout.perfora.net ([74.208.4.195]) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1LL3X3-0001tz-Kq for linux-mtd@lists.infradead.org; Thu, 08 Jan 2009 22:39:17 +0000 Received: from localhost.localdomain (pub082136091071.dh-hfc.datazug.ch [82.136.91.71]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1LL3Wk0wjU-0007ce; Thu, 08 Jan 2009 17:39:04 -0500 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3) with ESMTP id n08McuVe004465; Thu, 8 Jan 2009 23:38:56 +0100 Received: (from sumo@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id n08Mcuq0004464; Thu, 8 Jan 2009 23:38:56 +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 23:38:54 +0100 Message-Id: <1231454336-4430-2-git-send-email-marcel@ziswiler.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1231454336-4430-1-git-send-email-marcel@ziswiler.com> References: <1231454336-4430-1-git-send-email-marcel@ziswiler.com> X-Provags-ID: V01U2FsdGVkX19nBsfukd9fl+RkEhC8PCIob2fwzeZpIqVLC04 ReOZuX67eaCQW53YoPtRByfcCoiuaMbOPa2QXFSBTzzjRcgRPh vZOLG2AuplxTPLhmwHaTTC8aRNBCWHA X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Thu, 08 Jan 2009 23:17:55 -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__,