Go to the source code of this file.
|  | 
|  | FLASH_BANK_COMMAND_HANDLER (w600_flash_bank_command) | 
|  | 
| static int | get_w600_info (struct flash_bank *bank, struct command_invocation *cmd) | 
|  | 
| static int | w600_auto_probe (struct flash_bank *bank) | 
|  | 
| static int | w600_erase (struct flash_bank *bank, unsigned int first, unsigned int last) | 
|  | 
| static int | w600_get_delay (struct flash_bank *bank, uint32_t cmd) | 
|  | 
| static int | w600_get_flash_id (struct flash_bank *bank, uint32_t *flash_id) | 
|  | 
| static int | w600_probe (struct flash_bank *bank) | 
|  | 
| static int | w600_start (struct flash_bank *bank, uint32_t cmd, uint32_t addr, uint32_t len) | 
|  | 
| static int | w600_start_do (struct flash_bank *bank, uint32_t cmd, uint32_t addr, uint32_t len, int timeout) | 
|  | 
| static int | w600_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) | 
|  | 
| static int | w600_write_disable (struct flash_bank *bank) | 
|  | 
| static int | w600_write_enable (struct flash_bank *bank) | 
|  | 
◆ QFLASH_ADDR
      
        
          | #define QFLASH_ADDR | ( |  | addr | ) | (((addr) & 0xFFFFF) << 8) | 
      
 
 
◆ QFLASH_BUFFER
◆ QFLASH_CMD_ADDR
      
        
          | #define QFLASH_CMD_ADDR   (1ul << 31) | 
      
 
 
◆ QFLASH_CMD_DATA
      
        
          | #define QFLASH_CMD_DATA   (1ul << 15) | 
      
 
 
◆ QFLASH_CMD_DATALEN
      
        
          | #define QFLASH_CMD_DATALEN | ( |  | len | ) | (((len) & 0x3FF) << 16) | 
      
 
 
◆ QFLASH_CMD_INFO
◆ QFLASH_CMD_PP
◆ QFLASH_CMD_RDID
◆ QFLASH_CMD_READ
      
        
          | #define QFLASH_CMD_READ   (1ul << 14) | 
      
 
 
◆ QFLASH_CMD_SE
◆ QFLASH_CMD_START
◆ QFLASH_CMD_WRDI
◆ QFLASH_CMD_WREN
◆ QFLASH_CMD_WRITE
      
        
          | #define QFLASH_CMD_WRITE   0 | 
      
 
 
◆ QFLASH_CRM
      
        
          | #define QFLASH_CRM | ( |  | crm | ) | (((crm) & 0xFF) << 0) | 
      
 
 
◆ QFLASH_REGBASE
      
        
          | #define QFLASH_REGBASE   0X40002000 | 
      
 
 
◆ QFLASH_START
      
        
          | #define QFLASH_START   (1ul << 28) | 
      
 
 
◆ W600_FLASH_BASE
      
        
          | #define W600_FLASH_BASE   0x08000000 | 
      
 
 
◆ W600_FLASH_PAGESIZE
      
        
          | #define W600_FLASH_PAGESIZE   0x100 | 
      
 
 
◆ W600_FLASH_PROTECT_SIZE
      
        
          | #define W600_FLASH_PROTECT_SIZE   0x2000 | 
      
 
 
◆ W600_FLASH_SECSIZE
      
        
          | #define W600_FLASH_SECSIZE   0x1000 | 
      
 
 
◆ FLASH_BANK_COMMAND_HANDLER()
      
        
          | FLASH_BANK_COMMAND_HANDLER | ( | w600_flash_bank_command |  | ) |  | 
      
 
 
◆ get_w600_info()
◆ w600_auto_probe()
  
  | 
        
          | static int w600_auto_probe | ( | struct flash_bank * | bank | ) |  |  | static | 
 
 
◆ w600_erase()
  
  | 
        
          | static int w600_erase | ( | struct flash_bank * | bank, |  
          |  |  | unsigned int | first, |  
          |  |  | unsigned int | last |  
          |  | ) |  |  |  | static | 
 
Definition at line 196 of file w600.c.
References bank, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, QFLASH_ADDR, QFLASH_CMD_SE, TARGET_HALTED, W600_FLASH_PROTECT_SIZE, W600_FLASH_SECSIZE, and w600_start().
 
 
◆ w600_get_delay()
  
  | 
        
          | static int w600_get_delay | ( | struct flash_bank * | bank, |  
          |  |  | uint32_t | cmd |  
          |  | ) |  |  |  | static | 
 
 
◆ w600_get_flash_id()
  
  | 
        
          | static int w600_get_flash_id | ( | struct flash_bank * | bank, |  
          |  |  | uint32_t * | flash_id |  
          |  | ) |  |  |  | static | 
 
 
◆ w600_probe()
Definition at line 272 of file w600.c.
References ARRAY_SIZE, bank, ERROR_FAIL, ERROR_OK, w600_flash_bank::id, LOG_ERROR, LOG_INFO, NULL, w600_flash_bank::param, w600_flash_bank::probed, w600_flash_bank::user_bank_size, W600_FLASH_BASE, W600_FLASH_PAGESIZE, W600_FLASH_PROTECT_SIZE, W600_FLASH_SECSIZE, w600_get_flash_id(), and w600_param.
Referenced by w600_auto_probe().
 
 
◆ w600_start()
  
  | 
        
          | static int w600_start | ( | struct flash_bank * | bank, |  
          |  |  | uint32_t | cmd, |  
          |  |  | uint32_t | addr, |  
          |  |  | uint32_t | len |  
          |  | ) |  |  |  | static | 
 
 
◆ w600_start_do()
  
  | 
        
          | static int w600_start_do | ( | struct flash_bank * | bank, |  
          |  |  | uint32_t | cmd, |  
          |  |  | uint32_t | addr, |  
          |  |  | uint32_t | len, |  
          |  |  | int | timeout |  
          |  | ) |  |  |  | static | 
 
Definition at line 123 of file w600.c.
References addr, alive_sleep(), bank, cmd, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, QFLASH_CMD_DATA, QFLASH_CMD_DATALEN, QFLASH_CMD_INFO, QFLASH_CMD_START, QFLASH_START, status, target_read_u32(), and target_write_u32().
Referenced by w600_start(), w600_write_disable(), and w600_write_enable().
 
 
◆ w600_write()
  
  | 
        
          | static int w600_write | ( | struct flash_bank * | bank, |  
          |  |  | const uint8_t * | buffer, |  
          |  |  | uint32_t | offset, |  
          |  |  | uint32_t | count |  
          |  | ) |  |  |  | static | 
 
Definition at line 220 of file w600.c.
References bank, buffer, count, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, LOG_WARNING, offset, QFLASH_ADDR, QFLASH_BUFFER, QFLASH_CMD_PP, TARGET_HALTED, target_write_buffer(), W600_FLASH_PAGESIZE, and w600_start().
 
 
◆ w600_write_disable()
  
  | 
        
          | static int w600_write_disable | ( | struct flash_bank * | bank | ) |  |  | static | 
 
 
◆ w600_write_enable()
  
  | 
        
          | static int w600_write_enable | ( | struct flash_bank * | bank | ) |  |  | static | 
 
 
◆ w600_flash
Initial value:= {
    .name = "w600",
    .flash_bank_command = w600_flash_bank_command,
}
int default_flash_blank_check(struct flash_bank *bank)
Provides default erased-bank check handling.
int default_flash_read(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Provides default read implementation for flash memory.
void default_flash_free_driver_priv(struct flash_bank *bank)
Deallocates bank->driver_priv.
static int w600_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
static int w600_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
static int w600_probe(struct flash_bank *bank)
static int w600_auto_probe(struct flash_bank *bank)
static int get_w600_info(struct flash_bank *bank, struct command_invocation *cmd)
Definition at line 354 of file w600.c.
 
 
◆ w600_param
Initial value:= {
    {
        .id = 0x85,
        .se_delay = 8,
        .pp_delay = 2,
    },
    {
        .id = 0x1C,
        .se_delay = 50,
        .pp_delay = 1,
    },
    {
        .id = 0xC8,
        .se_delay = 45,
        .pp_delay = 1,
    },
    {
        .id = 0x0B,
        .se_delay = 60,
        .pp_delay = 1,
    },
    {
        .id = 0x68,
        .se_delay = 50,
        .pp_delay = 1,
    },
}
Definition at line 1 of file w600.c.
Referenced by w600_probe().