]> git.sur5r.net Git - u-boot/commitdiff
davinci_nand, trivial : use symbolic ECC start command
authorBen Gardiner <bengardiner@nanometrics.ca>
Thu, 14 Oct 2010 21:26:17 +0000 (17:26 -0400)
committerWolfgang Denk <wd@denx.de>
Sun, 17 Oct 2010 18:14:43 +0000 (20:14 +0200)
The ECC calculations were started by writing 1 << 13 to the nand FCR register;
that value is also defined as DAVINCI_NANDFCR_4BIT_CALC_START in emif_defs.h.

This patch substitutes the macro DAVINCI_NANDFCR_4BIT_CALC_START for the
magic number '1 << 13'.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
drivers/mtd/nand/davinci_nand.c

index c5a86d6c0d3f6d8cccbd3efd92c191885b1f0f77..d41579c9cefb9e96531508e6f0ac95ed641799b6 100644 (file)
@@ -481,7 +481,8 @@ static int nand_davinci_4bit_correct_data(struct mtd_info *mtd, uint8_t *dat,
         * Set the addr_calc_st bit(bit no 13) in the NAND Flash Control
         * register to 1.
         */
-       __raw_writel(1 << 13, &davinci_emif_regs->nandfcr);
+       __raw_writel(DAVINCI_NANDFCR_4BIT_CALC_START,
+                       &davinci_emif_regs->nandfcr);
 
        /*
         * Wait for the corr_state field (bits 8 to 11) in the