Audit and eliminate redundant #include directives in src/flash headers.
[openocd.git] / src / flash / str9x.h
index 0cd1f196265a119065f6af3e6b6235d12cd514db..b5e569d0ede3f5a15cec3049992da692bcd72a3a 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 STR9X_H
 
 #include "flash.h"
-#include "target.h"
 
 typedef struct str9x_flash_bank_s
 {
-       struct target_s *target;
        u32 *sector_bits;
+       int variant;
+       int bank1;
        working_area_t *write_algorithm;
 } str9x_flash_bank_t;
 
@@ -46,26 +49,7 @@ enum str9x_status_codes
        STR9X_BUSY = 11
 };
 
-/* FMI sectors */
-
-#define FMI_BANK_0     (0x5400000C << 2)                       /* FMI Bank 0 */
-#define FMI_BANK_1     (0x54000010 << 2)                       /* FMI Bank 1 */
-
-#define FMI_B0S0       (0x00000000 + FMI_BANK_0)       /* Bank 0 sector 0 */
-#define FMI_B0S1       (0x00010000 + FMI_BANK_0)       /* Bank 0 sector 1 */
-#define FMI_B0S2       (0x00020000 + FMI_BANK_0)       /* Bank 0 sector 2 */
-#define FMI_B0S3       (0x00030000 + FMI_BANK_0)       /* Bank 0 sector 3 */
-#define FMI_B0S4       (0x00040000 + FMI_BANK_0)       /* Bank 0 sector 4 */
-#define FMI_B0S5       (0x00050000 + FMI_BANK_0)       /* Bank 0 sector 5 */
-#define FMI_B0S6       (0x00060000 + FMI_BANK_0)       /* Bank 0 sector 6 */
-#define FMI_B0S7       (0x00070000 + FMI_BANK_0)       /* Bank 0 sector 7 */
-
-#define FMI_B1S0       (0x00000000 + FMI_BANK_1)       /* Bank 1 sector 0 */
-#define FMI_B1S1       (0x00002000 + FMI_BANK_1)       /* Bank 1 sector 1 */
-#define FMI_B1S2       (0x00004000 + FMI_BANK_1)       /* Bank 1 sector 2 */
-#define FMI_B1S3       (0x00006000 + FMI_BANK_1)       /* Bank 1 sector 3 */
-
-/*  Flash registers */
+/* Flash registers */
 
 #define FLASH_BBSR             0x54000000              /* Boot Bank Size Register                */
 #define FLASH_NBBSR            0x54000004              /* Non-Boot Bank Size Register            */
@@ -75,11 +59,4 @@ enum str9x_status_codes
 #define FLASH_SR               0x5400001C              /* Status Register                        */
 #define FLASH_BCE5ADDR 0x54000020              /* BC Fifth Entry Target Address Register */
 
-typedef struct str9x_mem_layout_s {
-       u32 sector_start;
-       u32 sector_size;
-       u32 sector_bit;
-} str9x_mem_layout_t;
-
 #endif /* STR9X_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)