flash: nor: sort the drivers by alphabetic order

Add comments to require the list of drivers to be kept sorted.

Change-Id: I57382605edc6a38d6c1ac18393421b18ae72215b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8946
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2025-06-14 12:36:07 +02:00
parent a9015ba79d
commit a64ae963be
2 changed files with 11 additions and 9 deletions

View File

@@ -237,6 +237,7 @@ struct flash_driver {
*/ */
const struct flash_driver *flash_driver_find_by_name(const char *name); const struct flash_driver *flash_driver_find_by_name(const char *name);
// Keep in alphabetic order this list of drivers
extern const struct flash_driver aduc702x_flash; extern const struct flash_driver aduc702x_flash;
extern const struct flash_driver aducm360_flash; extern const struct flash_driver aducm360_flash;
extern const struct flash_driver ambiqmicro_flash; extern const struct flash_driver ambiqmicro_flash;

View File

@@ -14,6 +14,7 @@
* @todo Make this dynamically extendable with loadable modules. * @todo Make this dynamically extendable with loadable modules.
*/ */
static const struct flash_driver * const flash_drivers[] = { static const struct flash_driver * const flash_drivers[] = {
// Keep in alphabetic order the list of drivers
&aduc702x_flash, &aduc702x_flash,
&aducm360_flash, &aducm360_flash,
&ambiqmicro_flash, &ambiqmicro_flash,
@@ -27,8 +28,8 @@ static const struct flash_driver * const flash_drivers[] = {
&atsamv_flash, &atsamv_flash,
&avr_flash, &avr_flash,
&bluenrgx_flash, &bluenrgx_flash,
&cc3220sf_flash,
&cc26xx_flash, &cc26xx_flash,
&cc3220sf_flash,
&cfi_flash, &cfi_flash,
&dsp5680xx_flash, &dsp5680xx_flash,
&dw_spi_flash, &dw_spi_flash,
@@ -37,9 +38,9 @@ static const struct flash_driver * const flash_drivers[] = {
&eneispif_flash, &eneispif_flash,
&esirisc_flash, &esirisc_flash,
&faux_flash, &faux_flash,
&fespi_flash,
&fm3_flash, &fm3_flash,
&fm4_flash, &fm4_flash,
&fespi_flash,
&jtagspi_flash, &jtagspi_flash,
&kinetis_flash, &kinetis_flash,
&kinetis_ke_flash, &kinetis_ke_flash,
@@ -54,40 +55,40 @@ static const struct flash_driver * const flash_drivers[] = {
&mspm0_flash, &mspm0_flash,
&niietcm4_flash, &niietcm4_flash,
&npcx_flash, &npcx_flash,
&nrf5_flash,
&nrf51_flash, &nrf51_flash,
&nrf5_flash,
&numicro_flash, &numicro_flash,
&ocl_flash, &ocl_flash,
&pic32mx_flash, &pic32mx_flash,
&psoc4_flash, &psoc4_flash,
&psoc5lp_flash,
&psoc5lp_eeprom_flash, &psoc5lp_eeprom_flash,
&psoc5lp_flash,
&psoc5lp_nvl_flash, &psoc5lp_nvl_flash,
&psoc6_flash, &psoc6_flash,
&qn908x_flash, &qn908x_flash,
&renesas_rpchf_flash, &renesas_rpchf_flash,
&rp2xxx_flash, &rp2xxx_flash,
&rsl10_flash,
&sh_qspi_flash, &sh_qspi_flash,
&sim3x_flash, &sim3x_flash,
&stellaris_flash, &stellaris_flash,
&stm32f1x_flash, &stm32f1x_flash,
&stm32f2x_flash, &stm32f2x_flash,
&stm32lx_flash,
&stm32l4x_flash,
&stm32h7x_flash, &stm32h7x_flash,
&stmsmi_flash, &stm32l4x_flash,
&stm32lx_flash,
&stmqspi_flash, &stmqspi_flash,
&stmsmi_flash,
&str7x_flash, &str7x_flash,
&str9x_flash, &str9x_flash,
&str9xpec_flash, &str9xpec_flash,
&swm050_flash, &swm050_flash,
&tms470_flash, &tms470_flash,
&virtual_flash, &virtual_flash,
&w600_flash,
&xcf_flash, &xcf_flash,
&xmc1xxx_flash, &xmc1xxx_flash,
&xmc4xxx_flash, &xmc4xxx_flash,
&w600_flash,
&rsl10_flash,
NULL, NULL,
}; };