Audit and eliminate redundant #include directives in src/flash headers.
[openocd.git] / src / flash / str7x.h
index fe63b5e5e624baa9ce02b2f5cffd0dd5705befa4..5d0b1824a9eec4ab4ae0933de00d40a769f58009 100644 (file)
@@ -2,6 +2,9 @@
  *   Copyright (C) 2005 by Dominic Rath                                    *
  *   Dominic.Rath@gmx.de                                                   *
  *                                                                         *
+ *   Copyright (C) 2008 by Spencer Oliver                                  *
+ *   spen@spen-soft.co.uk                                                  *
+ *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
  *   the Free Software Foundation; either version 2 of the License, or     *
 #define STR7X_H
 
 #include "flash.h"
-#include "target.h"
 
 typedef struct str7x_flash_bank_s
 {
-       int bank1;
-       struct target_s *target;
-       u32 flash_base;
+       u32 *sector_bits;
+       u32 disable_bit;
+       u32 busy_bits;
+       u32 register_base;
+       working_area_t *write_algorithm;
 } str7x_flash_bank_t;
 
 enum str7x_status_codes
@@ -48,15 +52,15 @@ enum str7x_status_codes
 
 /*  Flash registers */
 
-#define FLASH_CR0              0x00100000
-#define FLASH_CR1              0x00100004
-#define FLASH_DR0              0x00100008
-#define FLASH_DR1              0x0010000C
-#define FLASH_AR               0x00100010
-#define FLASH_ER               0x00100014
-#define FLASH_NVWPAR   0x0010DFB0
-#define FLASH_NVAPR0   0x0010DFB8
-#define FLASH_NVAPR1   0x0010DFBC
+#define FLASH_CR0              0x00000000
+#define FLASH_CR1              0x00000004
+#define FLASH_DR0              0x00000008
+#define FLASH_DR1              0x0000000C
+#define FLASH_AR               0x00000010
+#define FLASH_ER               0x00000014
+#define FLASH_NVWPAR   0x0000DFB0
+#define FLASH_NVAPR0   0x0000DFB8
+#define FLASH_NVAPR1   0x0000DFBC
 
 /* FLASH_CR0 register bits */
 
@@ -68,8 +72,9 @@ enum str7x_status_codes
 #define FLASH_SPR              0x01000000
 #define FLASH_BER              0x04000000
 #define FLASH_MER              0x02000000
-#define FLASH_BSYA1            0x00000002
-#define FLASH_BSYA2            0x00000004
+#define FLASH_LOCK             0x00000010
+#define FLASH_BSYA1            0x00000004
+#define FLASH_BSYA0            0x00000002
 
 /* FLASH_CR1 regsiter bits */
 
@@ -99,8 +104,7 @@ enum str7x_status_codes
 typedef struct str7x_mem_layout_s {
        u32 sector_start;
        u32 sector_size;
-       u32 reg_offset;
+       u32 sector_bit;
 } str7x_mem_layout_t;
 
 #endif /* STR7X_H */
-

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)