]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
flash: nor: sort the drivers by alphabetic order
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 14 Jun 2025 10:36:07 +0000 (12:36 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 29 Jun 2025 07:31:22 +0000 (07:31 +0000)
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
src/flash/nor/driver.h
src/flash/nor/drivers.c

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