Remove misleading typedef and redundant suffix from struct flash_driver.
char hwaddr[512];
-extern flash_driver_t *flash_drivers[];
+extern struct flash_driver *flash_drivers[];
extern target_type_t *target_types[];
#ifdef CYGPKG_PROFILE_GPROF
else return ERROR_OK;
}
-flash_driver_t aduc702x_flash = {
+struct flash_driver aduc702x_flash = {
.name = "aduc702x",
.flash_bank_command = &aduc702x_flash_bank_command,
.erase = &aduc702x_erase,
return ERROR_OK;
}
-flash_driver_t at91sam3_flash = {
+struct flash_driver at91sam3_flash = {
.name = "at91sam3",
.register_commands = &sam3_register_commands,
.flash_bank_command = &sam3_flash_bank_command,
// nothing to do here other then export this.
-extern flash_driver_t at91sam3_flash;
+extern struct flash_driver at91sam3_flash;
return ERROR_OK;
}
-flash_driver_t at91sam7_flash = {
+struct flash_driver at91sam7_flash = {
.name = "at91sam7",
.register_commands = &at91sam7_register_commands,
.flash_bank_command = &at91sam7_flash_bank_command,
return ERROR_OK;
}
-flash_driver_t avr_flash = {
+struct flash_driver avr_flash = {
.name = "avr",
.register_commands = &avrf_register_commands,
.flash_bank_command = &avrf_flash_bank_command,
return ERROR_OK;
}
-flash_driver_t cfi_flash = {
+struct flash_driver cfi_flash = {
.name = "cfi",
.register_commands = &cfi_register_commands,
.flash_bank_command = &cfi_flash_bank_command,
}
#endif
-flash_driver_t ecosflash_flash = {
+struct flash_driver ecosflash_flash = {
.name = "ecosflash",
.register_commands = &ecosflash_register_commands,
.flash_bank_command = &ecosflash_flash_bank_command,
return ERROR_OK;
}
-flash_driver_t faux_flash = {
+struct flash_driver faux_flash = {
.name = "faux",
.register_commands = &faux_register_commands,
.flash_bank_command = &faux_flash_bank_command,
/* flash drivers
*/
-extern flash_driver_t lpc2000_flash;
-extern flash_driver_t lpc288x_flash;
-extern flash_driver_t lpc2900_flash;
-extern flash_driver_t cfi_flash;
-extern flash_driver_t at91sam3_flash;
-extern flash_driver_t at91sam7_flash;
-extern flash_driver_t str7x_flash;
-extern flash_driver_t str9x_flash;
-extern flash_driver_t aduc702x_flash;
-extern flash_driver_t stellaris_flash;
-extern flash_driver_t str9xpec_flash;
-extern flash_driver_t stm32x_flash;
-extern flash_driver_t tms470_flash;
-extern flash_driver_t ecosflash_flash;
-extern flash_driver_t ocl_flash;
-extern flash_driver_t pic32mx_flash;
-extern flash_driver_t avr_flash;
-extern flash_driver_t faux_flash;
-
-flash_driver_t *flash_drivers[] = {
+extern struct flash_driver lpc2000_flash;
+extern struct flash_driver lpc288x_flash;
+extern struct flash_driver lpc2900_flash;
+extern struct flash_driver cfi_flash;
+extern struct flash_driver at91sam3_flash;
+extern struct flash_driver at91sam7_flash;
+extern struct flash_driver str7x_flash;
+extern struct flash_driver str9x_flash;
+extern struct flash_driver aduc702x_flash;
+extern struct flash_driver stellaris_flash;
+extern struct flash_driver str9xpec_flash;
+extern struct flash_driver stm32x_flash;
+extern struct flash_driver tms470_flash;
+extern struct flash_driver ecosflash_flash;
+extern struct flash_driver ocl_flash;
+extern struct flash_driver pic32mx_flash;
+extern struct flash_driver avr_flash;
+extern struct flash_driver faux_flash;
+
+struct flash_driver *flash_drivers[] = {
&lpc2000_flash,
&lpc288x_flash,
&lpc2900_flash,
* corresponding static <code>flash_driver_<i>callback</i>()</code>
* routine in flash.c.
*/
-typedef struct flash_driver_s
+struct flash_driver
{
/**
* Gives a human-readable name of this flash driver,
* @returns ERROR_OK if successful; otherwise, an error code.
*/
int (*auto_probe)(struct flash_bank_s *bank);
-} flash_driver_t;
+};
#define FLASH_BANK_COMMAND_HANDLER(name) static __FLASH_BANK_COMMAND(name)
{
struct target_s *target; /**< Target to which this bank belongs. */
- flash_driver_t *driver; /**< Driver for this bank. */
+ struct flash_driver *driver; /**< Driver for this bank. */
void *driver_priv; /**< Private driver storage pointer */
int bank_number; /**< The 'bank' (or chip number) of this instance. */
return ERROR_OK;
}
-flash_driver_t lpc2000_flash = {
+struct flash_driver lpc2000_flash = {
.name = "lpc2000",
.register_commands = &lpc2000_register_commands,
.flash_bank_command = &lpc2000_flash_bank_command,
return ERROR_OK;
}
-flash_driver_t lpc288x_flash = {
+struct flash_driver lpc288x_flash = {
.name = "lpc288x",
.flash_bank_command = &lpc288x_flash_bank_command,
.erase = &lpc288x_erase,
}
-flash_driver_t lpc2900_flash =
+struct flash_driver lpc2900_flash =
{
.name = "lpc2900",
.register_commands = lpc2900_register_commands,
return ERROR_OK;
}
-flash_driver_t ocl_flash = {
+struct flash_driver ocl_flash = {
.name = "ocl",
.flash_bank_command = &ocl_flash_bank_command,
.erase = &ocl_erase,
return ERROR_OK;
}
-flash_driver_t pic32mx_flash = {
+struct flash_driver pic32mx_flash = {
.name = "pic32mx",
.register_commands = &pic32mx_register_commands,
.flash_bank_command = &pic32mx_flash_bank_command,
}
-flash_driver_t stellaris_flash = {
+struct flash_driver stellaris_flash = {
.name = "stellaris",
.register_commands = &stellaris_register_commands,
.flash_bank_command = &stellaris_flash_bank_command,
return ERROR_OK;
}
-flash_driver_t stm32x_flash = {
+struct flash_driver stm32x_flash = {
.name = "stm32x",
.register_commands = &stm32x_register_commands,
.flash_bank_command = &stm32x_flash_bank_command,
return ERROR_OK;
}
-flash_driver_t str7x_flash = {
+struct flash_driver str7x_flash = {
.name = "str7x",
.register_commands = &str7x_register_commands,
.flash_bank_command = &str7x_flash_bank_command,
return ERROR_OK;
}
-flash_driver_t str9x_flash = {
+struct flash_driver str9x_flash = {
.name = "str9x",
.register_commands = &str9x_register_commands,
.flash_bank_command = &str9x_flash_bank_command,
return ERROR_OK;
}
-flash_driver_t str9xpec_flash = {
+struct flash_driver str9xpec_flash = {
.name = "str9xpec",
.register_commands = &str9xpec_register_commands,
.flash_bank_command = &str9xpec_flash_bank_command,
return ERROR_OK;
}
-flash_driver_t tms470_flash = {
+struct flash_driver tms470_flash = {
.name = "tms470",
.register_commands = &tms470_register_commands,
.flash_bank_command = &tms470_flash_bank_command,