]> git.sur5r.net Git - openocd/commitdiff
flash_driver_t -> struct flash_driver
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 15:38:01 +0000 (07:38 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 19:58:06 +0000 (11:58 -0800)
Remove misleading typedef and redundant suffix from struct flash_driver.

22 files changed:
src/ecosboard.c
src/flash/aduc702x.c
src/flash/at91sam3.c
src/flash/at91sam3.h
src/flash/at91sam7.c
src/flash/avrf.c
src/flash/cfi.c
src/flash/ecos.c
src/flash/faux.c
src/flash/flash.c
src/flash/flash.h
src/flash/lpc2000.c
src/flash/lpc288x.c
src/flash/lpc2900.c
src/flash/ocl.c
src/flash/pic32mx.c
src/flash/stellaris.c
src/flash/stm32x.c
src/flash/str7x.c
src/flash/str9x.c
src/flash/str9xpec.c
src/flash/tms470.c

index b0f9525a92fd6df8d5d50ab5f21798a2b8fad859..8d85fe61bcd24f70b05758767e513650fdeef97f 100644 (file)
@@ -114,7 +114,7 @@ static bool writeLog = true;
 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
index 61ea36a94003585b447d88403d8ad28e5ee8b6bb..c17335e15a9dac5adc0d9d8699c26c18f3ded2c1 100644 (file)
@@ -422,7 +422,7 @@ static int aduc702x_check_flash_completion(target_t* target, unsigned int timeou
         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,
index 7e6b4567de65fd40b17ec2edb61bea3890d98e40..335f8ab58d30dcb6849638eedb4e3a9873af7a10 100644 (file)
@@ -2500,7 +2500,7 @@ sam3_register_commands(struct command_context_s *cmd_ctx)
        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,
index cea4c3abb53b717293e965a607f29c9ad71ef1cb..4fa7f467f97e4c2632cc75bee50460eeb6706b68 100644 (file)
@@ -20,4 +20,4 @@
 
 
 // nothing to do here other then export this.
-extern flash_driver_t at91sam3_flash;
+extern struct flash_driver at91sam3_flash;
index fd84e231d3bbc8b28cd1f4640e5f8221a846f524..c0b516c3f1da53585bf6e37f2bf5f8526466be59 100644 (file)
@@ -1191,7 +1191,7 @@ static int at91sam7_register_commands(struct command_context_s *cmd_ctx)
        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,
index fec21cbd2d66ccfea2d45d842af6da4326edee0c..8dd43398cb8f717310fafec956f8ea297924af86 100644 (file)
@@ -461,7 +461,7 @@ static int avrf_register_commands(struct command_context_s *cmd_ctx)
        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,
index a3187fe2752a922b88299434b47a3c04884e1c6a..3fa49170a8b73080cc3adcb2af4a6b6e8f003fbe 100644 (file)
@@ -2626,7 +2626,7 @@ static int cfi_info(struct flash_bank_s *bank, char *buf, int buf_size)
        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,
index b508cb12eb5fa1f82154f6ee5b34eb21c92f94fe..5a0d7ec923514dbcf6247e60c03c58766cb36073 100644 (file)
@@ -435,7 +435,7 @@ static int ecosflash_handle_gpnvm_command(struct command_context_s *cmd_ctx, cha
 }
 #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,
index b7622f3b1cdec5aa6a53cfbd8f1ad0e3cb6a51f5..52d372892a0e7ff8d23b4a87c46069837b9ea585 100644 (file)
@@ -128,7 +128,7 @@ static int faux_probe(struct flash_bank_s *bank)
        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,
index 2abd8c43062d3b68254bf1e03d53f6898595df36..22e272150575b713e0bc8dc1b9329a033e691b83 100644 (file)
@@ -35,26 +35,26 @@ static int flash_write_unlock(target_t *target, image_t *image, uint32_t *writte
 
 /* 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,
index d4abcde19c9baa4a86195a0ef71365cbed2911a2..9cd592321c3b3a946f8e34b06f9c97e81882730b 100644 (file)
@@ -82,7 +82,7 @@ struct flash_bank_s;
  * 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,
@@ -224,7 +224,7 @@ typedef struct flash_driver_s
         * @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)
 
@@ -242,7 +242,7 @@ typedef struct flash_bank_s
 {
        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. */
index 308a25cdd9a1049a60af29e067e941c94de9cfac..27eec7f3b1f84ef3aac27c787895e4cd31244bcc 100644 (file)
@@ -788,7 +788,7 @@ static int lpc2000_register_commands(struct command_context_s *cmd_ctx)
        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,
index 52d31a8ae5458fb1165a04b112f0971f3e0a2cd4..d681fbf9ea69ce3e0cf54f385e08506f197fc9f2 100644 (file)
@@ -471,7 +471,7 @@ static int lpc288x_protect(struct flash_bank_s *bank, int set, int first, int la
        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,
index fd265bd7ddeb85fc41aa9a6127a22ab044dc4f77..0f972bed5fa7ae6f6b3db5fab7d9ba1232906c31 100644 (file)
@@ -1830,7 +1830,7 @@ static int lpc2900_info(struct flash_bank_s *bank, char *buf, int buf_size)
 }
 
 
-flash_driver_t lpc2900_flash =
+struct flash_driver lpc2900_flash =
 {
        .name               = "lpc2900",
        .register_commands  = lpc2900_register_commands,
index 239f9f5c042ba73c91c719e02cc42ffae3d7618e..bd7577e3667888dd32023a7505e49d76399f4fba 100644 (file)
@@ -348,7 +348,7 @@ static int ocl_auto_probe(struct flash_bank_s *bank)
        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,
index 438630a179b9f835b283341e63566f4a74f5e596..18dfa979386cb0d277dcfc722f2b7c30f4d5d4ac 100644 (file)
@@ -904,7 +904,7 @@ static int pic32mx_register_commands(struct command_context_s *cmd_ctx)
        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,
index dc35c59eeeef4d1810dce6fa70877ab42588d1f0..9bd329d17316d0f4e9329387fdf70ef5f20e1969 100644 (file)
@@ -1172,7 +1172,7 @@ static int stellaris_register_commands(struct command_context_s *cmd_ctx)
 }
 
 
-flash_driver_t stellaris_flash = {
+struct flash_driver stellaris_flash = {
                .name = "stellaris",
                .register_commands = &stellaris_register_commands,
                .flash_bank_command = &stellaris_flash_bank_command,
index 8725fad63ba1d0012a9f9a5b678f531a7b8c8880..eab9708b37a2a151de0fae484652ebb1e954ffe0 100644 (file)
@@ -1205,7 +1205,7 @@ static int stm32x_register_commands(struct command_context_s *cmd_ctx)
        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,
index dbb587235d30d7ad44ec7d3c566149235adeddab..1b4056bd614b78fb48ef765a29eab692debf7644 100644 (file)
@@ -683,7 +683,7 @@ static int str7x_register_commands(struct command_context_s *cmd_ctx)
        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,
index caabd993c6b0730dce1ccaab1db2a8885e970792..711758289a2061cb6baf08ac9bd43ae7d986fd0c 100644 (file)
@@ -687,7 +687,7 @@ static int str9x_register_commands(struct command_context_s *cmd_ctx)
        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,
index 6b85e6a14a593924948f75a7d1fb07a95046dce7..aa19b75efd1209e017c943487c8b782aef20cc21 100644 (file)
@@ -1205,7 +1205,7 @@ static int str9xpec_register_commands(struct command_context_s *cmd_ctx)
        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,
index 75b233d94e88a714d86833f217705d6b1d8d0517..4149d9ca1e021fe852bc9f8ce8acd6d5086b5ed1 100644 (file)
@@ -1236,7 +1236,7 @@ FLASH_BANK_COMMAND_HANDLER(tms470_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,