]> Git Repo - J-u-boot.git/blobdiff - include/nand.h
common: Remove <common.h> and add needed includes
[J-u-boot.git] / include / nand.h
index 93cbe1e25db9eb2bf3e1a8c7ec7dececd971d7e4..cdba7384ad1439a08df0cb9fb39835f03a78bcae 100644 (file)
@@ -8,37 +8,23 @@
 #ifndef _NAND_H_
 #define _NAND_H_
 
-#include <config.h>
-
-/*
- * All boards using a given driver must convert to self-init
- * at the same time, so do it here.  When all drivers are
- * converted, this will go away.
- */
-#ifdef CONFIG_SPL_BUILD
-#if defined(CONFIG_NAND_FSL_ELBC) || defined(CONFIG_NAND_FSL_IFC)
-#define CONFIG_SYS_NAND_SELF_INIT
-#endif
-#else
-#if defined(CONFIG_NAND_FSL_ELBC) || defined(CONFIG_NAND_ATMEL)\
-       || defined(CONFIG_NAND_FSL_IFC)
-#define CONFIG_SYS_NAND_SELF_INIT
-#endif
-#endif
-
 extern void nand_init(void);
+void nand_reinit(void);
 unsigned long nand_size(void);
+unsigned int nand_page_size(void);
 
 #include <linux/compat.h>
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
 
 int nand_mtd_to_devnum(struct mtd_info *mtd);
 
-#ifdef CONFIG_SYS_NAND_SELF_INIT
+#if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
 void board_nand_init(void);
 int nand_register(int devnum, struct mtd_info *mtd);
+void nand_unregister(struct mtd_info *mtd);
 #else
+struct nand_chip;
+
 extern int board_nand_init(struct nand_chip *nand);
 #endif
 
@@ -68,7 +54,6 @@ static inline int nand_erase(struct mtd_info *info, loff_t off, size_t size)
        instr.mtd = info;
        instr.addr = off;
        instr.len = size;
-       instr.callback = 0;
 
        return mtd_erase(info, &instr);
 }
@@ -120,6 +105,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t start, size_t length,
                int allexcept);
 int nand_get_lock_status(struct mtd_info *mtd, loff_t offset);
 
+u32 nand_spl_adjust_offset(u32 sector, u32 offs);
 int nand_spl_load_image(uint32_t offs, unsigned int size, void *dst);
 int nand_spl_read_block(int block, int offset, int len, void *dst);
 void nand_deselect(void);
This page took 0.02423 seconds and 4 git commands to generate.