summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-10-29 11:22:46 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-06 14:08:10 +0100
commit8174fc9dbd5f1372c7ba6e3ab9485b364f6410fc (patch)
tree28d2fa0bc70a5757d3a70d86f9580b54fed5a3db /include
parentea7fdd5f550a63f45a90f76cb1ac1e1eeecffe00 (diff)
downloadbarebox-8174fc9dbd5f1372c7ba6e3ab9485b364f6410fc.tar.gz
barebox-8174fc9dbd5f1372c7ba6e3ab9485b364f6410fc.tar.xz
mtd: Drop asynchronous erase support
asynchronous erase support is unused and also dropped from the Kernel, so remove it from barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/mtd.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 16725ac4bc..8257403335 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -20,12 +20,6 @@
#define MTD_BLOCK_MAJOR 31
#define MAX_MTD_DEVICES 32
-#define MTD_ERASE_PENDING 0x01
-#define MTD_ERASING 0x02
-#define MTD_ERASE_SUSPEND 0x04
-#define MTD_ERASE_DONE 0x08
-#define MTD_ERASE_FAILED 0x10
-
#define MTD_FAIL_ADDR_UNKNOWN -1LL
/* If the erase fails, fail_addr might indicate exactly which block failed. If
@@ -40,9 +34,7 @@ struct erase_info {
u_long retries;
u_int dev;
u_int cell;
- void (*callback) (struct erase_info *self);
u_long priv;
- u_char state;
struct erase_info *next;
};
@@ -141,13 +133,6 @@ struct mtd_info {
int numeraseregions;
struct mtd_erase_region_info *eraseregions;
- /*
- * Erase is an asynchronous operation. Device drivers are supposed
- * to call instr->callback() whenever the operation completes, even
- * if it completes with a failure.
- * Callers are supposed to pass a callback function and wait for it
- * to be called before writing to the block.
- */
int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
@@ -298,16 +283,6 @@ int mtd_del_partition(struct mtd_info *mtd);
extern void register_mtd_user (struct mtd_notifier *new);
extern int unregister_mtd_user (struct mtd_notifier *old);
-#ifdef CONFIG_MTD_PARTITIONS
-void mtd_erase_callback(struct erase_info *instr);
-#else
-static inline void mtd_erase_callback(struct erase_info *instr)
-{
- if (instr->callback)
- instr->callback(instr);
-}
-#endif
-
int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs);