From patchwork Tue Jan 10 23:27:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 135324 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2201EB6EE8 for ; Wed, 11 Jan 2012 10:27:23 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6B88028786; Wed, 11 Jan 2012 00:27:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aPyC-32n04UV; Wed, 11 Jan 2012 00:27:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5F7642874A; Wed, 11 Jan 2012 00:27:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 995922874A for ; Wed, 11 Jan 2012 00:27:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mtdCbywKFpDC for ; Wed, 11 Jan 2012 00:27:16 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe002.messaging.microsoft.com [216.32.181.182]) by theia.denx.de (Postfix) with ESMTPS id 74D1F285C2 for ; Wed, 11 Jan 2012 00:27:15 +0100 (CET) Received: from mail210-ch1-R.bigfish.com (10.43.68.242) by CH1EHSOBE009.bigfish.com (10.43.70.59) with Microsoft SMTP Server id 14.1.225.23; Tue, 10 Jan 2012 23:27:13 +0000 Received: from mail210-ch1 (localhost [127.0.0.1]) by mail210-ch1-R.bigfish.com (Postfix) with ESMTP id 92D5B1803BE; Tue, 10 Jan 2012 23:27:13 +0000 (UTC) X-SpamScore: -9 X-BigFish: VS-9(zz1432N98dKzz1202hzz8275bhz2dhc1ahc1bh2a8h668h839h944h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-SS: 13, Received: from mail210-ch1 (localhost.localdomain [127.0.0.1]) by mail210-ch1 (MessageSwitch) id 1326238033501265_31936; Tue, 10 Jan 2012 23:27:13 +0000 (UTC) Received: from CH1EHSMHS006.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.245]) by mail210-ch1.bigfish.com (Postfix) with ESMTP id 7757C400042; Tue, 10 Jan 2012 23:27:13 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS006.bigfish.com (10.43.70.6) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 10 Jan 2012 23:27:13 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.355.3; Tue, 10 Jan 2012 17:27:12 -0600 Received: from schlenkerla.am.freescale.net (schlenkerla.am.freescale.net [10.82.121.12]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id q0ANRCur010555; Tue, 10 Jan 2012 17:27:12 -0600 (CST) Date: Tue, 10 Jan 2012 17:27:11 -0600 From: Scott Wood To: Christian Hitz Message-ID: <20120110232711.GD5434@schlenkerla.am.freescale.net> References: <1318404726-27147-1-git-send-email-christian.hitz@aizo.com> <1318404726-27147-4-git-send-email-christian.hitz@aizo.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1318404726-27147-4-git-send-email-christian.hitz@aizo.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: freescale.com Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH v2 4/8] nand: Merge changes from Linux nand driver X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de On Wed, Oct 12, 2011 at 09:32:02AM +0200, Christian Hitz wrote: > [backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] > > This patch synchronizes the nand driver with the Linux 3.0 state. > > Signed-off-by: Christian Hitz > Cc: Scott Wood > --- > > Adds 968 bytes to the image size. > > Remaining checkpatch warnings come from code copied straight from > Linux. > > Changes since v1: > - split patch into smaller chunks Applied to u-boot-nand-flash with the following changes (as described in previous feedback): -Scott diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index ef389da..ed2640c 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -1927,13 +1927,6 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to, if (!writelen) return 0; - /* reject writes, which are not page aligned */ - if (NOTALIGNED(to) || NOTALIGNED(ops->len)) { - printk(KERN_NOTICE "%s: Attempt to write not " - "page aligned data\n", __func__); - return -EINVAL; - } - column = to & (mtd->writesize - 1); subpage = column || (writelen & (mtd->writesize - 1)); @@ -2334,8 +2327,8 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, */ if (bbt_masked_page != 0xffffffff && (page & BBT_PAGE_MASK) == bbt_masked_page) - rewrite_bbt[chipnr] = - ((loff_t)page << chip->page_shift); + rewrite_bbt[chipnr] = + ((loff_t)page << chip->page_shift); /* Increment page address and decrement length */ len -= (1 << chip->phys_erase_shift);