OpenOCD
drivers.c
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 /***************************************************************************
4  * Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
5  ***************************************************************************/
6 
7 #ifdef HAVE_CONFIG_H
8 #include "config.h"
9 #endif
10 #include "imp.h"
11 
12 extern const struct flash_driver aduc702x_flash;
13 extern const struct flash_driver aducm360_flash;
14 extern const struct flash_driver ambiqmicro_flash;
15 extern const struct flash_driver at91sam3_flash;
16 extern const struct flash_driver at91sam4_flash;
17 extern const struct flash_driver at91sam4l_flash;
18 extern const struct flash_driver at91sam7_flash;
19 extern const struct flash_driver at91samd_flash;
20 extern const struct flash_driver ath79_flash;
21 extern const struct flash_driver atsame5_flash;
22 extern const struct flash_driver atsamv_flash;
23 extern const struct flash_driver avr_flash;
24 extern const struct flash_driver bluenrgx_flash;
25 extern const struct flash_driver cc3220sf_flash;
26 extern const struct flash_driver cc26xx_flash;
27 extern const struct flash_driver cfi_flash;
28 extern const struct flash_driver dsp5680xx_flash;
29 extern const struct flash_driver efm32_flash;
30 extern const struct flash_driver em357_flash;
31 extern const struct flash_driver esirisc_flash;
32 extern const struct flash_driver faux_flash;
33 extern const struct flash_driver fm3_flash;
34 extern const struct flash_driver fm4_flash;
35 extern const struct flash_driver fespi_flash;
36 extern const struct flash_driver jtagspi_flash;
37 extern const struct flash_driver kinetis_flash;
38 extern const struct flash_driver kinetis_ke_flash;
39 extern const struct flash_driver lpc2000_flash;
40 extern const struct flash_driver lpc288x_flash;
41 extern const struct flash_driver lpc2900_flash;
42 extern const struct flash_driver lpcspifi_flash;
43 extern const struct flash_driver max32xxx_flash;
44 extern const struct flash_driver mdr_flash;
45 extern const struct flash_driver mrvlqspi_flash;
46 extern const struct flash_driver msp432_flash;
47 extern const struct flash_driver niietcm4_flash;
48 extern const struct flash_driver npcx_flash;
49 extern const struct flash_driver nrf5_flash;
50 extern const struct flash_driver nrf51_flash;
51 extern const struct flash_driver numicro_flash;
52 extern const struct flash_driver ocl_flash;
53 extern const struct flash_driver pic32mx_flash;
54 extern const struct flash_driver psoc4_flash;
55 extern const struct flash_driver psoc5lp_flash;
56 extern const struct flash_driver psoc5lp_eeprom_flash;
57 extern const struct flash_driver psoc5lp_nvl_flash;
58 extern const struct flash_driver psoc6_flash;
59 extern const struct flash_driver renesas_rpchf_flash;
60 extern const struct flash_driver rp2040_flash;
61 extern const struct flash_driver sh_qspi_flash;
62 extern const struct flash_driver sim3x_flash;
63 extern const struct flash_driver stellaris_flash;
64 extern const struct flash_driver stm32f1x_flash;
65 extern const struct flash_driver stm32f2x_flash;
66 extern const struct flash_driver stm32lx_flash;
67 extern const struct flash_driver stm32l4x_flash;
68 extern const struct flash_driver stm32h7x_flash;
69 extern const struct flash_driver stmqspi_flash;
70 extern const struct flash_driver stmsmi_flash;
71 extern const struct flash_driver str7x_flash;
72 extern const struct flash_driver str9x_flash;
73 extern const struct flash_driver str9xpec_flash;
74 extern const struct flash_driver swm050_flash;
75 extern const struct flash_driver tms470_flash;
76 extern const struct flash_driver virtual_flash;
77 extern const struct flash_driver w600_flash;
78 extern const struct flash_driver xcf_flash;
79 extern const struct flash_driver xmc1xxx_flash;
80 extern const struct flash_driver xmc4xxx_flash;
81 extern const struct flash_driver rsl10_flash;
82 
87 static const struct flash_driver * const flash_drivers[] = {
96  &ath79_flash,
98  &atsamv_flash,
99  &avr_flash,
102  &cc26xx_flash,
103  &cfi_flash,
105  &efm32_flash,
106  &em357_flash,
107  &esirisc_flash,
108  &faux_flash,
109  &fm3_flash,
110  &fm4_flash,
111  &fespi_flash,
112  &jtagspi_flash,
113  &kinetis_flash,
115  &lpc2000_flash,
116  &lpc288x_flash,
117  &lpc2900_flash,
120  &mdr_flash,
122  &msp432_flash,
124  &npcx_flash,
125  &nrf5_flash,
126  &nrf51_flash,
127  &numicro_flash,
128  &ocl_flash,
129  &pic32mx_flash,
130  &psoc4_flash,
131  &psoc5lp_flash,
134  &psoc6_flash,
136  &rp2040_flash,
137  &sh_qspi_flash,
138  &sim3x_flash,
142  &stm32lx_flash,
145  &stmsmi_flash,
146  &stmqspi_flash,
147  &str7x_flash,
148  &str9x_flash,
150  &swm050_flash,
151  &tms470_flash,
152  &virtual_flash,
153  &xcf_flash,
154  &xmc1xxx_flash,
155  &xmc4xxx_flash,
156  &w600_flash,
157  &rsl10_flash,
158  NULL,
159 };
160 
161 const struct flash_driver *flash_driver_find_by_name(const char *name)
162 {
163  for (unsigned i = 0; flash_drivers[i]; i++) {
164  if (strcmp(name, flash_drivers[i]->name) == 0)
165  return flash_drivers[i];
166  }
167  return NULL;
168 }
const char * name
Definition: armv4_5.c:76
const struct flash_driver at91sam4l_flash
Definition: at91sam4l.c:678
const struct flash_driver xmc1xxx_flash
Definition: xmc1xxx.c:523
const struct flash_driver stm32f2x_flash
Definition: stm32f2x.c:1805
const struct flash_driver at91samd_flash
Definition: at91samd.c:1286
const struct flash_driver ambiqmicro_flash
Definition: ambiqmicro.c:853
const struct flash_driver renesas_rpchf_flash
static const struct flash_driver *const flash_drivers[]
The list of built-in flash drivers.
Definition: drivers.c:87
const struct flash_driver em357_flash
Definition: em357.c:911
const struct flash_driver rsl10_flash
Definition: rsl10.c:830
const struct flash_driver at91sam7_flash
Definition: at91sam7.c:1099
const struct flash_driver str9x_flash
Definition: str9x.c:653
const struct flash_driver sim3x_flash
Definition: sim3x.c:1094
const struct flash_driver pic32mx_flash
Definition: pic32mx.c:952
const struct flash_driver jtagspi_flash
Definition: jtagspi.c:781
const struct flash_driver fespi_flash
Definition: fespi.c:850
const struct flash_driver lpc2900_flash
Definition: lpc2900.c:1572
const struct flash_driver lpc2000_flash
Definition: lpc2000.c:1603
const struct flash_driver nrf5_flash
Definition: nrf5.c:1416
const struct flash_driver atsamv_flash
Definition: atsamv.c:689
const struct flash_driver niietcm4_flash
Definition: niietcm4.c:1718
const struct flash_driver rp2040_flash
Definition: rp2040.c:512
const struct flash_driver psoc6_flash
Definition: psoc6.c:1021
const struct flash_driver bluenrgx_flash
Definition: bluenrg-x.c:465
const struct flash_driver swm050_flash
Definition: swm050.c:186
const struct flash_driver msp432_flash
Definition: msp432.c:1078
const struct flash_driver stmsmi_flash
Definition: stmsmi.c:639
const struct flash_driver str9xpec_flash
Definition: str9xpec.c:1188
const struct flash_driver avr_flash
Definition: avrf.c:460
const struct flash_driver cc3220sf_flash
Definition: cc3220sf.c:481
const struct flash_driver xcf_flash
Definition: xcf.c:875
const struct flash_driver fm3_flash
Definition: fm3.c:974
const struct flash_driver sh_qspi_flash
Definition: sh_qspi.c:899
const struct flash_driver at91sam3_flash
Definition: at91sam3.c:3712
const struct flash_driver numicro_flash
Definition: numicro.c:1841
const struct flash_driver * flash_driver_find_by_name(const char *name)
Find a NOR flash driver by its name.
Definition: drivers.c:161
const struct flash_driver mrvlqspi_flash
Definition: mrvlqspi.c:943
const struct flash_driver virtual_flash
Definition: virtual.c:210
const struct flash_driver efm32_flash
Definition: efm32.c:1223
const struct flash_driver psoc5lp_flash
Definition: psoc5lp.c:1509
const struct flash_driver xmc4xxx_flash
Definition: xmc4xxx.c:1332
const struct flash_driver ath79_flash
Definition: ath79.c:882
const struct flash_driver kinetis_ke_flash
Definition: kinetis_ke.c:1257
const struct flash_driver stellaris_flash
Definition: stellaris.c:1415
const struct flash_driver kinetis_flash
Definition: kinetis.c:3209
const struct flash_driver npcx_flash
Definition: npcx.c:511
const struct flash_driver psoc4_flash
Definition: psoc4.c:925
const struct flash_driver aducm360_flash
Definition: aducm360.c:544
const struct flash_driver lpcspifi_flash
Definition: lpcspifi.c:934
const struct flash_driver dsp5680xx_flash
const struct flash_driver atsame5_flash
Definition: atsame5.c:950
const struct flash_driver stm32l4x_flash
Definition: stm32l4x.c:2557
const struct flash_driver psoc5lp_nvl_flash
Definition: psoc5lp.c:814
const struct flash_driver psoc5lp_eeprom_flash
Definition: psoc5lp.c:997
const struct flash_driver w600_flash
Definition: w600.c:367
const struct flash_driver max32xxx_flash
Definition: max32xxx.c:960
const struct flash_driver cfi_flash
Definition: cfi.c:3038
const struct flash_driver aduc702x_flash
Definition: aduc702x.c:370
const struct flash_driver lpc288x_flash
Definition: lpc288x.c:401
const struct flash_driver str7x_flash
Definition: str7x.c:786
const struct flash_driver faux_flash
Definition: faux.c:106
const struct flash_driver stm32lx_flash
Definition: stm32lx.c:938
const struct flash_driver stm32h7x_flash
Definition: stm32h7x.c:1199
const struct flash_driver fm4_flash
Definition: fm4.c:691
const struct flash_driver at91sam4_flash
Definition: at91sam4.c:3260
const struct flash_driver esirisc_flash
const struct flash_driver cc26xx_flash
Definition: cc26xx.c:537
const struct flash_driver ocl_flash
Definition: ocl.c:306
const struct flash_driver mdr_flash
Definition: mdr.c:597
const struct flash_driver tms470_flash
Definition: tms470.c:1145
const struct flash_driver stmqspi_flash
Definition: stmqspi.c:2450
const struct flash_driver stm32f1x_flash
Definition: stm32f1x.c:1728
const struct flash_driver nrf51_flash
Definition: nrf5.c:1434
Provides the implementation-independent structure that defines all of the callbacks required by OpenO...
Definition: nor/driver.h:39
#define NULL
Definition: usb.h:16