Kinetis: Add K24 support and tidy up
authorPatrick Stewart <patstew@gmail.com>
Fri, 10 Jul 2015 13:01:35 +0000 (14:01 +0100)
committerPaul Fertser <fercerpav@gmail.com>
Fri, 9 Oct 2015 12:43:23 +0000 (13:43 +0100)
commit37e2fdcc95d136c5e6e0dfcd18ac9f450d0c17f2
tree42908be8abe1e1c695f5678e268a0dc27258bdc3
parent48787e19ef7b620569c362410efd7de5a583306d
Kinetis: Add K24 support and tidy up

The K24 uses the KL-style SDID register and has some flashing quirks, so the kinetis driver does not support it properly.
Extend the chip detection routine to support the new SDID format. Add a parameter for the maximum flash size, as the K24 only supports 1k flashing blocks but has 4k sector size. Remove global 'granularity' array, as it's only really needed in one function. Replace 'klxx' with an enum showing which flash commands are actually supported on a given chip.

Signed-off-by: Patrick Stewart <patstew@gmail.com>
Change-Id: Ie244fab564d58c5cfe4fa36a025f0b2674ffad69
Reviewed-on: http://openocd.zylin.com/2864
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/flash/nor/kinetis.c