RE: [PATCH 1/2] mtd/nand: fixup for fmr initialization of Freescale NAND controller

2011-12-22 Thread Artem Bityutskiy
On Tue, 2011-12-20 at 06:40 +, Liu Shengzhou-B36685 wrote:
  -Original Message-
  From: Artem Bityutskiy [mailto:dedeki...@gmail.com]
  Sent: Saturday, December 17, 2011 10:45 PM
  To: Liu Shengzhou-B36685
  Cc: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421;
  dw...@infradead.org; Gala Kumar-B11780; linux-...@lists.infradead.org
  Subject: Re: [PATCH 1/2] mtd/nand: fixup for fmr initialization of
  Freescale NAND controller
  
  On Mon, 2011-12-12 at 17:40 +0800, Shengzhou Liu wrote:
   There was a bug for fmr initialization, which lead to  fmr was always
   0x100 in fsl_elbc_chip_init() and caused FCM command timeout before
   calling fsl_elbc_chip_init_tail(), now we initialize CWTO to maximum
   timeout value and not relying on the setting of bootloader.
  
   Signed-off-by: Shengzhou Liu shengzhou@freescale.com
  
  Pushed both to l2-mtd-2.6.git, thanks!
  
  --
  Best Regards,
  Artem Bityutskiy
 
 I noted it had been applied in linux-next.git tree.
 Does it still need to l2-mtd-2.6.git? 
 Thanks.

It is in linux-next because it is pulled there from l2-mtd-2.6.git.
Thanks for head up, but no, it should stay in the l2-mtd-2.6.git.
David Woodhouse then should take care of merging the l2 tree upstream.

-- 
Best Regards,
Artem Bityutskiy


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

RE: [PATCH 1/2] mtd/nand: fixup for fmr initialization of Freescale NAND controller

2011-12-19 Thread Liu Shengzhou-B36685

 -Original Message-
 From: Artem Bityutskiy [mailto:dedeki...@gmail.com]
 Sent: Saturday, December 17, 2011 10:45 PM
 To: Liu Shengzhou-B36685
 Cc: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421;
 dw...@infradead.org; Gala Kumar-B11780; linux-...@lists.infradead.org
 Subject: Re: [PATCH 1/2] mtd/nand: fixup for fmr initialization of
 Freescale NAND controller
 
 On Mon, 2011-12-12 at 17:40 +0800, Shengzhou Liu wrote:
  There was a bug for fmr initialization, which lead to  fmr was always
  0x100 in fsl_elbc_chip_init() and caused FCM command timeout before
  calling fsl_elbc_chip_init_tail(), now we initialize CWTO to maximum
  timeout value and not relying on the setting of bootloader.
 
  Signed-off-by: Shengzhou Liu shengzhou@freescale.com
 
 Pushed both to l2-mtd-2.6.git, thanks!
 
 --
 Best Regards,
 Artem Bityutskiy

I noted it had been applied in linux-next.git tree.
Does it still need to l2-mtd-2.6.git? 
Thanks.

Best Regards,
Shengzhou Liu
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] mtd/nand: fixup for fmr initialization of Freescale NAND controller

2011-12-17 Thread Artem Bityutskiy
On Mon, 2011-12-12 at 17:40 +0800, Shengzhou Liu wrote:
 There was a bug for fmr initialization, which lead to  fmr was always 0x100
 in fsl_elbc_chip_init() and caused FCM command timeout before calling
 fsl_elbc_chip_init_tail(), now we initialize CWTO to maximum timeout value
 and not relying on the setting of bootloader.
 
 Signed-off-by: Shengzhou Liu shengzhou@freescale.com

Pushed both to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 1/2] mtd/nand: fixup for fmr initialization of Freescale NAND controller

2011-12-05 Thread Scott Wood
On 12/05/2011 04:54 AM, Shengzhou Liu wrote:
 There was a bug for fmr initialization, which lead to  fmr was always 0x100
 in fsl_elbc_chip_init() and caused FCM command timeout before calling
 fsl_elbc_chip_init_tail().
 
 Signed-off-by: Shengzhou Liu shengzhou@freescale.com
 ---
  drivers/mtd/nand/fsl_elbc_nand.c |8 +++-
  1 files changed, 3 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/mtd/nand/fsl_elbc_nand.c 
 b/drivers/mtd/nand/fsl_elbc_nand.c
 index eedd8ee..742bf73 100644
 --- a/drivers/mtd/nand/fsl_elbc_nand.c
 +++ b/drivers/mtd/nand/fsl_elbc_nand.c
 @@ -659,9 +659,7 @@ static int fsl_elbc_chip_init_tail(struct mtd_info *mtd)
   if (chip-pagemask  0xff00)
   al++;
  
 - /* add to ECCM mode set in fsl_elbc_init */
 - priv-fmr |= (12  FMR_CWTO_SHIFT) |  /* Timeout  12 ms */
 -  (al  FMR_AL_SHIFT);
 + priv-fmr |= al  FMR_AL_SHIFT;
  
   dev_dbg(priv-dev, fsl_elbc_init: nand-numchips = %d\n,
   chip-numchips);
 @@ -764,8 +762,8 @@ static int fsl_elbc_chip_init(struct fsl_elbc_mtd *priv)
   priv-mtd.priv = chip;
   priv-mtd.owner = THIS_MODULE;
  
 - /* Set the ECCM according to the settings in bootloader.*/
 - priv-fmr = in_be32(lbc-fmr)  FMR_ECCM;
 + /* Set fmr according to the settings in bootloader.*/
 + priv-fmr = in_be32(lbc-fmr);
  
   /* fill in nand_chip structure */
   /* set up function call table */

We shouldn't be relying on the bootloader to provide a sane value here
-- the bootloader may not have used/initialized NAND at all.

It's sort of OK for ECCM, since unless you're trying to match an
externally programmed flash, or the bootloader uses the flash, all we
really care about is that the value stay consistent.  The timeout, OTOH,
must not be set too low or things won't work.

We should just set a value that we believe to be high enough for all uses.

-Scott

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev