From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 19 Dec 2011 21:23:26 +0100 Subject: [U-Boot] [PATCH] MXS-NAND: Backport ecc.size from linux kernel In-Reply-To: <4EEF9C45.4090306@freescale.com> References: <1324230610-22050-1-git-send-email-marek.vasut@gmail.com> <4EEF9C45.4090306@freescale.com> Message-ID: <201112192123.26747.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > On 12/18/2011 11:50 AM, Marek Vasut wrote: > > The ecc.size for mxs NAND driver is set to 1 in Linux kernel and to 512 > > in U-Boot, which causes "ubi part" command malfunction due to wrong > > subpage size. > > > > Signed-off-by: Marek Vasut > > Cc: Wolfgang Denk > > Cc: Detlev Zundel > > Cc: Stefan Roese > > Cc: Scott Wood > > Cc: Veli-Pekka Peltola > > --- > > > > drivers/mtd/nand/mxs_nand.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c > > index ce2a326..26778ac 100644 > > --- a/drivers/mtd/nand/mxs_nand.c > > +++ b/drivers/mtd/nand/mxs_nand.c > > @@ -1105,7 +1105,7 @@ int board_nand_init(struct nand_chip *nand) > > > > nand->ecc.layout = &fake_ecc_layout; > > nand->ecc.mode = NAND_ECC_HW; > > nand->ecc.bytes = 9; > > > > - nand->ecc.size = 512; > > + nand->ecc.size = 1; > > > > return 0; > > ecc.size = 1 doesn't make sense -- this is the block size over which ecc > is calculated. And in a way it forces the subpage shift to be 0 ... we need to fix it in both later, but for this release, let's make it this way (in sync with linux). > > Where is this Linux driver? I don't see mxs_nand.c in Linux. drivers/mtd/nand/gpmi-nand/* > > What specifically is happening in "ubi part" with ecc.size = 512? The driver doesn\t support subpage writes. > > -Scott M