|
RTEMS 6.1-rc4
|
Loading...
Searching...
No Matches
1#ifndef __LINUX_MTD_MTD_H__
2#define __LINUX_MTD_MTD_H__
7#define MTD_FAIL_ADDR_UNKNOWN -1LL
17static inline int do_mtd_point(
size_t *retlen,
void **ebuf)
25#define mtd_point(a, b, c, d, e, f) do_mtd_point(d, e)
27#define mtd_unpoint(a, b, c) do { } while (0)
29#define mtd_kmalloc_up_to(a, b) kmalloc(*(b), GFP_KERNEL)
43static inline int mtd_is_bitflip(
int err) {
return (err == -EUCLEAN); }
45#define mtd_block_isbad(mtd_sp, offset) ({ \
47 int sc = jffs2_flash_block_is_bad(RTEMS_CONTAINER_OF(&(mtd_sp), struct jffs2_sb_info, mtd), offset, &bad); \
53#define mtd_block_markbad(mtd_sp, offset) \
54 jffs2_flash_block_mark_bad(RTEMS_CONTAINER_OF(&(mtd_sp), struct jffs2_sb_info, mtd), offset)
55#define mtd_write(mtd_sp, ofs, len, retlen, buf) \
56 jffs2_flash_direct_write(RTEMS_CONTAINER_OF(&(mtd_sp), struct jffs2_sb_info, mtd), ofs, len, retlen, buf)
57#define mtd_read(mtd_sp, ofs, len, retlen, buf) \
58 jffs2_flash_direct_read(RTEMS_CONTAINER_OF(&(mtd_sp), struct jffs2_sb_info, mtd), ofs, len, retlen, buf)