fm4: Add support for MB9BFx64/x65

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>
This commit is contained in:
Andreas Färber 2015-12-06 17:51:49 +01:00 committed by Andreas Fritiofson
parent fed7131049
commit f2b3a8b0e8
2 changed files with 23 additions and 2 deletions

View 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. include internal flash and use ARM Cortex-M4 cores.
The @var{fm4} driver uses a @var{family} parameter to select the The @var{fm4} driver uses a @var{family} parameter to select the
correct bank config, it can currently be one of the following: 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}, @code{S6E2Cx8}, @code{S6E2Cx9} or @code{S6E2CxA},
with @code{x} treated as wildcard and otherwise case (and any trailing with @code{x} treated as wildcard and otherwise case (and any trailing
characters) ignored. characters) ignored.

View File

@ -5,6 +5,7 @@
* *
* Based on S6E2CC_MN709-00007 for S6E2CC/C5/C4/C3/C2/C1 series * 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 MB9B560R_MN709-00005 for MB9BFx66/x67/x68 series
* Based on MB9B560L_MN709-00006 for MB9BFx64/x65/x66 series
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
@ -26,6 +27,8 @@
#define WDG_LCK (WDG_BASE + 0xC00) #define WDG_LCK (WDG_BASE + 0xC00)
enum fm4_variant { enum fm4_variant {
mb9bfx64,
mb9bfx65,
mb9bfx66, mb9bfx66,
mb9bfx67, mb9bfx67,
mb9bfx68, mb9bfx68,
@ -342,6 +345,12 @@ static int mb9bf_probe(struct flash_bank *bank)
int i; int i;
switch (fm4_bank->variant) { switch (fm4_bank->variant) {
case mb9bfx64:
bank->num_sectors = 8;
break;
case mb9bfx65:
bank->num_sectors = 10;
break;
case mb9bfx66: case mb9bfx66:
bank->num_sectors = 12; bank->num_sectors = 12;
break; break;
@ -463,6 +472,8 @@ static int fm4_probe(struct flash_bank *bank)
} }
switch (fm4_bank->variant) { switch (fm4_bank->variant) {
case mb9bfx64:
case mb9bfx65:
case mb9bfx66: case mb9bfx66:
case mb9bfx67: case mb9bfx67:
case mb9bfx68: 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) { switch (fm4_bank->variant) {
case mb9bfx64:
name = "MB9BFx64";
break;
case mb9bfx65:
name = "MB9BFx65";
break;
case mb9bfx66: case mb9bfx66:
name = "MB9BFx66"; name = "MB9BFx66";
break; 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; 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; fm4_bank->variant = mb9bfx66;
} else if (fm4_name_match(variant, "MB9BFx67")) { } else if (fm4_name_match(variant, "MB9BFx67")) {
fm4_bank->variant = mb9bfx67; fm4_bank->variant = mb9bfx67;