eCos flash driver.
[openocd.git] / src / flash / str9xpec.h
1 /***************************************************************************
2 * Copyright (C) 2005 by Dominic Rath *
3 * Dominic.Rath@gmx.de *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20 #ifndef STR9XPEC_H
21 #define STR9XPEC_H
22
23 #include "flash.h"
24 #include "target.h"
25 #include "jtag.h"
26
27 typedef struct str9xpec_flash_controller_s
28 {
29 u32 *sector_bits;
30 int chain_pos;
31 int isc_enable;
32 jtag_device_t* devarm;
33 u8 options[8];
34 } str9xpec_flash_controller_t;
35
36 enum str9xpec_status_codes
37 {
38 STR9XPEC_INVALID_COMMAND = 1,
39 STR9XPEC_ISC_SUCCESS = 2,
40 STR9XPEC_ISC_DISABLED = 3,
41 STR9XPEC_ISC_INTFAIL = 32,
42 };
43
44 /* ISC commands */
45
46 #define ISC_IDCODE 0xFE
47 #define ISC_MFG_READ 0x4C
48 #define ISC_CONFIGURATION 0x07
49 #define ISC_ENABLE 0x0C
50 #define ISC_DISABLE 0x0F
51 #define ISC_NOOP 0x10
52 #define ISC_ADDRESS_SHIFT 0x11
53 #define ISC_CLR_STATUS 0x13
54 #define ISC_PROGRAM 0x20
55 #define ISC_PROGRAM_SECURITY 0x22
56 #define ISC_PROGRAM_UC 0x23
57 #define ISC_ERASE 0x30
58 #define ISC_READ 0x50
59 #define ISC_BLANK_CHECK 0x60
60
61 /* ISC_DEFAULT bit definitions */
62
63 #define ISC_STATUS_SECURITY 0x40
64 #define ISC_STATUS_INT_ERROR 0x30
65 #define ISC_STATUS_MODE 0x08
66 #define ISC_STATUS_BUSY 0x04
67 #define ISC_STATUS_ERROR 0x03
68
69 typedef struct mem_layout_str9pec {
70 u32 sector_start;
71 u32 sector_size;
72 u32 sector_bit;
73 } str9xpec_mem_layout_t;
74
75 /* Option bytes definitions */
76
77 #define STR9XPEC_OPT_CSMAPBIT 48
78 #define STR9XPEC_OPT_LVDTHRESBIT 49
79 #define STR9XPEC_OPT_LVDSELBIT 50
80 #define STR9XPEC_OPT_LVDWARNBIT 51
81 #define STR9XPEC_OPT_OTPBIT 63
82
83 #endif /* STR9XPEC_H */
84

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)