/usr/src/linux-headers-5.15.0-190/include/linux/mtd
NameSizeModeActions
bbm.h48250644editdlrm
blktrans.h26820644editdlrm
cfi.h101440644editdlrm
cfi_endian.h15140644editdlrm
concat.h4930644editdlrm
doc2000.h55050644editdlrm
flashchip.h24780644editdlrm
ftl.h25510644editdlrm
gen_probe.h6150644editdlrm
hyperbus.h28930644editdlrm
inftl.h15990644editdlrm
jedec.h19050644editdlrm
latch-addr-flash.h7160644editdlrm
lpc32xx_mlc.h3850644editdlrm
lpc32xx_slc.h3850644editdlrm
map.h130160644editdlrm
mtd.h225690644editdlrm
mtdram.h2570644editdlrm
nand-ecc-sw-bch.h21170644editdlrm
nand-ecc-sw-hamming.h27170644editdlrm
nand-gpio.h3300644editdlrm
nand.h302840644editdlrm
ndfc.h20700644editdlrm
nftl.h17340644editdlrm
onenand.h79740644editdlrm
onenand_regs.h72170644editdlrm
onfi.h49620644editdlrm
partitions.h39460644editdlrm
pfow.h44890644editdlrm
physmap.h8080644editdlrm
pismo.h2710644editdlrm
plat-ram.h6680644editdlrm
platnand.h25450644editdlrm
qinfo.h25300644editdlrm
rawnand.h524000644editdlrm
sharpsl.h4850644editdlrm
sh_flctl.h59270644editdlrm
spear_smi.h17140644editdlrm
spi-nor.h172470644editdlrm
spinand.h162200644editdlrm
super.h5780644editdlrm
ubi.h99140644editdlrm
xip.h25560644editdlrm
Edit: /usr/src/linux-headers-5.15.0-190/include/linux/mtd/flashchip.h (2478B)
/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Copyright © 2000 Red Hat UK Limited * Copyright © 2000-2010 David Woodhouse */ #ifndef __MTD_FLASHCHIP_H__ #define __MTD_FLASHCHIP_H__ /* For spinlocks. sched.h includes spinlock.h from whichever directory it * happens to be in - so we don't have to care whether we're on 2.2, which * has asm/spinlock.h, or 2.4, which has linux/spinlock.h */ #include #include typedef enum { FL_READY, FL_STATUS, FL_CFI_QUERY, FL_JEDEC_QUERY, FL_ERASING, FL_ERASE_SUSPENDING, FL_ERASE_SUSPENDED, FL_WRITING, FL_WRITING_TO_BUFFER, FL_OTP_WRITE, FL_WRITE_SUSPENDING, FL_WRITE_SUSPENDED, FL_PM_SUSPENDED, FL_SYNCING, FL_UNLOADING, FL_LOCKING, FL_UNLOCKING, FL_POINT, FL_XIP_WHILE_ERASING, FL_XIP_WHILE_WRITING, FL_SHUTDOWN, /* These 2 come from nand_state_t, which has been unified here */ FL_READING, FL_CACHEDPRG, /* These 4 come from onenand_state_t, which has been unified here */ FL_RESETTING, FL_OTPING, FL_PREPARING_ERASE, FL_VERIFYING_ERASE, FL_UNKNOWN } flstate_t; /* NOTE: confusingly, this can be used to refer to more than one chip at a time, if they're interleaved. This can even refer to individual partitions on the same physical chip when present. */ struct flchip { unsigned long start; /* Offset within the map */ // unsigned long len; /* We omit len for now, because when we group them together we insist that they're all of the same size, and the chip size is held in the next level up. If we get more versatile later, it'll make it a damn sight harder to find which chip we want from a given offset, and we'll want to add the per-chip length field back in. */ int ref_point_counter; flstate_t state; flstate_t oldstate; unsigned int write_suspended:1; unsigned int erase_suspended:1; unsigned long in_progress_block_addr; unsigned long in_progress_block_mask; struct mutex mutex; wait_queue_head_t wq; /* Wait on here when we're waiting for the chip to be ready */ int word_write_time; int buffer_write_time; int erase_time; int word_write_time_max; int buffer_write_time_max; int erase_time_max; void *priv; }; /* This is used to handle contention on write/erase operations between partitions of the same physical chip. */ struct flchip_shared { struct mutex lock; struct flchip *writing; struct flchip *erasing; }; #endif /* __MTD_FLASHCHIP_H__ */