Fix goofy struct indents. Function names *are* their addresses.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
}
struct flash_driver aduc702x_flash = {
- .name = "aduc702x",
- .flash_bank_command = &aduc702x_flash_bank_command,
- .erase = &aduc702x_erase,
- .protect = &aduc702x_protect,
- .write = &aduc702x_write,
- .probe = &aduc702x_probe,
- .auto_probe = &aduc702x_probe,
- .erase_check = &default_flash_blank_check,
- .protect_check = &aduc702x_protect_check,
- .info = &aduc702x_info
- };
+ .name = "aduc702x",
+ .flash_bank_command = aduc702x_flash_bank_command,
+ .erase = aduc702x_erase,
+ .protect = aduc702x_protect,
+ .write = aduc702x_write,
+ .probe = aduc702x_probe,
+ .auto_probe = aduc702x_probe,
+ .erase_check = default_flash_blank_check,
+ .protect_check = aduc702x_protect_check,
+ .info = aduc702x_info
+};
};
struct flash_driver at91sam3_flash = {
- .name = "at91sam3",
- .commands = at91sam3_command_handlers,
- .flash_bank_command = &sam3_flash_bank_command,
- .erase = &sam3_erase,
- .protect = &sam3_protect,
- .write = &sam3_write,
- .probe = &sam3_probe,
- .auto_probe = &sam3_auto_probe,
- .erase_check = &sam3_erase_check,
- .protect_check = &sam3_protect_check,
- .info = &sam3_info,
- };
+ .name = "at91sam3",
+ .commands = at91sam3_command_handlers,
+ .flash_bank_command = sam3_flash_bank_command,
+ .erase = sam3_erase,
+ .protect = sam3_protect,
+ .write = sam3_write,
+ .probe = sam3_probe,
+ .auto_probe = sam3_auto_probe,
+ .erase_check = sam3_erase_check,
+ .protect_check = sam3_protect_check,
+ .info = sam3_info,
+};
static const struct command_registration avrf_exec_command_handlers[] = {
{
.name = "mass_erase",
- .handler = &avrf_handle_mass_erase_command,
+ .handler = avrf_handle_mass_erase_command,
.mode = COMMAND_EXEC,
.help = "erase entire device",
},
};
struct flash_driver avr_flash = {
- .name = "avr",
- .commands = avrf_command_handlers,
- .flash_bank_command = &avrf_flash_bank_command,
- .erase = &avrf_erase,
- .protect = &avrf_protect,
- .write = &avrf_write,
- .probe = &avrf_probe,
- .auto_probe = &avrf_auto_probe,
- .erase_check = &default_flash_mem_blank_check,
- .protect_check = &avrf_protect_check,
- .info = &avrf_info,
- };
+ .name = "avr",
+ .commands = avrf_command_handlers,
+ .flash_bank_command = avrf_flash_bank_command,
+ .erase = avrf_erase,
+ .protect = avrf_protect,
+ .write = avrf_write,
+ .probe = avrf_probe,
+ .auto_probe = avrf_auto_probe,
+ .erase_check = default_flash_mem_blank_check,
+ .protect_check = avrf_protect_check,
+ .info = avrf_info,
+};
}
struct flash_driver cfi_flash = {
- .name = "cfi",
- .flash_bank_command = &cfi_flash_bank_command,
- .erase = &cfi_erase,
- .protect = &cfi_protect,
- .write = &cfi_write,
- .probe = &cfi_probe,
- .auto_probe = &cfi_auto_probe,
- .erase_check = &default_flash_blank_check,
- .protect_check = &cfi_protect_check,
- .info = &cfi_info,
- };
+ .name = "cfi",
+ .flash_bank_command = cfi_flash_bank_command,
+ .erase = cfi_erase,
+ .protect = cfi_protect,
+ .write = cfi_write,
+ .probe = cfi_probe,
+ .auto_probe = cfi_auto_probe,
+ .erase_check = default_flash_blank_check,
+ .protect_check = cfi_protect_check,
+ .info = cfi_info,
+};
#endif
struct flash_driver ecosflash_flash = {
- .name = "ecosflash",
- .flash_bank_command = &ecosflash_flash_bank_command,
- .erase = &ecosflash_erase,
- .protect = &ecosflash_protect,
- .write = &ecosflash_write,
- .probe = &ecosflash_probe,
- .auto_probe = &ecosflash_probe,
- .erase_check = &default_flash_blank_check,
- .protect_check = &ecosflash_protect_check,
- .info = &ecosflash_info
- };
+ .name = "ecosflash",
+ .flash_bank_command = ecosflash_flash_bank_command,
+ .erase = ecosflash_erase,
+ .protect = ecosflash_protect,
+ .write = ecosflash_write,
+ .probe = ecosflash_probe,
+ .auto_probe = ecosflash_probe,
+ .erase_check = default_flash_blank_check,
+ .protect_check = ecosflash_protect_check,
+ .info = ecosflash_info
+};
};
struct flash_driver faux_flash = {
- .name = "faux",
- .commands = faux_command_handlers,
- .flash_bank_command = &faux_flash_bank_command,
- .erase = &faux_erase,
- .protect = &faux_protect,
- .write = &faux_write,
- .probe = &faux_probe,
- .auto_probe = &faux_probe,
- .erase_check = &default_flash_blank_check,
- .protect_check = &faux_protect_check,
- .info = &faux_info
- };
+ .name = "faux",
+ .commands = faux_command_handlers,
+ .flash_bank_command = faux_flash_bank_command,
+ .erase = faux_erase,
+ .protect = faux_protect,
+ .write = faux_write,
+ .probe = faux_probe,
+ .auto_probe = faux_probe,
+ .erase_check = default_flash_blank_check,
+ .protect_check = faux_protect_check,
+ .info = faux_info
+};
static const struct command_registration lpc2000_exec_command_handlers[] = {
{
.name = "part_id",
- .handler = &lpc2000_handle_part_id_command,
+ .handler = lpc2000_handle_part_id_command,
.mode = COMMAND_EXEC,
.help = "print part id of lpc2000 flash bank <num>",
},
};
struct flash_driver lpc2000_flash = {
- .name = "lpc2000",
- .commands = lpc2000_command_handlers,
- .flash_bank_command = &lpc2000_flash_bank_command,
- .erase = &lpc2000_erase,
- .protect = &lpc2000_protect,
- .write = &lpc2000_write,
- .probe = &lpc2000_probe,
- .auto_probe = &lpc2000_probe,
- .erase_check = &lpc2000_erase_check,
- .protect_check = &lpc2000_protect_check,
- .info = &lpc2000_info,
- };
-
-
+ .name = "lpc2000",
+ .commands = lpc2000_command_handlers,
+ .flash_bank_command = lpc2000_flash_bank_command,
+ .erase = lpc2000_erase,
+ .protect = lpc2000_protect,
+ .write = lpc2000_write,
+ .probe = lpc2000_probe,
+ .auto_probe = lpc2000_probe,
+ .erase_check = lpc2000_erase_check,
+ .protect_check = lpc2000_protect_check,
+ .info = lpc2000_info,
+};
}
struct flash_driver lpc288x_flash = {
- .name = "lpc288x",
- .flash_bank_command = &lpc288x_flash_bank_command,
- .erase = &lpc288x_erase,
- .protect = &lpc288x_protect,
- .write = &lpc288x_write,
- .probe = &lpc288x_probe,
- .auto_probe = &lpc288x_probe,
- .erase_check = &lpc288x_erase_check,
- .protect_check = &lpc288x_protect_check,
- .info = &lpc288x_info,
- };
+ .name = "lpc288x",
+ .flash_bank_command = lpc288x_flash_bank_command,
+ .erase = lpc288x_erase,
+ .protect = lpc288x_protect,
+ .write = lpc288x_write,
+ .probe = lpc288x_probe,
+ .auto_probe = lpc288x_probe,
+ .erase_check = lpc288x_erase_check,
+ .protect_check = lpc288x_protect_check,
+ .info = lpc288x_info,
+};
static const struct command_registration lpc2900_exec_command_handlers[] = {
{
.name = "signature",
- .handler = &lpc2900_handle_signature_command,
+ .handler = lpc2900_handle_signature_command,
.mode = COMMAND_EXEC,
.usage = "bank_id",
.help = "Calculate and display signature of flash bank.",
},
{
.name = "read_custom",
- .handler = &lpc2900_handle_read_custom_command,
+ .handler = lpc2900_handle_read_custom_command,
.mode = COMMAND_EXEC,
.usage = "bank_id filename",
.help = "Copies 912 bytes of customer information "
},
{
.name = "password",
- .handler = &lpc2900_handle_password_command,
+ .handler = lpc2900_handle_password_command,
.mode = COMMAND_EXEC,
.usage = "bank_id password",
.help = "Enter fixed password to enable 'dangerous' options.",
},
{
.name = "write_custom",
- .handler = &lpc2900_handle_write_custom_command,
+ .handler = lpc2900_handle_write_custom_command,
.mode = COMMAND_EXEC,
.usage = "bank_id filename ('bin'|'ihex'|'elf'|'s19')",
.help = "Copies 912 bytes of customer info from file "
},
{
.name = "secure_sector",
- .handler = &lpc2900_handle_secure_sector_command,
+ .handler = lpc2900_handle_secure_sector_command,
.mode = COMMAND_EXEC,
.usage = "bank_id first_sector last_sector",
.help = "Activate sector security for a range of sectors. "
},
{
.name = "secure_jtag",
- .handler = &lpc2900_handle_secure_jtag_command,
+ .handler = lpc2900_handle_secure_jtag_command,
.mode = COMMAND_EXEC,
.usage = "bank_id",
.help = "Disable the JTAG port. "
}
struct flash_driver ocl_flash = {
- .name = "ocl",
- .flash_bank_command = &ocl_flash_bank_command,
- .erase = &ocl_erase,
- .protect = &ocl_protect,
- .write = &ocl_write,
- .probe = &ocl_probe,
- .erase_check = &ocl_erase_check,
- .protect_check = &ocl_protect_check,
- .info = &ocl_info,
- .auto_probe = &ocl_auto_probe,
- };
+ .name = "ocl",
+ .flash_bank_command = ocl_flash_bank_command,
+ .erase = ocl_erase,
+ .protect = ocl_protect,
+ .write = ocl_write,
+ .probe = ocl_probe,
+ .erase_check = ocl_erase_check,
+ .protect_check = ocl_protect_check,
+ .info = ocl_info,
+ .auto_probe = ocl_auto_probe,
+};
static const struct command_registration pic32mx_exec_command_handlers[] = {
{
.name = "chip_erase",
- .handler = &pic32mx_handle_chip_erase_command,
+ .handler = pic32mx_handle_chip_erase_command,
.mode = COMMAND_EXEC,
.help = "erase device",
},
{
.name = "pgm_word",
- .handler = &pic32mx_handle_pgm_word_command,
+ .handler = pic32mx_handle_pgm_word_command,
.mode = COMMAND_EXEC,
.help = "program a word",
},
};
struct flash_driver pic32mx_flash = {
- .name = "pic32mx",
- .commands = pic32mx_command_handlers,
- .flash_bank_command = &pic32mx_flash_bank_command,
- .erase = &pic32mx_erase,
- .protect = &pic32mx_protect,
- .write = &pic32mx_write,
- .probe = &pic32mx_probe,
- .auto_probe = &pic32mx_auto_probe,
- .erase_check = &default_flash_mem_blank_check,
- .protect_check = &pic32mx_protect_check,
- .info = &pic32mx_info,
- };
+ .name = "pic32mx",
+ .commands = pic32mx_command_handlers,
+ .flash_bank_command = pic32mx_flash_bank_command,
+ .erase = pic32mx_erase,
+ .protect = pic32mx_protect,
+ .write = pic32mx_write,
+ .probe = pic32mx_probe,
+ .auto_probe = pic32mx_auto_probe,
+ .erase_check = default_flash_mem_blank_check,
+ .protect_check = pic32mx_protect_check,
+ .info = pic32mx_info,
+};
static const struct command_registration stellaris_exec_command_handlers[] = {
{
.name = "mass_erase",
- .handler = &stellaris_handle_mass_erase_command,
+ .handler = stellaris_handle_mass_erase_command,
.mode = COMMAND_EXEC,
.help = "erase entire device",
},
static const struct command_registration stm32x_exec_command_handlers[] = {
{
.name = "lock",
- .handler = &stm32x_handle_lock_command,
+ .handler = stm32x_handle_lock_command,
.mode = COMMAND_EXEC,
.usage = "bank_id",
.help = "Lock entire flash device.",
},
{
.name = "unlock",
- .handler = &stm32x_handle_unlock_command,
+ .handler = stm32x_handle_unlock_command,
.mode = COMMAND_EXEC,
.usage = "bank_id",
.help = "Unlock entire protected flash device.",
},
{
.name = "mass_erase",
- .handler = &stm32x_handle_mass_erase_command,
+ .handler = stm32x_handle_mass_erase_command,
.mode = COMMAND_EXEC,
.usage = "bank_id",
.help = "Erase entire flash device.",
},
{
.name = "options_read",
- .handler = &stm32x_handle_options_read_command,
+ .handler = stm32x_handle_options_read_command,
.mode = COMMAND_EXEC,
.usage = "bank_id",
.help = "Read and display device option byte.",
},
{
.name = "options_write",
- .handler = &stm32x_handle_options_write_command,
+ .handler = stm32x_handle_options_write_command,
.mode = COMMAND_EXEC,
.usage = "bank_id ('SWWDG'|'HWWDG') "
"('RSTSTNDBY'|'NORSTSTNDBY') "
};
struct flash_driver stm32x_flash = {
- .name = "stm32x",
- .commands = stm32x_command_handlers,
- .flash_bank_command = &stm32x_flash_bank_command,
- .erase = &stm32x_erase,
- .protect = &stm32x_protect,
- .write = &stm32x_write,
- .probe = &stm32x_probe,
- .auto_probe = &stm32x_auto_probe,
- .erase_check = &default_flash_mem_blank_check,
- .protect_check = &stm32x_protect_check,
- .info = &stm32x_info,
- };
+ .name = "stm32x",
+ .commands = stm32x_command_handlers,
+ .flash_bank_command = stm32x_flash_bank_command,
+ .erase = stm32x_erase,
+ .protect = stm32x_protect,
+ .write = stm32x_write,
+ .probe = stm32x_probe,
+ .auto_probe = stm32x_auto_probe,
+ .erase_check = default_flash_mem_blank_check,
+ .protect_check = stm32x_protect_check,
+ .info = stm32x_info,
+};
static const struct command_registration str7x_exec_command_handlers[] = {
{
.name = "disable_jtag",
- .handler = &str7x_handle_disable_jtag_command,
+ .handler = str7x_handle_disable_jtag_command,
.mode = COMMAND_EXEC,
.help = "disable jtag access",
},
};
struct flash_driver str7x_flash = {
- .name = "str7x",
- .commands = str7x_command_handlers,
- .flash_bank_command = &str7x_flash_bank_command,
- .erase = &str7x_erase,
- .protect = &str7x_protect,
- .write = &str7x_write,
- .probe = &str7x_probe,
- .auto_probe = &str7x_probe,
- .erase_check = &default_flash_blank_check,
- .protect_check = &str7x_protect_check,
- .info = &str7x_info,
- };
+ .name = "str7x",
+ .commands = str7x_command_handlers,
+ .flash_bank_command = str7x_flash_bank_command,
+ .erase = str7x_erase,
+ .protect = str7x_protect,
+ .write = str7x_write,
+ .probe = str7x_probe,
+ .auto_probe = str7x_probe,
+ .erase_check = default_flash_blank_check,
+ .protect_check = str7x_protect_check,
+ .info = str7x_info,
+};
static const struct command_registration str9x_config_command_handlers[] = {
{
.name = "flash_config",
- .handler = &str9x_handle_flash_config_command,
+ .handler = str9x_handle_flash_config_command,
.mode = COMMAND_EXEC,
.help = "Configure str9x flash controller, prior to "
"programming the flash.",
};
struct flash_driver str9x_flash = {
- .name = "str9x",
- .commands = str9x_command_handlers,
- .flash_bank_command = &str9x_flash_bank_command,
- .erase = &str9x_erase,
- .protect = &str9x_protect,
- .write = &str9x_write,
- .probe = &str9x_probe,
- .auto_probe = &str9x_probe,
- .erase_check = &default_flash_blank_check,
- .protect_check = &str9x_protect_check,
- .info = &str9x_info,
- };
+ .name = "str9x",
+ .commands = str9x_command_handlers,
+ .flash_bank_command = str9x_flash_bank_command,
+ .erase = str9x_erase,
+ .protect = str9x_protect,
+ .write = str9x_write,
+ .probe = str9x_probe,
+ .auto_probe = str9x_probe,
+ .erase_check = default_flash_blank_check,
+ .protect_check = str9x_protect_check,
+ .info = str9x_info,
+};
};
struct flash_driver str9xpec_flash = {
- .name = "str9xpec",
- .commands = str9xpec_command_handlers,
- .flash_bank_command = &str9xpec_flash_bank_command,
- .erase = &str9xpec_erase,
- .protect = &str9xpec_protect,
- .write = &str9xpec_write,
- .probe = &str9xpec_probe,
- .auto_probe = &str9xpec_probe,
- .erase_check = &str9xpec_erase_check,
- .protect_check = &str9xpec_protect_check,
- .info = &str9xpec_info,
- };
+ .name = "str9xpec",
+ .commands = str9xpec_command_handlers,
+ .flash_bank_command = str9xpec_flash_bank_command,
+ .erase = str9xpec_erase,
+ .protect = str9xpec_protect,
+ .write = str9xpec_write,
+ .probe = str9xpec_probe,
+ .auto_probe = str9xpec_probe,
+ .erase_check = str9xpec_erase_check,
+ .protect_check = str9xpec_protect_check,
+ .info = str9xpec_info,
+};
static const struct command_registration flash_config_command_handlers[] = {
{
.name = "bank",
- .handler = &handle_flash_bank_command,
+ .handler = handle_flash_bank_command,
.mode = COMMAND_CONFIG,
.usage = "bank_id driver_name base_address size_bytes "
"chip_width_bytes bus_width_bytes target "
{
.name = "init",
.mode = COMMAND_CONFIG,
- .handler = &handle_flash_init_command,
+ .handler = handle_flash_init_command,
.help = "Initialize flash devices.",
},
{
.name = "banks",
.mode = COMMAND_ANY,
- .handler = &handle_flash_banks_command,
+ .handler = handle_flash_banks_command,
.help = "Display table with information about flash banks.",
},
{
.name = "list",
.mode = COMMAND_ANY,
- .jim_handler = &jim_flash_list,
+ .jim_handler = jim_flash_list,
.help = "Returns a list of details about the flash banks.",
},
COMMAND_REGISTRATION_DONE
static const struct command_registration tms470_any_command_handlers[] = {
{
.name = "flash_keyset",
- .handler = &tms470_handle_flash_keyset_command,
+ .handler = tms470_handle_flash_keyset_command,
.mode = COMMAND_ANY,
.help = "tms470 flash_keyset <key0> <key1> <key2> <key3>",
},
{
.name = "osc_megahertz",
- .handler = &tms470_handle_osc_megahertz_command,
+ .handler = tms470_handle_osc_megahertz_command,
.mode = COMMAND_ANY,
.help = "tms470 osc_megahertz <MHz>",
},
{
.name = "plldis",
- .handler = &tms470_handle_plldis_command,
+ .handler = tms470_handle_plldis_command,
.mode = COMMAND_ANY,
.help = "tms470 plldis <0/1>",
},
}
struct flash_driver tms470_flash = {
- .name = "tms470",
- .commands = tms470_command_handlers,
- .flash_bank_command = &tms470_flash_bank_command,
- .erase = &tms470_erase,
- .protect = &tms470_protect,
- .write = &tms470_write,
- .probe = &tms470_probe,
- .auto_probe = &tms470_auto_probe,
- .erase_check = &tms470_erase_check,
- .protect_check = &tms470_protect_check,
- .info = &tms470_info,
- };
+ .name = "tms470",
+ .commands = tms470_command_handlers,
+ .flash_bank_command = tms470_flash_bank_command,
+ .erase = tms470_erase,
+ .protect = tms470_protect,
+ .write = tms470_write,
+ .probe = tms470_probe,
+ .auto_probe = tms470_auto_probe,
+ .erase_check = tms470_erase_check,
+ .protect_check = tms470_protect_check,
+ .info = tms470_info,
+};