flash Kinetis: Family K8x added 14/3614/2
authorTomas Vanek <vanekt@fbl.cz>
Tue, 2 Aug 2016 14:49:31 +0000 (16:49 +0200)
committerFreddie Chopin <freddie.chopin@gmail.com>
Fri, 4 Nov 2016 21:28:26 +0000 (21:28 +0000)
Change-Id: I8c090a6fe6c204ce20622006490f896c2a55292f
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/3614
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
src/flash/nor/kinetis.c

index 3177473..49a6e27 100644 (file)
 #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");
                        }