Go to the source code of this file.
◆ CMD_SST_AAI_WP
#define CMD_SST_AAI_WP 0xAD /* Auto Address Increment Word Program */ |
Definition at line 23 of file sst.c.
◆ CMD_SST_BP
#define CMD_SST_BP 0x02 /* Byte Program */ |
Definition at line 21 of file sst.c.
◆ CMD_SST_EWSR
#define CMD_SST_EWSR 0x50 /* Enable Write Status Register */ |
Definition at line 18 of file sst.c.
◆ CMD_SST_FAST_READ
#define CMD_SST_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ |
Definition at line 20 of file sst.c.
◆ CMD_SST_PP
#define CMD_SST_PP 0x02 /* Page Program */ |
Definition at line 22 of file sst.c.
◆ CMD_SST_RDSR
#define CMD_SST_RDSR 0x05 /* Read Status Register */ |
Definition at line 16 of file sst.c.
◆ CMD_SST_READ
#define CMD_SST_READ 0x03 /* Read Data Bytes */ |
Definition at line 19 of file sst.c.
◆ CMD_SST_SE
#define CMD_SST_SE 0x20 /* Sector Erase */ |
Definition at line 24 of file sst.c.
◆ CMD_SST_WRDI
#define CMD_SST_WRDI 0x04 /* Write Disable */ |
Definition at line 15 of file sst.c.
◆ CMD_SST_WREN
#define CMD_SST_WREN 0x06 /* Write Enable */ |
Definition at line 14 of file sst.c.
◆ CMD_SST_WRSR
#define CMD_SST_WRSR 0x01 /* Write Status Register */ |
Definition at line 17 of file sst.c.
◆ SST_SR_AAI
#define SST_SR_AAI (1 << 6) /* Addressing mode */ |
Definition at line 31 of file sst.c.
◆ SST_SR_BP0
#define SST_SR_BP0 (1 << 2) /* Block Protection 0 */ |
Definition at line 28 of file sst.c.
◆ SST_SR_BP1
#define SST_SR_BP1 (1 << 3) /* Block Protection 1 */ |
Definition at line 29 of file sst.c.
◆ SST_SR_BP2
#define SST_SR_BP2 (1 << 4) /* Block Protection 2 */ |
Definition at line 30 of file sst.c.
◆ SST_SR_BPL
#define SST_SR_BPL (1 << 7) /* BP bits lock */ |
Definition at line 32 of file sst.c.
◆ SST_SR_WEL
#define SST_SR_WEL (1 << 1) /* Write enable */ |
Definition at line 27 of file sst.c.
◆ SST_SR_WIP
#define SST_SR_WIP (1 << 0) /* Write-in-Progress */ |
Definition at line 26 of file sst.c.
◆ sst_byte_write()
static int sst_byte_write |
( |
const struct spi_flash * |
flash, |
|
|
u32 |
offset, |
|
|
const void * |
buf |
|
) |
| |
|
static |
Definition at line 118 of file sst.c.
References BIOS_SPEW, buf, CMD_SST_BP, CMD_SST_RDSR, offset, printk, spi_flash::spi, spi_flash_cmd_wait_ready(), spi_flash_cmd_write(), SPI_FLASH_PROG_TIMEOUT_MS, spi_w8r8(), and sst_enable_writing().
Referenced by sst_write_ai().
◆ sst_disable_writing()
static int sst_disable_writing |
( |
const struct spi_flash * |
flash | ) |
|
|
static |
◆ sst_enable_writing()
static int sst_enable_writing |
( |
const struct spi_flash * |
flash | ) |
|
|
static |
◆ sst_enable_writing_status()
static int sst_enable_writing_status |
( |
const struct spi_flash * |
flash | ) |
|
|
static |
◆ sst_unlock()
static int sst_unlock |
( |
const struct spi_flash * |
flash | ) |
|
|
static |
◆ sst_write_ai()
Definition at line 144 of file sst.c.
References BIOS_SPEW, BIOS_WARNING, buf, CMD_SST_AAI_WP, CMD_SST_RDSR, offset, printk, spi_flash::spi, spi_flash_cmd_wait_ready(), spi_flash_cmd_write(), SPI_FLASH_PROG_TIMEOUT_MS, spi_w8r8(), sst_byte_write(), sst_disable_writing(), and sst_enable_writing().
◆ descai
Initial value:= {
.ops = {
},
}
int spi_flash_cmd_read(const struct spi_flash *flash, u32 offset, size_t len, void *buf)
int spi_flash_cmd_erase(const struct spi_flash *flash, u32 offset, size_t len)
int spi_flash_cmd_status(const struct spi_flash *flash, u8 *reg)
static int sst_write_ai(const struct spi_flash *flash, u32 offset, size_t len, const void *buf)
Definition at line 209 of file sst.c.
◆ flash_table_ai
Definition at line 1 of file sst.c.
◆ flash_table_pp256
Initial value:= {
{
.id[0] = 0x4b,
.nr_sectors_shift = 11,
},
}
Definition at line 1 of file sst.c.
◆ spi_flash_sst_ai_vi
Initial value:= {
.sector_size_kib_shift = 2,
.match_id_mask[0] = 0xff,
}
static const struct spi_flash_ops_descriptor descai
static const struct spi_flash_part_id flash_table_ai[]
static int sst_unlock(const struct spi_flash *flash)
Definition at line 209 of file sst.c.
◆ spi_flash_sst_vi
Initial value:= {
.page_size_shift = 8,
.sector_size_kib_shift = 2,
.match_id_mask[0] = 0xff,
}
const struct spi_flash_ops_descriptor spi_flash_pp_0x20_sector_desc
static const struct spi_flash_part_id flash_table_pp256[]
Definition at line 209 of file sst.c.