/* For spinlocks. sched.h includes spinlock.h from whichever directory it *happenstobein-sowedon'thavetocarewhetherwe'reon2.2,which *hasasm/spinlock.h,or2.4,whichhaslinux/spinlock.h
*/ #include <linux/sched.h> #include <linux/mutex.h> #include <linux/wait.h>
typedefenum {
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, ifthey'reinterleaved.Thiscanevenrefertoindividualpartitionson
the same physical chip when present. */
struct flchip { unsignedlong start; /* Offset within the map */ // unsigned long len; /* We omit len for now, because when we group them together weinsistthatthey'reallofthesamesize,andthechipsize isheldinthenextlevelup.Ifwegetmoreversatilelater, it'llmakeitadamnsighthardertofindwhichchipwewantfrom agivenoffset,andwe'llwanttoaddtheper-chiplengthfield backin.
*/ int ref_point_counter;
flstate_t state;
flstate_t oldstate;
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__ */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-09-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.