]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/nand/mxs_nand.c
powerpc: MPC8541CDS: Remove macro CONFIG_MPC8541CDS
[u-boot] / drivers / mtd / nand / mxs_nand.c
index 5291330b911c9824f587b6fc714e269bb31766ca..92005448d2eeef16007bd089efe5c6a76541b72d 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/types.h>
 #include <malloc.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
 #endif
 #define        MXS_NAND_METADATA_SIZE                  10
 #define        MXS_NAND_BITS_PER_ECC_LEVEL             13
+
+#if !defined(CONFIG_SYS_CACHELINE_SIZE) || CONFIG_SYS_CACHELINE_SIZE < 32
 #define        MXS_NAND_COMMAND_BUFFER_SIZE            32
+#else
+#define        MXS_NAND_COMMAND_BUFFER_SIZE            CONFIG_SYS_CACHELINE_SIZE
+#endif
 
 #define        MXS_NAND_BCH_TIMEOUT                    10000
 
@@ -152,7 +157,7 @@ static inline uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size,
        int max_ecc_strength_supported;
 
        /* Refer to Chapter 17 for i.MX6DQ, Chapter 18 for i.MX6SX */
-       if (is_cpu_type(MXC_CPU_MX6SX) || is_soc_type(MXC_SOC_MX7))
+       if (is_mx6sx() || is_mx7())
                max_ecc_strength_supported = 62;
        else
                max_ecc_strength_supported = 40;
@@ -961,7 +966,7 @@ static int mxs_nand_ecc_write_oob(struct mtd_info *mtd, struct nand_chip *nand,
  * Thus, this function is only called when we want *all* blocks to look good,
  * so it *always* return success.
  */
-static int mxs_nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
+static int mxs_nand_block_bad(struct mtd_info *mtd, loff_t ofs)
 {
        return 0;
 }
@@ -976,7 +981,7 @@ static int mxs_nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
  * counted, so we know the physical geometry. This enables us to make some
  * important configuration decisions.
  *
- * The return value of this function propogates directly back to this driver's
+ * The return value of this function propagates directly back to this driver's
  * call to nand_scan(). Anything other than zero will cause this driver to
  * tear everything down and declare failure.
  */