include/linux/mtd/flashchip.h

Source file repositories/reference/linux-study-clean/include/linux/mtd/flashchip.h

File Facts

System
Linux kernel
Corpus path
include/linux/mtd/flashchip.h
Extension
.h
Size
2502 bytes
Lines
101
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

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__ */

Annotation

Implementation Notes