|
Flash Translation Layer
1.0
|
contain the device information header More...
#include <glib.h>#include <pthread.h>#include <stdint.h>#include <stdlib.h>#include "include/log.h"

Go to the source code of this file.
Data Structures | |
| struct | device_address |
| generic device address format More... | |
| struct | device_request |
| request for device More... | |
| struct | device_page |
| flash board's page information More... | |
| struct | device_block |
| flash board's block information More... | |
| struct | device_package |
| flash board's package(nand chip) information More... | |
| struct | device_info |
| flash board's architecture information More... | |
| struct | device |
| metadata of the device More... | |
| struct | device_operations |
| operations for device More... | |
Macros | |
| #define | PADDR_EMPTY ((uint32_t)UINT32_MAX) |
| #define | DEVICE_PAGE_SIZE (8192) |
| #define | DEVICE_NR_BUS_BITS (3) |
| device address information More... | |
| #define | DEVICE_NR_CHIPS_BITS (3) |
| #define | DEVICE_NR_PAGES_BITS (7) |
| #define | DEVICE_NR_BLOCKS_BITS (19) |
Typedefs | |
| typedef void(* | device_end_req_fn) (struct device_request *) |
| I/O end request function. More... | |
Enumerations | |
| enum | { DEVICE_DEFAULT_REQUEST = 0 } |
| request allocation flags More... | |
| enum | { DEVICE_WRITE = 0, DEVICE_READ, DEVICE_ERASE } |
| flash board I/O direction More... | |
| enum | { RAMDISK_MODULE = 0, BLUEDBM_MODULE, ZONE_MODULE } |
| support module list More... | |
Functions | |
| struct device_request * | device_alloc_request (uint64_t flags) |
| dynamic allocate the device request More... | |
| void | device_free_request (struct device_request *) |
| free pre-allocated device_request resource More... | |
| int | device_module_init (const uint64_t modnum, struct device **, uint64_t flags) |
| initialize the device module More... | |
| int | device_module_exit (struct device *) |
| deallocate the device module More... | |
| static size_t | device_get_nr_segments (struct device *dev) |
| get the number of segments in a flash board More... | |
| static size_t | device_get_blocks_per_segment (struct device *dev) |
| static size_t | device_get_pages_per_segment (struct device *dev) |
| get the number of pages in a segment More... | |
| static size_t | device_get_page_size (struct device *dev) |
| get flash board's NAND page size More... | |
| static size_t | device_get_total_size (struct device *dev) |
| total size of a flash board More... | |
| static size_t | device_get_total_pages (struct device *dev) |
| get total the number of pages in a flash board More... | |
contain the device information header
| #define DEVICE_NR_BLOCKS_BITS (19) |
| #define DEVICE_NR_BUS_BITS (3) |
device address information
| #define DEVICE_NR_CHIPS_BITS (3) |
| #define DEVICE_NR_PAGES_BITS (7) |
| #define DEVICE_PAGE_SIZE (8192) |
| #define PADDR_EMPTY ((uint32_t)UINT32_MAX) |
< to use the TOSTRING
| typedef void(* device_end_req_fn) (struct device_request *) |
I/O end request function.
| request | device request structure's pointer |
| anonymous enum |
| anonymous enum |
| struct device_request* device_alloc_request | ( | uint64_t | flags | ) |
dynamic allocate the device request
| flags | flags for allocate the device request |
| void device_free_request | ( | struct device_request * | request | ) |
free pre-allocated device_request resource
| request | pointer of the device request |
|
static |
|
static |
get the number of segments in a flash board
| dev | device structure pointer |
|
static |
get flash board's NAND page size
| dev | device structure pointer |
|
static |
get the number of pages in a segment
| dev | device structure pointer |

|
static |
get total the number of pages in a flash board
| dev | device structure pointer |

|
static |
total size of a flash board
| dev | device structure pointer |

| int device_module_exit | ( | struct device * | dev | ) |
deallocate the device module
| dev | pointer of the device module's structure |
| int device_module_init | ( | const uint64_t | modnum, |
| struct device ** | __dev, | ||
| uint64_t | flags | ||
| ) |
initialize the device module
| modnum | module's number |
| __dev | device structure pointer (will be allocated) |
| flags | initializing flag |

1.8.13