fm4: Add support for MB9BFx64/x65 57/3157/4
authorAndreas Färber <afaerber@suse.de>
Sun, 6 Dec 2015 16:51:49 +0000 (17:51 +0100)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Mon, 29 Feb 2016 20:15:41 +0000 (20:15 +0000)
These appear to be just additional flash size configurations.
Entirely based on manual, untested.

Change-Id: I4460dc1a588335df8fc0a385d24513a4e35b6951
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3157
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
doc/openocd.texi
src/flash/nor/fm4.c

index e131f1ed6071e4ad71193fc6157c3f073f2870c1..a5f0a83cdfba01a4f85e9b1e55e0c40cf907afe7 100644 (file)
@@ -5245,7 +5245,7 @@ All members of the FM4 microcontroller family from Spansion (formerly Fujitsu)
 include internal flash and use ARM Cortex-M4 cores.
 The @var{fm4} driver uses a @var{family} parameter to select the
 correct bank config, it can currently be one of the following:
-@code{MB9BFx66}, @code{MB9BFx67}, @code{MB9BFx68},
+@code{MB9BFx64}, @code{MB9BFx65}, @code{MB9BFx66}, @code{MB9BFx67}, @code{MB9BFx68},
 @code{S6E2Cx8}, @code{S6E2Cx9} or @code{S6E2CxA},
 with @code{x} treated as wildcard and otherwise case (and any trailing
 characters) ignored.
index 917ff0186b809ba59a5486131911ebbccba68e48..0f8de8caeb128bc965b098d26420c832621988c8 100644 (file)
@@ -5,6 +5,7 @@
  *
  * Based on S6E2CC_MN709-00007 for S6E2CC/C5/C4/C3/C2/C1 series
  * Based on MB9B560R_MN709-00005 for MB9BFx66/x67/x68 series
+ * Based on MB9B560L_MN709-00006 for MB9BFx64/x65/x66 series
  */
 
 #ifdef HAVE_CONFIG_H
@@ -26,6 +27,8 @@
 #define WDG_LCK (WDG_BASE + 0xC00)
 
 enum fm4_variant {
+       mb9bfx64,
+       mb9bfx65,
        mb9bfx66,
        mb9bfx67,
        mb9bfx68,
@@ -342,6 +345,12 @@ static int mb9bf_probe(struct flash_bank *bank)
        int i;
 
        switch (fm4_bank->variant) {
+       case mb9bfx64:
+               bank->num_sectors = 8;
+               break;
+       case mb9bfx65:
+               bank->num_sectors = 10;
+               break;
        case mb9bfx66:
                bank->num_sectors = 12;
                break;
@@ -463,6 +472,8 @@ static int fm4_probe(struct flash_bank *bank)
        }
 
        switch (fm4_bank->variant) {
+       case mb9bfx64:
+       case mb9bfx65:
        case mb9bfx66:
        case mb9bfx67:
        case mb9bfx68:
@@ -510,6 +521,12 @@ static int fm4_get_info_command(struct flash_bank *bank, char *buf, int buf_size
        }
 
        switch (fm4_bank->variant) {
+       case mb9bfx64:
+               name = "MB9BFx64";
+               break;
+       case mb9bfx65:
+               name = "MB9BFx65";
+               break;
        case mb9bfx66:
                name = "MB9BFx66";
                break;
@@ -568,7 +585,11 @@ static int mb9bf_bank_setup(struct flash_bank *bank, const char *variant)
 {
        struct fm4_flash_bank *fm4_bank = bank->driver_priv;
 
-       if (fm4_name_match(variant, "MB9BFx66")) {
+       if (fm4_name_match(variant, "MB9BFx64")) {
+               fm4_bank->variant = mb9bfx64;
+       } else if (fm4_name_match(variant, "MB9BFx65")) {
+               fm4_bank->variant = mb9bfx65;
+       } else if (fm4_name_match(variant, "MB9BFx66")) {
                fm4_bank->variant = mb9bfx66;
        } else if (fm4_name_match(variant, "MB9BFx67")) {
                fm4_bank->variant = mb9bfx67;

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)