From: Scott Wood Date: Mon, 11 Apr 2011 14:16:47 -0500 Subject: [U-Boot] [PATCH 6/6] EA20: do not use subpage write for NAND In-Reply-To: <1302372335-30232-6-git-send-email-sbabic@denx.de> References: <1302372335-30232-1-git-send-email-sbabic@denx.de> <1302372335-30232-6-git-send-email-sbabic@denx.de> Message-ID: <20110411191647.GC25161@schlenkerla.am.freescale.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Apr 09, 2011 at 08:05:35PM +0200, Stefano Babic wrote: > diff --git a/README b/README > index 21cd71b..8d664eb 100644 > --- a/README > +++ b/README > @@ -2907,6 +2907,10 @@ Low Level (hardware related) configuration options: > that is executed before the actual U-Boot. E.g. when > compiling a NAND SPL. > > +- CONFIG_SYS_NAND_NO_SUBPAGE > + Some drivers (davinci) do not support access to NAND subpage. This only controls the davinci driver, so it should be CONFIG_SYS_DAVINCI_NAND_NO_SUBPAGE. Is this really board-specific? Does the davinci driver ever support subpage? > diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h > index 987a2ec..215e781 100644 > --- a/include/linux/mtd/nand.h > +++ b/include/linux/mtd/nand.h > @@ -193,7 +193,8 @@ typedef enum { > && (chip->page_shift > 9)) > > /* Mask to zero out the chip options, which come from the id table */ > -#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR) > +#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR & \ > + ~NAND_NO_SUBPAGE_WRITE) I wonder what we really need CHIPOPTIONS_MSK for? Silently ignoring what the driver asked for doesn't seem right. Can't we just OR the two sources? And it would be a driver error to specify a flag that doesn't make sense to be set this way (i.e. only do it with the "doesn't support X" flags). -Scott