NAND/DAVINCI: remove private "target" copy
[openocd.git] / src / flash / nand / driver.c
1 /***************************************************************************
2 * Copyright (C) 2005 by Dominic Rath <Dominic.Rath@gmx.de> *
3 * Copyright (C) 2007,2008 Øyvind Harboe <oyvind.harboe@zylin.com> *
4 * Copyright (C) 2008 by Spencer Oliver <spen@spen-soft.co.uk> *
5 * Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
6 * *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * This program is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with this program; if not, write to the *
19 * Free Software Foundation, Inc., *
20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21 ***************************************************************************/
22
23 #ifdef HAVE_CONFIG_H
24 #include <config.h>
25 #endif
26 #include "core.h"
27 #include "driver.h"
28
29 /* NAND flash controller
30 */
31 extern struct nand_flash_controller nonce_nand_controller;
32 extern struct nand_flash_controller davinci_nand_controller;
33 extern struct nand_flash_controller lpc3180_nand_controller;
34 extern struct nand_flash_controller orion_nand_controller;
35 extern struct nand_flash_controller s3c2410_nand_controller;
36 extern struct nand_flash_controller s3c2412_nand_controller;
37 extern struct nand_flash_controller s3c2440_nand_controller;
38 extern struct nand_flash_controller s3c2443_nand_controller;
39 extern struct nand_flash_controller s3c6400_nand_controller;
40 extern struct nand_flash_controller imx27_nand_flash_controller;
41 extern struct nand_flash_controller imx31_nand_flash_controller;
42 extern struct nand_flash_controller at91sam9_nand_controller;
43 extern struct nand_flash_controller nuc910_nand_controller;
44
45 /* extern struct nand_flash_controller boundary_scan_nand_controller; */
46
47 static struct nand_flash_controller *nand_flash_controllers[] =
48 {
49 &nonce_nand_controller,
50 &davinci_nand_controller,
51 &lpc3180_nand_controller,
52 &orion_nand_controller,
53 &s3c2410_nand_controller,
54 &s3c2412_nand_controller,
55 &s3c2440_nand_controller,
56 &s3c2443_nand_controller,
57 &s3c6400_nand_controller,
58 &imx27_nand_flash_controller,
59 &imx31_nand_flash_controller,
60 &at91sam9_nand_controller,
61 &nuc910_nand_controller,
62 /* &boundary_scan_nand_controller, */
63 NULL
64 };
65
66 struct nand_flash_controller *nand_driver_find_by_name(const char *name)
67 {
68 for (unsigned i = 0; nand_flash_controllers[i]; i++)
69 {
70 struct nand_flash_controller *controller = nand_flash_controllers[i];
71 if (strcmp(name, controller->name) == 0)
72 return controller;
73 }
74 return NULL;
75 }
76 int nand_driver_walk(nand_driver_walker_t f, void *x)
77 {
78 for (unsigned i = 0; nand_flash_controllers[i]; i++)
79 {
80 int retval = (*f)(nand_flash_controllers[i], x);
81 if (ERROR_OK != retval)
82 return retval;
83 }
84 return ERROR_OK;
85 }
86
87

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)