From 2745e42ec192c02ad64b61cab136038f4c8b2f48 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20F=C3=A4rber?= Date: Sun, 17 Apr 2016 17:36:25 +0200 Subject: [PATCH] flash/nor: Reorder drivers alphabetically MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://openocd.zylin.com/3417 Tested-by: jenkins Reviewed-by: Freddie Chopin --- src/flash/nor/Makefile.am | 25 ++++----- src/flash/nor/drivers.c | 112 +++++++++++++++++++------------------- 2 files changed, 68 insertions(+), 69 deletions(-) diff --git a/src/flash/nor/Makefile.am b/src/flash/nor/Makefile.am index 33a517a9..b5fab1f1 100644 --- a/src/flash/nor/Makefile.am +++ b/src/flash/nor/Makefile.am @@ -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 \ diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c index 1f39c146..51a40184 100644 --- a/src/flash/nor/drivers.c +++ b/src/flash/nor/drivers.c @@ -22,100 +22,100 @@ #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, }; -- 2.39.5