From 09253ffd13038a465ab7a2ffc8475259d54da1e4 Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Tue, 2 Aug 2016 16:49:31 +0200 Subject: [PATCH] flash Kinetis: Family K8x added Change-Id: I8c090a6fe6c204ce20622006490f896c2a55292f Signed-off-by: Tomas Vanek Reviewed-on: http://openocd.zylin.com/3614 Tested-by: jenkins Reviewed-by: Freddie Chopin --- src/flash/nor/kinetis.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c index 3177473b8..49a6e2721 100644 --- a/src/flash/nor/kinetis.c +++ b/src/flash/nor/kinetis.c @@ -207,6 +207,7 @@ #define KINETIS_SDID_FAMILYID_K4X 0x40000000 #define KINETIS_SDID_FAMILYID_K6X 0x60000000 #define KINETIS_SDID_FAMILYID_K7X 0x70000000 +#define KINETIS_SDID_FAMILYID_K8X 0x80000000 struct kinetis_flash_bank { bool probed; @@ -1679,6 +1680,16 @@ static int kinetis_probe(struct flash_bank *bank) num_blocks = 4; kinfo->flash_support = FS_PROGRAM_PHRASE | FS_PROGRAM_SECTOR | FS_INVALIDATE_CACHE_K; break; + + case KINETIS_SDID_FAMILYID_K8X | KINETIS_SDID_SUBFAMID_KX0: + case KINETIS_SDID_FAMILYID_K8X | KINETIS_SDID_SUBFAMID_KX1: + case KINETIS_SDID_FAMILYID_K8X | KINETIS_SDID_SUBFAMID_KX2: + /* K80FN256, K81FN256, K82FN256 */ + pflash_sector_size_bytes = 4<<10; + num_blocks = 1; + kinfo->flash_support = FS_PROGRAM_LONGWORD | FS_INVALIDATE_CACHE_K; + break; + default: LOG_ERROR("Unsupported Kinetis FAMILYID SUBFAMID"); }