Flash Partition Abstraction to hide details of underlying flash device details.
More...
|
int32_t | PIOS_FLASH_find_partition_id (enum pios_flash_partition_labels label, uintptr_t *partition_id) |
|
uint16_t | PIOS_FLASH_get_num_partitions (void) |
|
int32_t | PIOS_FLASH_get_partition_size (uintptr_t partition_id, uint32_t *partition_size) |
|
int32_t | PIOS_FLASH_start_transaction (uintptr_t partition_id) |
|
int32_t | PIOS_FLASH_end_transaction (uintptr_t partition_id) |
|
int32_t | PIOS_FLASH_erase_partition (uintptr_t partition_id) |
|
int32_t | PIOS_FLASH_erase_range (uintptr_t partition_id, uint32_t start_offset, uint32_t size) |
|
int32_t | PIOS_FLASH_write_data (uintptr_t partition_id, uint32_t offset, const uint8_t *data, uint16_t len) |
|
int32_t | PIOS_FLASH_read_data (uintptr_t partition_id, uint32_t offset, uint8_t *data, uint16_t len) |
|
void * | PIOS_FLASH_get_address (uintptr_t partition_id, uint32_t *partition_size) |
|
int32_t | PIOS_Flash_Jedec_Init (uintptr_t *flash_id, pios_spi_t spi_id, uint32_t slave_num, const struct pios_flash_jedec_cfg *cfg) |
|
int32_t | PIOS_Flash_Jedec_ReadOTPData (uintptr_t chip_id, uint32_t chip_offset, uint8_t *data, uint16_t len) |
|
uint32_t | PIOS_Flash_Jedec_GetCapacity (uintptr_t chip_id) |
|
void | PIOS_FLASH_register_partition_table (const struct pios_flash_partition partition_table[], uint8_t num_partitions) |
|
void | PIOS_FLASH_fixup_partitions_for_capacity (struct pios_flash_partition *partition_table, uint8_t partition_table_len, const struct pios_flash_chip *descriptor, struct pios_flash_sector_range *sectors, uint32_t num_bytes) |
|
Flash Partition Abstraction to hide details of underlying flash device details.
Flash Driver API Definition.
#define FLASH_SECTOR_128KB (128 * 1024) |
#define FLASH_SECTOR_16KB ( 16 * 1024) |
#define FLASH_SECTOR_1KB ( 1 * 1024) |
#define FLASH_SECTOR_2KB ( 2 * 1024) |
#define FLASH_SECTOR_32KB ( 32 * 1024) |
#define FLASH_SECTOR_4KB ( 4 * 1024) |
#define FLASH_SECTOR_64KB ( 64 * 1024) |
#define FLASH_SECTOR_8KB ( 8 * 1024) |
#define JEDEC_MANUFACTURER_ANY 0x00 |
#define JEDEC_MANUFACTURER_MACRONIX 0xC2 |
#define JEDEC_MANUFACTURER_MICRON 0x20 |
#define JEDEC_MANUFACTURER_SPANSION 0x01 |
#define JEDEC_MANUFACTURER_ST 0x20 |
#define JEDEC_MANUFACTURER_WINBOND 0xEF |
#define JEDEC_MEMORYTYPE_ANY 0x00 |
Enumerator |
---|
FLASH_PARTITION_LABEL_BL |
|
FLASH_PARTITION_LABEL_FW |
|
FLASH_PARTITION_LABEL_EE |
|
FLASH_PARTITION_LABEL_SETTINGS |
|
FLASH_PARTITION_LABEL_AUTOTUNE |
|
FLASH_PARTITION_LABEL_LOG |
|
FLASH_PARTITION_LABEL_LOADABLE_EXTENSION |
|
FLASH_PARTITION_NUM_LABELS |
|
Definition at line 31 of file pios_flash.h.
int32_t PIOS_FLASH_end_transaction |
( |
uintptr_t |
partition_id | ) |
|
int32_t PIOS_FLASH_erase_partition |
( |
uintptr_t |
partition_id | ) |
|
int32_t PIOS_FLASH_erase_range |
( |
uintptr_t |
partition_id, |
|
|
uint32_t |
start_offset, |
|
|
uint32_t |
size |
|
) |
| |
void* PIOS_FLASH_get_address |
( |
uintptr_t |
partition_id, |
|
|
uint32_t * |
partition_size |
|
) |
| |
uint16_t PIOS_FLASH_get_num_partitions |
( |
void |
| ) |
|
int32_t PIOS_FLASH_get_partition_size |
( |
uintptr_t |
partition_id, |
|
|
uint32_t * |
partition_size |
|
) |
| |
uint32_t PIOS_Flash_Jedec_GetCapacity |
( |
uintptr_t |
chip_id | ) |
|
int32_t PIOS_Flash_Jedec_ReadOTPData |
( |
uintptr_t |
chip_id, |
|
|
uint32_t |
chip_offset, |
|
|
uint8_t * |
data, |
|
|
uint16_t |
len |
|
) |
| |
int32_t PIOS_FLASH_read_data |
( |
uintptr_t |
partition_id, |
|
|
uint32_t |
offset, |
|
|
uint8_t * |
data, |
|
|
uint16_t |
len |
|
) |
| |
void PIOS_FLASH_register_partition_table |
( |
const struct pios_flash_partition |
partition_table[], |
|
|
uint8_t |
num_partitions |
|
) |
| |
int32_t PIOS_FLASH_start_transaction |
( |
uintptr_t |
partition_id | ) |
|
int32_t PIOS_FLASH_write_data |
( |
uintptr_t |
partition_id, |
|
|
uint32_t |
offset, |
|
|
const uint8_t * |
data, |
|
|
uint16_t |
len |
|
) |
| |
uint16_t pios_flash_sector_range::base_sector |
uintptr_t* pios_flash_chip::chip_id |
uint32_t pios_flash_partition::chip_offset |
int32_t(* pios_flash_driver::end_transaction)(uintptr_t chip_id) |
int32_t(* pios_flash_driver::erase_sector)(uintptr_t chip_id, uint32_t chip_sector, uint32_t chip_offset) |
uint8_t pios_flash_jedec_cfg::expect_capacity |
uint8_t pios_flash_jedec_cfg::expect_manufacturer |
uint8_t pios_flash_jedec_cfg::expect_memorytype |
uint16_t pios_flash_partition::first_sector |
void*(* pios_flash_driver::get_pointer)(uintptr_t chip_id, uint32_t chip_offset) |
uint16_t pios_flash_sector_range::last_sector |
uint16_t pios_flash_partition::last_sector |
uint32_t pios_flash_chip::num_blocks |
uint32_t pios_flash_chip::page_size |
int32_t(* pios_flash_driver::read_data)(uintptr_t chip_id, uint32_t chip_offset, uint8_t *data, uint16_t len) |
uint32_t pios_flash_jedec_cfg::sector_erase |
uint32_t pios_flash_sector_range::sector_size |
uint32_t pios_flash_partition::size |
int32_t(* pios_flash_driver::start_transaction)(uintptr_t chip_id) |
int32_t(* pios_flash_driver::write_data)(uintptr_t chip_id, uint32_t chip_offset, const uint8_t *data, uint16_t len) |