summaryrefslogtreecommitdiff
path: root/include/onenand_uboot.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-10-13 21:40:23 +0200
committerWolfgang Denk <wd@denx.de>2007-10-13 21:40:23 +0200
commit23c56f97caa3b585ab1290f0e7895f0f9e82113f (patch)
treeb1c5f110fd310f8c69ebdac4cb1272c7c0b29630 /include/onenand_uboot.h
parentde74b9eeacccaf0a42e5ecc9ae79a88f7a311296 (diff)
parent30363e98fa470fbecea5e8bc0f1443352754f303 (diff)
downloadu-boot-imx-23c56f97caa3b585ab1290f0e7895f0f9e82113f.zip
u-boot-imx-23c56f97caa3b585ab1290f0e7895f0f9e82113f.tar.gz
u-boot-imx-23c56f97caa3b585ab1290f0e7895f0f9e82113f.tar.bz2
Merge branch 'master' of git://www.denx.de/git/u-boot-nand-flash
Diffstat (limited to 'include/onenand_uboot.h')
-rw-r--r--include/onenand_uboot.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/onenand_uboot.h b/include/onenand_uboot.h
new file mode 100644
index 0000000..bd1831e
--- /dev/null
+++ b/include/onenand_uboot.h
@@ -0,0 +1,39 @@
+/*
+ * Header file for OneNAND support for U-Boot
+ *
+ * Adaptation from kernel to U-Boot
+ *
+ * Copyright (C) 2005-2007 Samsung Electronics
+ * Kyungmin Park <kyungmin.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __UBOOT_ONENAND_H
+#define __UBOOT_ONENAND_H
+
+struct kvec {
+ void *iov_base;
+ size_t iov_len;
+};
+
+typedef int spinlock_t;
+typedef int wait_queue_head_t;
+
+/* Functions */
+extern void onenand_init(void);
+extern int onenand_read(struct mtd_info *mtd, loff_t from, size_t len,
+ size_t * retlen, u_char * buf);
+extern int onenand_read_oob(struct mtd_info *mtd, loff_t from, size_t len,
+ size_t * retlen, u_char * buf);
+extern int onenand_write(struct mtd_info *mtd, loff_t from, size_t len,
+ size_t * retlen, const u_char * buf);
+extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr);
+
+extern int onenand_unlock(struct mtd_info *mtd, loff_t ofs, size_t len);
+
+extern void onenand_print_device_info(int device, int verbose);
+
+#endif /* __UBOOT_ONENAND_H */