build: cleanup src/flash/nor directory
[fw/openocd] / src / flash / nor / drivers.c
index be72b5c30892396ac803e292d6e0192a4fb2c046..06de0c6646d3869bb642808fdcb3eda20e2add3a 100644 (file)
  *   Free Software Foundation, Inc.,                                       *
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <flash/nor/core.h>
+#include "imp.h"
 
 extern struct flash_driver lpc2000_flash;
 extern struct flash_driver lpc288x_flash;
@@ -32,19 +33,27 @@ extern struct flash_driver str9x_flash;
 extern struct flash_driver aduc702x_flash;
 extern struct flash_driver stellaris_flash;
 extern struct flash_driver str9xpec_flash;
-extern struct flash_driver stm32x_flash;
+extern struct flash_driver stm32f1x_flash;
+extern struct flash_driver stm32f2x_flash;
+extern struct flash_driver stm32lx_flash;
 extern struct flash_driver tms470_flash;
 extern struct flash_driver ecosflash_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 dsp5680xx_flash;
+extern struct flash_driver fm3_flash;
+extern struct flash_driver kinetis_flash;
 
 /**
  * The list of built-in flash drivers.
  * @todo Make this dynamically extendable with loadable modules.
  */
-struct flash_driver *flash_drivers[] = {
+static struct flash_driver *flash_drivers[] = {
        &lpc2000_flash,
        &lpc288x_flash,
        &lpc2900_flash,
@@ -56,20 +65,27 @@ struct flash_driver *flash_drivers[] = {
        &aduc702x_flash,
        &stellaris_flash,
        &str9xpec_flash,
-       &stm32x_flash,
+       &stm32f1x_flash,
+       &stm32f2x_flash,
+       &stm32lx_flash,
        &tms470_flash,
        &ecosflash_flash,
        &ocl_flash,
        &pic32mx_flash,
        &avr_flash,
        &faux_flash,
+       &virtual_flash,
+       &stmsmi_flash,
+       &em357_flash,
+       &fm3_flash,
+       &dsp5680xx_flash,
+       &kinetis_flash,
        NULL,
 };
 
 struct flash_driver *flash_driver_find_by_name(const char *name)
 {
-       for (unsigned i = 0; flash_drivers[i]; i++)
-       {
+       for (unsigned i = 0; flash_drivers[i]; i++) {
                if (strcmp(name, flash_drivers[i]->name) == 0)
                        return flash_drivers[i];
        }