From patchwork Thu Jan 7 06:46:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vimal singh X-Patchwork-Id: 71549 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o076koLI020207 for ; Thu, 7 Jan 2010 06:46:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753771Ab0AGGqt (ORCPT ); Thu, 7 Jan 2010 01:46:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752906Ab0AGGqt (ORCPT ); Thu, 7 Jan 2010 01:46:49 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:57036 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752822Ab0AGGqs convert rfc822-to-8bit (ORCPT ); Thu, 7 Jan 2010 01:46:48 -0500 Received: by bwz27 with SMTP id 27so11205603bwz.21 for ; Wed, 06 Jan 2010 22:46:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=vqmlGCz+tK/h8TWPLyulT5SCzc9pseQlWN8W+SfKG9Y=; b=H5dgITLyQyn7JLjPUDJfDXvMkksgjJJzTV6QahYxeTR3grBc9en+09ECb/GYZ042nh rsvMNFDt9gEoGS2Nnh+Bk6N3HlNUHBxEJ0FXGi1iRMU8QXty9lP/qG4x/uPatUNLRjF3 3BIRQ0K45kRBF6cOu9WE4MognQKsyAnFfniGg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ZbNrUU9Oy2XVqmyvkr/L0aN6qhPDh17Y7hnDvdp7NpjnVXlXsggSSjj2/KdDLAB9zh BiXyUsK3zD0hUQQgfqt8kuKPqCl6npESXlQgb5cwNnZ6WLNBppSLigvUKN9lg3SOrJRv 8KubjNO+G+nlCT33LFly3HSf+FgHj6tpqUMNs= MIME-Version: 1.0 Received: by 10.204.154.208 with SMTP id p16mr1531414bkw.80.1262846806102; Wed, 06 Jan 2010 22:46:46 -0800 (PST) In-Reply-To: References: From: Vimal Singh Date: Thu, 7 Jan 2010 12:16:26 +0530 Message-ID: Subject: Re: [PATCH 3/3][NAND][OMAP]: Fixing issue in oamp nand driver in prefetch mode read To: Linux MTD Cc: linux-omap@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 16120e2..7df303a 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -295,11 +295,14 @@ static void omap_read_buf_pref(struct u32 *p = (u32 *)buf; /* take care of subpage reads */ - for (; len % 4 != 0; ) { - *buf++ = __raw_readb(info->nand.IO_ADDR_R); - len--; + if (len % 4) { + if (info->nand.options & NAND_BUSWIDTH_16) + omap_read_buf16(mtd, buf, len % 4); + else + omap_read_buf8(mtd, buf, len % 4); + p = (u32 *) (buf + len % 4); + len -= len % 4; } - p = (u32 *) buf; /* configure and start prefetch transfer */ ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0);