Commit 96b62996 authored by Zachary T Welch's avatar Zachary T Welch
Browse files

flash_bank_t -> struct flash_bank

Remove misleading typedef and redundant suffix from struct flash_bank.
parent 2f6e56e3
......@@ -29,7 +29,7 @@
#include "time_support.h"
static int aduc702x_build_sector_list(struct flash_bank_s *bank);
static int aduc702x_build_sector_list(struct flash_bank *bank);
static int aduc702x_check_flash_completion(struct target* target, unsigned int timeout_ms);
static int aduc702x_set_write_enable(struct target *target, int enable);
......@@ -64,9 +64,9 @@ FLASH_BANK_COMMAND_HANDLER(aduc702x_flash_bank_command)
return ERROR_OK;
}
static int aduc702x_build_sector_list(struct flash_bank_s *bank)
static int aduc702x_build_sector_list(struct flash_bank *bank)
{
//aduc7026_flash_bank_t *aduc7026_info = bank->driver_priv;
//aduc7026_struct flash_bank *aduc7026_info = bank->driver_priv;
int i = 0;
uint32_t offset = 0;
......@@ -86,13 +86,13 @@ static int aduc702x_build_sector_list(struct flash_bank_s *bank)
return ERROR_OK;
}
static int aduc702x_protect_check(struct flash_bank_s *bank)
static int aduc702x_protect_check(struct flash_bank *bank)
{
printf("aduc702x_protect_check not implemented yet.\n");
return ERROR_OK;
}
static int aduc702x_erase(struct flash_bank_s *bank, int first, int last)
static int aduc702x_erase(struct flash_bank *bank, int first, int last)
{
//int res;
int x;
......@@ -145,7 +145,7 @@ static int aduc702x_erase(struct flash_bank_s *bank, int first, int last)
return ERROR_OK;
}
static int aduc702x_protect(struct flash_bank_s *bank, int set, int first, int last)
static int aduc702x_protect(struct flash_bank *bank, int set, int first, int last)
{
printf("aduc702x_protect not implemented yet.\n");
return ERROR_FLASH_OPERATION_FAILED;
......@@ -156,7 +156,7 @@ static int aduc702x_protect(struct flash_bank_s *bank, int set, int first, int l
*
* Caller should not check for other return values specifically
*/
static int aduc702x_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
static int aduc702x_write_block(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
{
struct aduc702x_flash_bank *aduc702x_info = bank->driver_priv;
struct target *target = bank->target;
......@@ -301,7 +301,7 @@ static int aduc702x_write_block(struct flash_bank_s *bank, uint8_t *buffer, uint
/* All-JTAG, single-access method. Very slow. Used only if there is no
* working area available. */
static int aduc702x_write_single(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
static int aduc702x_write_single(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
{
uint32_t x;
uint8_t b;
......@@ -342,7 +342,7 @@ static int aduc702x_write_single(struct flash_bank_s *bank, uint8_t *buffer, uin
return ERROR_OK;
}
int aduc702x_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
int aduc702x_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
{
int retval;
......@@ -366,12 +366,12 @@ int aduc702x_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset,
return retval;
}
static int aduc702x_probe(struct flash_bank_s *bank)
static int aduc702x_probe(struct flash_bank *bank)
{
return ERROR_OK;
}
static int aduc702x_info(struct flash_bank_s *bank, char *buf, int buf_size)
static int aduc702x_info(struct flash_bank *bank, char *buf, int buf_size)
{
snprintf(buf, buf_size, "aduc702x flash driver info");
return ERROR_OK;
......
......@@ -175,7 +175,7 @@ struct sam3_bank_private {
// so we can find the chip we belong to
struct sam3_chip *pChip;
// so we can find the orginal bank pointer
flash_bank_t *pBank;
struct flash_bank *pBank;
unsigned bank_number;
uint32_t controller_address;
uint32_t base_address;
......@@ -1456,7 +1456,7 @@ static const struct sam3_reg_list sam3_all_regs[] = {
static struct sam3_bank_private *
get_sam3_bank_private(flash_bank_t *bank)
get_sam3_bank_private(struct flash_bank *bank)
{
return (struct sam3_bank_private *)(bank->driver_priv);
}
......@@ -1582,7 +1582,7 @@ sam3_GetInfo(struct sam3_chip *pChip)
static int
sam3_erase_check(struct flash_bank_s *bank)
sam3_erase_check(struct flash_bank *bank)
{
int x;
......@@ -1606,7 +1606,7 @@ sam3_erase_check(struct flash_bank_s *bank)
}
static int
sam3_protect_check(struct flash_bank_s *bank)
sam3_protect_check(struct flash_bank *bank)
{
int r;
uint32_t v=0;
......@@ -1709,7 +1709,7 @@ sam3_GetDetails(struct sam3_bank_private *pPrivate)
const struct sam3_chip_details *pDetails;
struct sam3_chip *pChip;
void *vp;
flash_bank_t *saved_banks[SAM3_MAX_FLASH_BANKS];
struct flash_bank *saved_banks[SAM3_MAX_FLASH_BANKS];
unsigned x;
const char *cp;
......@@ -1777,7 +1777,7 @@ sam3_GetDetails(struct sam3_bank_private *pPrivate)
static int
_sam3_probe(struct flash_bank_s *bank, int noise)
_sam3_probe(struct flash_bank *bank, int noise)
{
unsigned x;
int r;
......@@ -1861,13 +1861,13 @@ _sam3_probe(struct flash_bank_s *bank, int noise)
}
static int
sam3_probe(struct flash_bank_s *bank)
sam3_probe(struct flash_bank *bank)
{
return _sam3_probe(bank, 1);
}
static int
sam3_auto_probe(struct flash_bank_s *bank)
sam3_auto_probe(struct flash_bank *bank)
{
return _sam3_probe(bank, 0);
}
......@@ -1875,7 +1875,7 @@ sam3_auto_probe(struct flash_bank_s *bank)
static int
sam3_erase(struct flash_bank_s *bank, int first, int last)
sam3_erase(struct flash_bank *bank, int first, int last)
{
struct sam3_bank_private *pPrivate;
int r;
......@@ -1907,7 +1907,7 @@ sam3_erase(struct flash_bank_s *bank, int first, int last)
}
static int
sam3_protect(struct flash_bank_s *bank, int set, int first, int last)
sam3_protect(struct flash_bank *bank, int set, int first, int last)
{
struct sam3_bank_private *pPrivate;
int r;
......@@ -1936,7 +1936,7 @@ sam3_protect(struct flash_bank_s *bank, int set, int first, int last)
static int
sam3_info(flash_bank_t *bank, char *buf, int buf_size)
sam3_info(struct flash_bank *bank, char *buf, int buf_size)
{
if (bank->target->state != TARGET_HALTED) {
LOG_ERROR("Target not halted");
......@@ -2104,7 +2104,7 @@ sam3_page_write(struct sam3_bank_private *pPrivate, unsigned pagenum, uint8_t *b
static int
sam3_write(struct flash_bank_s *bank,
sam3_write(struct flash_bank *bank,
uint8_t *buffer,
uint32_t offset,
uint32_t count)
......
......@@ -52,13 +52,13 @@
#include "at91sam7.h"
#include "binarybuffer.h"
static int at91sam7_protect_check(struct flash_bank_s *bank);
static int at91sam7_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count);
static int at91sam7_protect_check(struct flash_bank *bank);
static int at91sam7_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count);
static uint32_t at91sam7_get_flash_status(struct target *target, int bank_number);
static void at91sam7_set_flash_mode(struct flash_bank_s *bank, int mode);
static uint32_t at91sam7_wait_status_busy(struct flash_bank_s *bank, uint32_t waitbits, int timeout);
static int at91sam7_flash_command(struct flash_bank_s *bank, uint8_t cmd, uint16_t pagen);
static void at91sam7_set_flash_mode(struct flash_bank *bank, int mode);
static uint32_t at91sam7_wait_status_busy(struct flash_bank *bank, uint32_t waitbits, int timeout);
static int at91sam7_flash_command(struct flash_bank *bank, uint8_t cmd, uint16_t pagen);
static uint32_t MC_FMR[4] = { 0xFFFFFF60, 0xFFFFFF70, 0xFFFFFF80, 0xFFFFFF90 };
static uint32_t MC_FCR[4] = { 0xFFFFFF64, 0xFFFFFF74, 0xFFFFFF84, 0xFFFFFF94 };
......@@ -97,7 +97,7 @@ static uint32_t at91sam7_get_flash_status(struct target *target, int bank_number
}
/* Read clock configuration and set at91sam7_info->mck_freq */
static void at91sam7_read_clock_info(flash_bank_t *bank)
static void at91sam7_read_clock_info(struct flash_bank *bank)
{
struct at91sam7_flash_bank *at91sam7_info = bank->driver_priv;
struct target *target = bank->target;
......@@ -176,7 +176,7 @@ static void at91sam7_read_clock_info(flash_bank_t *bank)
}
/* Setup the timimg registers for nvbits or normal flash */
static void at91sam7_set_flash_mode(flash_bank_t *bank, int mode)
static void at91sam7_set_flash_mode(struct flash_bank *bank, int mode)
{
uint32_t fmr, fmcn = 0, fws = 0;
struct at91sam7_flash_bank *at91sam7_info = bank->driver_priv;
......@@ -224,7 +224,7 @@ static void at91sam7_set_flash_mode(flash_bank_t *bank, int mode)
at91sam7_info->flashmode = mode;
}
static uint32_t at91sam7_wait_status_busy(flash_bank_t *bank, uint32_t waitbits, int timeout)
static uint32_t at91sam7_wait_status_busy(struct flash_bank *bank, uint32_t waitbits, int timeout)
{
uint32_t status;
......@@ -251,7 +251,7 @@ static uint32_t at91sam7_wait_status_busy(flash_bank_t *bank, uint32_t waitbits,
}
/* Send one command to the AT91SAM flash controller */
static int at91sam7_flash_command(struct flash_bank_s *bank, uint8_t cmd, uint16_t pagen)
static int at91sam7_flash_command(struct flash_bank *bank, uint8_t cmd, uint16_t pagen)
{
uint32_t fcr;
struct at91sam7_flash_bank *at91sam7_info = bank->driver_priv;
......@@ -280,9 +280,9 @@ static int at91sam7_flash_command(struct flash_bank_s *bank, uint8_t cmd, uint16
}
/* Read device id register, main clock frequency register and fill in driver info structure */
static int at91sam7_read_part_info(struct flash_bank_s *bank)
static int at91sam7_read_part_info(struct flash_bank *bank)
{
flash_bank_t *t_bank = bank;
struct flash_bank *t_bank = bank;
struct at91sam7_flash_bank *at91sam7_info;
struct target *target = t_bank->target;
......@@ -304,7 +304,7 @@ static int at91sam7_read_part_info(struct flash_bank_s *bank)
if (at91sam7_info->cidr != 0)
{
/* flash already configured, update clock and check for protected sectors */
flash_bank_t *fb = bank;
struct flash_bank *fb = bank;
t_bank = fb;
while (t_bank)
......@@ -336,7 +336,7 @@ static int at91sam7_read_part_info(struct flash_bank_s *bank)
if (at91sam7_info->flash_autodetection == 0)
{
/* banks and sectors are already created, based on data from input file */
flash_bank_t *fb = bank;
struct flash_bank *fb = bank;
t_bank = fb;
while (t_bank)
{
......@@ -532,7 +532,7 @@ static int at91sam7_read_part_info(struct flash_bank_s *bank)
if (bnk > 0)
{
/* create a new flash bank element */
flash_bank_t *fb = malloc(sizeof(flash_bank_t));
struct flash_bank *fb = malloc(sizeof(struct flash_bank));
fb->target = target;
fb->driver = bank->driver;
fb->driver_priv = malloc(sizeof(struct at91sam7_flash_bank));
......@@ -595,7 +595,7 @@ static int at91sam7_read_part_info(struct flash_bank_s *bank)
return ERROR_OK;
}
static int at91sam7_erase_check(struct flash_bank_s *bank)
static int at91sam7_erase_check(struct flash_bank *bank)
{
struct target *target = bank->target;
uint16_t retval;
......@@ -661,7 +661,7 @@ static int at91sam7_erase_check(struct flash_bank_s *bank)
return ERROR_OK;
}
static int at91sam7_protect_check(struct flash_bank_s *bank)
static int at91sam7_protect_check(struct flash_bank *bank)
{
uint8_t lock_pos, gpnvm_pos;
uint32_t status;
......@@ -713,7 +713,7 @@ static int at91sam7_protect_check(struct flash_bank_s *bank)
FLASH_BANK_COMMAND_HANDLER(at91sam7_flash_bank_command)
{
flash_bank_t *t_bank = bank;
struct flash_bank *t_bank = bank;
struct at91sam7_flash_bank *at91sam7_info;
struct target *target = t_bank->target;
......@@ -785,7 +785,7 @@ FLASH_BANK_COMMAND_HANDLER(at91sam7_flash_bank_command)
if (bnk > 0)
{
/* create a new bank element */
flash_bank_t *fb = malloc(sizeof(flash_bank_t));
struct flash_bank *fb = malloc(sizeof(struct flash_bank));
fb->target = target;
fb->driver = bank->driver;
fb->driver_priv = malloc(sizeof(struct at91sam7_flash_bank));
......@@ -827,7 +827,7 @@ FLASH_BANK_COMMAND_HANDLER(at91sam7_flash_bank_command)
return ERROR_OK;
}
static int at91sam7_erase(struct flash_bank_s *bank, int first, int last)
static int at91sam7_erase(struct flash_bank *bank, int first, int last)
{
struct at91sam7_flash_bank *at91sam7_info = bank->driver_priv;
int sec;
......@@ -895,7 +895,7 @@ static int at91sam7_erase(struct flash_bank_s *bank, int first, int last)
return ERROR_OK;
}
static int at91sam7_protect(struct flash_bank_s *bank, int set, int first, int last)
static int at91sam7_protect(struct flash_bank *bank, int set, int first, int last)
{
uint32_t cmd;
int sector;
......@@ -945,7 +945,7 @@ static int at91sam7_protect(struct flash_bank_s *bank, int set, int first, int l
return ERROR_OK;
}
static int at91sam7_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
static int at91sam7_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
{
int retval;
struct at91sam7_flash_bank *at91sam7_info = bank->driver_priv;
......@@ -1014,7 +1014,7 @@ static int at91sam7_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t o
return ERROR_OK;
}
static int at91sam7_probe(struct flash_bank_s *bank)
static int at91sam7_probe(struct flash_bank *bank)
{
/* we can't probe on an at91sam7
* if this is an at91sam7, it has the configured flash */
......@@ -1033,7 +1033,7 @@ static int at91sam7_probe(struct flash_bank_s *bank)
return ERROR_OK;
}
static int at91sam7_info(struct flash_bank_s *bank, char *buf, int buf_size)
static int at91sam7_info(struct flash_bank *bank, char *buf, int buf_size)
{
int printed;
struct at91sam7_flash_bank *at91sam7_info = bank->driver_priv;
......@@ -1100,7 +1100,7 @@ static int at91sam7_info(struct flash_bank_s *bank, char *buf, int buf_size)
*/
COMMAND_HANDLER(at91sam7_handle_gpnvm_command)
{
flash_bank_t *bank;
struct flash_bank *bank;
int bit;
uint8_t flashcmd;
uint32_t status;
......
......@@ -198,19 +198,19 @@ FLASH_BANK_COMMAND_HANDLER(avrf_flash_bank_command)
return ERROR_OK;
}
static int avrf_erase(struct flash_bank_s *bank, int first, int last)
static int avrf_erase(struct flash_bank *bank, int first, int last)
{
LOG_INFO("%s", __FUNCTION__);
return ERROR_OK;
}
static int avrf_protect(struct flash_bank_s *bank, int set, int first, int last)
static int avrf_protect(struct flash_bank *bank, int set, int first, int last)
{
LOG_INFO("%s", __FUNCTION__);
return ERROR_OK;
}
static int avrf_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
static int avrf_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
{
struct target *target = bank->target;
struct avr_common *avr = target->arch_info;
......@@ -261,7 +261,7 @@ static int avrf_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offse
#define EXTRACT_MFG(X) (((X) & 0xffe) >> 1)
#define EXTRACT_PART(X) (((X) & 0xffff000) >> 12)
#define EXTRACT_VER(X) (((X) & 0xf0000000) >> 28)
static int avrf_probe(struct flash_bank_s *bank)
static int avrf_probe(struct flash_bank *bank)
{
struct target *target = bank->target;
struct avrf_flash_bank *avrf_info = bank->driver_priv;
......@@ -329,7 +329,7 @@ static int avrf_probe(struct flash_bank_s *bank)
}
}
static int avrf_auto_probe(struct flash_bank_s *bank)
static int avrf_auto_probe(struct flash_bank *bank)
{
struct avrf_flash_bank *avrf_info = bank->driver_priv;
if (avrf_info->probed)
......@@ -337,13 +337,13 @@ static int avrf_auto_probe(struct flash_bank_s *bank)
return avrf_probe(bank);
}
static int avrf_protect_check(struct flash_bank_s *bank)
static int avrf_protect_check(struct flash_bank *bank)
{
LOG_INFO("%s", __FUNCTION__);
return ERROR_OK;
}
static int avrf_info(struct flash_bank_s *bank, char *buf, int buf_size)
static int avrf_info(struct flash_bank *bank, char *buf, int buf_size)
{
struct target *target = bank->target;
struct avr_common *avr = target->arch_info;
......@@ -394,7 +394,7 @@ static int avrf_info(struct flash_bank_s *bank, char *buf, int buf_size)
}
}
static int avrf_mass_erase(struct flash_bank_s *bank)
static int avrf_mass_erase(struct flash_bank *bank)
{
struct target *target = bank->target;
struct avr_common *avr = target->arch_info;
......@@ -425,7 +425,7 @@ COMMAND_HANDLER(avrf_handle_mass_erase_command)
return ERROR_OK;
}
flash_bank_t *bank;
struct flash_bank *bank;
int retval = flash_command_get_bank_by_num(cmd_ctx, args[0], &bank);
if (ERROR_OK != retval)
return retval;
......
......@@ -42,9 +42,9 @@ static struct cfi_unlock_addresses cfi_unlock_addresses[] =
};
/* CFI fixups foward declarations */
static void cfi_fixup_0002_erase_regions(flash_bank_t *flash, void *param);
static void cfi_fixup_0002_unlock_addresses(flash_bank_t *flash, void *param);
static void cfi_fixup_atmel_reversed_erase_regions(flash_bank_t *flash, void *param);
static void cfi_fixup_0002_erase_regions(struct flash_bank *flash, void *param);
static void cfi_fixup_0002_unlock_addresses(struct flash_bank *flash, void *param);
static void cfi_fixup_atmel_reversed_erase_regions(struct flash_bank *flash, void *param);
/* fixup after reading cmdset 0002 primary query table */
static const struct cfi_fixup cfi_0002_fixups[] = {
......@@ -67,7 +67,7 @@ static const struct cfi_fixup cfi_0001_fixups[] = {
{0, 0, NULL, NULL}
};
static void cfi_fixup(flash_bank_t *bank, const struct cfi_fixup *fixups)
static void cfi_fixup(struct flash_bank *bank, const struct cfi_fixup *fixups)
{
struct cfi_flash_bank *cfi_info = bank->driver_priv;
const struct cfi_fixup *f;
......@@ -82,8 +82,8 @@ static void cfi_fixup(flash_bank_t *bank, const struct cfi_fixup *fixups)
}
}
/* inline uint32_t flash_address(flash_bank_t *bank, int sector, uint32_t offset) */
static __inline__ uint32_t flash_address(flash_bank_t *bank, int sector, uint32_t offset)
/* inline uint32_t flash_address(struct flash_bank *bank, int sector, uint32_t offset) */
static __inline__ uint32_t flash_address(struct flash_bank *bank, int sector, uint32_t offset)
{
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -104,7 +104,7 @@ static __inline__ uint32_t flash_address(flash_bank_t *bank, int sector, uint32_
}
static void cfi_command(flash_bank_t *bank, uint8_t cmd, uint8_t *cmd_buf)
static void cfi_command(struct flash_bank *bank, uint8_t cmd, uint8_t *cmd_buf)
{
int i;
......@@ -134,7 +134,7 @@ static void cfi_command(flash_bank_t *bank, uint8_t cmd, uint8_t *cmd_buf)
* flash banks are expected to be made of similar chips
* the query result should be the same for all
*/
static uint8_t cfi_query_u8(flash_bank_t *bank, int sector, uint32_t offset)
static uint8_t cfi_query_u8(struct flash_bank *bank, int sector, uint32_t offset)
{
struct target *target = bank->target;
uint8_t data[CFI_MAX_BUS_WIDTH];
......@@ -151,7 +151,7 @@ static uint8_t cfi_query_u8(flash_bank_t *bank, int sector, uint32_t offset)
* in case of a bank made of multiple chips,
* the individual values are ORed
*/
static uint8_t cfi_get_u8(flash_bank_t *bank, int sector, uint32_t offset)
static uint8_t cfi_get_u8(struct flash_bank *bank, int sector, uint32_t offset)
{
struct target *target = bank->target;
uint8_t data[CFI_MAX_BUS_WIDTH];
......@@ -176,7 +176,7 @@ static uint8_t cfi_get_u8(flash_bank_t *bank, int sector, uint32_t offset)
}
}
static uint16_t cfi_query_u16(flash_bank_t *bank, int sector, uint32_t offset)
static uint16_t cfi_query_u16(struct flash_bank *bank, int sector, uint32_t offset)
{
struct target *target = bank->target;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -198,7 +198,7 @@ static uint16_t cfi_query_u16(flash_bank_t *bank, int sector, uint32_t offset)
return data[bank->bus_width - 1] | data[(2 * bank->bus_width) - 1] << 8;
}
static uint32_t cfi_query_u32(flash_bank_t *bank, int sector, uint32_t offset)
static uint32_t cfi_query_u32(struct flash_bank *bank, int sector, uint32_t offset)
{
struct target *target = bank->target;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -221,7 +221,7 @@ static uint32_t cfi_query_u32(flash_bank_t *bank, int sector, uint32_t offset)
data[(3 * bank->bus_width) - 1] << 16 | data[(4 * bank->bus_width) - 1] << 24;
}
static void cfi_intel_clear_status_register(flash_bank_t *bank)
static void cfi_intel_clear_status_register(struct flash_bank *bank)
{
struct target *target = bank->target;
uint8_t command[8];
......@@ -236,7 +236,7 @@ static void cfi_intel_clear_status_register(flash_bank_t *bank)
target_write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
}
uint8_t cfi_intel_wait_status_busy(flash_bank_t *bank, int timeout)
uint8_t cfi_intel_wait_status_busy(struct flash_bank *bank, int timeout)
{
uint8_t status;
......@@ -277,7 +277,7 @@ uint8_t cfi_intel_wait_status_busy(flash_bank_t *bank, int timeout)
return status;
}
int cfi_spansion_wait_status_busy(flash_bank_t *bank, int timeout)
int cfi_spansion_wait_status_busy(struct flash_bank *bank, int timeout)
{
uint8_t status, oldstatus;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -312,7 +312,7 @@ int cfi_spansion_wait_status_busy(flash_bank_t *bank, int timeout)
return(ERROR_FLASH_BUSY);
}
static int cfi_read_intel_pri_ext(flash_bank_t *bank)
static int cfi_read_intel_pri_ext(struct flash_bank *bank)
{
int retval;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -378,7 +378,7 @@ static int cfi_read_intel_pri_ext(flash_bank_t *bank)
return ERROR_OK;
}
static int cfi_read_spansion_pri_ext(flash_bank_t *bank)
static int cfi_read_spansion_pri_ext(struct flash_bank *bank)
{
int retval;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -443,7 +443,7 @@ static int cfi_read_spansion_pri_ext(flash_bank_t *bank)
return ERROR_OK;
}
static int cfi_read_atmel_pri_ext(flash_bank_t *bank)
static int cfi_read_atmel_pri_ext(struct flash_bank *bank)
{
int retval;
struct cfi_atmel_pri_ext atmel_pri_ext;
......@@ -510,7 +510,7 @@ static int cfi_read_atmel_pri_ext(flash_bank_t *bank)
return ERROR_OK;
}
static int cfi_read_0002_pri_ext(flash_bank_t *bank)
static int cfi_read_0002_pri_ext(struct flash_bank *bank)
{
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -524,7 +524,7 @@ static int cfi_read_0002_pri_ext(flash_bank_t *bank)
}
}
static int cfi_spansion_info(struct flash_bank_s *bank, char *buf, int buf_size)
static int cfi_spansion_info(struct flash_bank *bank, char *buf, int buf_size)
{
int printed;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -559,7 +559,7 @@ static int cfi_spansion_info(struct flash_bank_s *bank, char *buf, int buf_size)
return ERROR_OK;
}
static int cfi_intel_info(struct flash_bank_s *bank, char *buf, int buf_size)
static int cfi_intel_info(struct flash_bank *bank, char *buf, int buf_size)
{
int printed;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -652,7 +652,7 @@ FLASH_BANK_COMMAND_HANDLER(cfi_flash_bank_command)
return ERROR_OK;
}
static int cfi_intel_erase(struct flash_bank_s *bank, int first, int last)
static int cfi_intel_erase(struct flash_bank *bank, int first, int last)
{
int retval;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -696,7 +696,7 @@ static int cfi_intel_erase(struct flash_bank_s *bank, int first, int last)
}
static int cfi_spansion_erase(struct flash_bank_s *bank, int first, int last)
static int cfi_spansion_erase(struct flash_bank *bank, int first, int last)
{
int retval;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -762,7 +762,7 @@ static int cfi_spansion_erase(struct flash_bank_s *bank, int first, int last)
return target_write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
}
static int cfi_erase(struct flash_bank_s *bank, int first, int last)
static int cfi_erase(struct flash_bank *bank, int first, int last)
{
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -797,7 +797,7 @@ static int cfi_erase(struct flash_bank_s *bank, int first, int last)
return ERROR_OK;
}
static int cfi_intel_protect(struct flash_bank_s *bank, int set, int first, int last)
static int cfi_intel_protect(struct flash_bank *bank, int set, int first, int last)
{
int retval;
struct cfi_flash_bank *cfi_info = bank->driver_priv;
......@@ -914,7 +914,7 @@ static int cfi_intel_protect(struct flash_bank_s *bank, int set, int first, int
return target_write_memory(target, flash_address(bank, 0, 0x0), bank->bus_width, 1, command);
}
static int