]> git.sur5r.net Git - openocd/commitdiff
flash/nor: Reorder drivers alphabetically
authorAndreas Färber <afaerber@suse.de>
Sun, 17 Apr 2016 15:36:25 +0000 (17:36 +0200)
committerFreddie Chopin <freddie.chopin@gmail.com>
Thu, 5 May 2016 06:26:38 +0000 (07:26 +0100)
To avoid conflicts between flash drivers being added, consistently use
an alphabetical sort order for the three places new drivers get added:

* Makefile.am NOR_DRIVERS (note: automake disallows a trailing backslash)
* drivers.c struct flash_driver forward declarations
* drivers.c flash_drivers array

Change-Id: Idcd6a8e12821ef10958a6b3ad7bac0dc63cadd08
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3417
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
src/flash/nor/Makefile.am
src/flash/nor/drivers.c

index 33a517a94e871961f0143acf93aceda9abb50ae2..b5fab1f1206984c5a28f82f3d2be2b6827b6ce5b 100644 (file)
@@ -18,18 +18,29 @@ NOR_DRIVERS = \
        atsamv.c \
        avrf.c \
        cfi.c \
+       dsp5680xx_flash.c \
        efm32.c \
        em357.c \
        faux.c \
+       fm3.c \
+       fm4.c \
        jtagspi.c \
+       kinetis.c \
+       kinetis_ke.c \
        lpc2000.c \
        lpc288x.c \
        lpc2900.c \
        lpcspifi.c \
        mdr.c \
+       mrvlqspi.c \
+       niietcm4.c \
        non_cfi.c \
+       nrf51.c \
+       numicro.c \
        ocl.c \
        pic32mx.c \
+       psoc4.c \
+       sim3x.c \
        spi.c \
        stmsmi.c \
        stellaris.c \
@@ -42,19 +53,7 @@ NOR_DRIVERS = \
        str9xpec.c \
        tms470.c \
        virtual.c \
-       fm3.c \
-       fm4.c \
-       dsp5680xx_flash.c \
-       kinetis.c \
-       kinetis_ke.c \
-       numicro.c \
-       nrf51.c \
-       mrvlqspi.c \
-       psoc4.c \
-       sim3x.c \
-       xmc4xxx.c \
-       niietcm4.c
-
+       xmc4xxx.c
 
 noinst_HEADERS = \
        core.h \
index 1f39c14672fb1eee41f6d958b3a7a55d2a4bb414..51a401840ec7d27b8433d466c09132ca8f9fd780 100644 (file)
 #endif
 #include "imp.h"
 
-extern struct flash_driver lpc2000_flash;
-extern struct flash_driver lpc288x_flash;
-extern struct flash_driver lpc2900_flash;
-extern struct flash_driver lpcspifi_flash;
-extern struct flash_driver cfi_flash;
+extern struct flash_driver aduc702x_flash;
+extern struct flash_driver aducm360_flash;
 extern struct flash_driver at91sam3_flash;
 extern struct flash_driver at91sam4_flash;
 extern struct flash_driver at91sam4l_flash;
-extern struct flash_driver at91samd_flash;
 extern struct flash_driver at91sam7_flash;
+extern struct flash_driver at91samd_flash;
 extern struct flash_driver atsamv_flash;
-extern struct flash_driver str7x_flash;
-extern struct flash_driver str9x_flash;
-extern struct flash_driver aduc702x_flash;
-extern struct flash_driver aducm360_flash;
-extern struct flash_driver stellaris_flash;
-extern struct flash_driver str9xpec_flash;
-extern struct flash_driver stm32f1x_flash;
-extern struct flash_driver stm32f2x_flash;
-extern struct flash_driver stm32lx_flash;
-extern struct flash_driver stm32l4x_flash;
-extern struct flash_driver tms470_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;
-extern struct flash_driver virtual_flash;
-extern struct flash_driver stmsmi_flash;
-extern struct flash_driver em357_flash;
+extern struct flash_driver cfi_flash;
 extern struct flash_driver dsp5680xx_flash;
+extern struct flash_driver efm32_flash;
+extern struct flash_driver em357_flash;
+extern struct flash_driver faux_flash;
 extern struct flash_driver fm3_flash;
 extern struct flash_driver fm4_flash;
+extern struct flash_driver jtagspi_flash;
 extern struct flash_driver kinetis_flash;
 extern struct flash_driver kinetis_ke_flash;
-extern struct flash_driver efm32_flash;
+extern struct flash_driver lpc2000_flash;
+extern struct flash_driver lpc288x_flash;
+extern struct flash_driver lpc2900_flash;
+extern struct flash_driver lpcspifi_flash;
 extern struct flash_driver mdr_flash;
-extern struct flash_driver numicro_flash;
-extern struct flash_driver nrf51_flash;
 extern struct flash_driver mrvlqspi_flash;
+extern struct flash_driver niietcm4_flash;
+extern struct flash_driver nrf51_flash;
+extern struct flash_driver numicro_flash;
+extern struct flash_driver ocl_flash;
+extern struct flash_driver pic32mx_flash;
 extern struct flash_driver psoc4_flash;
 extern struct flash_driver sim3x_flash;
-extern struct flash_driver jtagspi_flash;
+extern struct flash_driver stellaris_flash;
+extern struct flash_driver stm32f1x_flash;
+extern struct flash_driver stm32f2x_flash;
+extern struct flash_driver stm32lx_flash;
+extern struct flash_driver stm32l4x_flash;
+extern struct flash_driver stmsmi_flash;
+extern struct flash_driver str7x_flash;
+extern struct flash_driver str9x_flash;
+extern struct flash_driver str9xpec_flash;
+extern struct flash_driver tms470_flash;
+extern struct flash_driver virtual_flash;
 extern struct flash_driver xmc4xxx_flash;
-extern struct flash_driver niietcm4_flash;
 
 /**
  * The list of built-in flash drivers.
  * @todo Make this dynamically extendable with loadable modules.
  */
 static struct flash_driver *flash_drivers[] = {
-       &lpc2000_flash,
-       &lpc288x_flash,
-       &lpc2900_flash,
-       &lpcspifi_flash,
-       &cfi_flash,
-       &at91sam7_flash,
+       &aduc702x_flash,
+       &aducm360_flash,
        &at91sam3_flash,
        &at91sam4_flash,
        &at91sam4l_flash,
+       &at91sam7_flash,
        &at91samd_flash,
        &atsamv_flash,
-       &str7x_flash,
-       &str9x_flash,
-       &aduc702x_flash,
-       &aducm360_flash,
-       &stellaris_flash,
-       &str9xpec_flash,
-       &stm32f1x_flash,
-       &stm32f2x_flash,
-       &stm32lx_flash,
-       &stm32l4x_flash,
-       &tms470_flash,
-       &ocl_flash,
-       &pic32mx_flash,
        &avr_flash,
-       &faux_flash,
-       &virtual_flash,
-       &stmsmi_flash,
+       &cfi_flash,
+       &dsp5680xx_flash,
+       &efm32_flash,
        &em357_flash,
+       &faux_flash,
        &fm3_flash,
        &fm4_flash,
-       &dsp5680xx_flash,
+       &jtagspi_flash,
        &kinetis_flash,
        &kinetis_ke_flash,
-       &efm32_flash,
+       &lpc2000_flash,
+       &lpc288x_flash,
+       &lpc2900_flash,
+       &lpcspifi_flash,
        &mdr_flash,
-       &numicro_flash,
-       &nrf51_flash,
        &mrvlqspi_flash,
+       &niietcm4_flash,
+       &nrf51_flash,
+       &numicro_flash,
+       &ocl_flash,
+       &pic32mx_flash,
        &psoc4_flash,
        &sim3x_flash,
-       &jtagspi_flash,
+       &stellaris_flash,
+       &stm32f1x_flash,
+       &stm32f2x_flash,
+       &stm32lx_flash,
+       &stm32l4x_flash,
+       &stmsmi_flash,
+       &str7x_flash,
+       &str9x_flash,
+       &str9xpec_flash,
+       &tms470_flash,
+       &virtual_flash,
        &xmc4xxx_flash,
-       &niietcm4_flash,
        NULL,
 };