cortex_m: enhance core and arch detection
Rework core detection by adding cortex_m_partno enum to detect all CPUs
using the same method.
Instead of checking the core PARTNO then assign the arch, use the stored
information within cortex_m parts[] with the flags inside which can help
simplifying a bit the cortex_m_examine code.
This change fixes:
- the Cortex-M1 detection as ARMv6-M Core (was managed as ARMv7-M)
- the displayed CPU name for Cortex-M0+ (was displayed Cortex-M0)
Change-Id: I40b6e03f7cf3664c85e297adfc25323196dfe90b
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/6233
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>