[U-Boot] [PATCH 08/13] mtd mxc nand: Use _mxc_nand_enable_hwecc()
Stefano Babic
sbabic at denx.de
Tue Aug 14 10:50:08 CEST 2012
On 13/08/2012 22:50, Benoît Thébaudeau wrote:
> Use _mxc_nand_enable_hwecc() instead of duplicating its code.
>
> Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau at advansee.com>
> Cc: Scott Wood <scottwood at freescale.com>
> Cc: Stefano Babic <sbabic at denx.de>
> ---
Hi Benoît,
>
> +#ifdef CONFIG_MXC_NAND_HWECC
> +static void mxc_nand_enable_hwecc(struct mtd_info *mtd, int mode)
> +{
> + /*
> + * If HW ECC is enabled, we turn it on during init. There is
> + * no need to enable again here.
> + */
> +}
mxc_nand_enable_hwecc is still empty after your changes...
> +
> +#ifdef MXC_NFC_V1_1
> static int mxc_nand_read_oob_syndrome(struct mtd_info *mtd,
> struct nand_chip *chip,
> int page, int sndcmd)
> @@ -1235,15 +1235,11 @@ int board_nand_init(struct nand_chip *this)
> host->pagesize_2k = 0;
>
> this->ecc.size = 512;
> - tmp = readw(&host->regs->config1);
> - tmp |= NFC_ECC_EN;
> - writew(tmp, &host->regs->config1);
> + _mxc_nand_enable_hwecc(mtd, 1);
...but you are calling it after removing the code in the init function,
and I do not understand how ECC is enabled.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list