Unix/Linux Go Back    

NetBSD 6.1.5 - man page for flash (netbsd section 9)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

FLASH(9)			  BSD Kernel Developer's Manual 			 FLASH(9)

     flash -- subsystem for flash-like memory devices

     #include <dev/flash/flash.h>

     flash_attach_mi(const struct flash_interface *fl, device_t dev);

     Flash-like devices can register themselves to the flash layer with the flash_hw_if struc-
     ture.  This structure has function pointers and other fields.

     The attachment can be done by calling flash_attach_mi() with this structure and the device's
     device_t as an argument.  Return value is the flash layer device.	The flash_interface
     structure is shown below.

     struct flash_interface {
	     int (*erase) (device_t, struct flash_erase_instruction *);
	     int (*read) (device_t, off_t, size_t, size_t *, uint8_t *);
	     int (*write) (device_t, off_t, size_t, size_t *, const uint8_t *);
	     int (*block_markbad)(device_t, uint64_t);
	     int (*block_isbad)(device_t, uint64_t);
	     int (*sync) (device_t);

	     int (*submit)(device_t, struct buf *);

	     /* storage for partition info */
	     struct flash_partition partition;

	     /* total size of mtd */
	     flash_addr_t size;
	     uint32_t page_size;
	     uint32_t erasesize;
	     uint32_t writesize;
	     uint32_t minor;
	     uint8_t type;

     flash(4), nand(9)

     Adam Hoka <ahoka@NetBSD.org>

BSD					  March 31, 2011				      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 08:17 PM.