cortex m3: add cortex_m3 reset_config cmd

This new cmd adds the ability to choose the Cortex-M3
reset method used.
It defaults to using SRST for reset if available otherwise
it falls back to using NVIC VECTRESET. This is known to work
on all cores.

Move any luminary specific reset handling to the stellaris cfg file.

Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
This commit is contained in:
Spencer Oliver
2010-08-25 20:29:22 +01:00
parent 1ca286557a
commit 3c69eee9ef
4 changed files with 136 additions and 57 deletions

View File

@@ -134,6 +134,13 @@ struct cortex_m3_dwt_comparator
uint32_t dwt_comparator_address;
};
enum cortex_m3_soft_reset_config
{
CORTEX_M3_RESET_SRST,
CORTEX_M3_RESET_SYSRESETREQ,
CORTEX_M3_RESET_VECTRESET,
};
struct cortex_m3_common
{
int common_magic;
@@ -158,6 +165,8 @@ struct cortex_m3_common
struct cortex_m3_dwt_comparator *dwt_comparator_list;
struct reg_cache *dwt_cache;
enum cortex_m3_soft_reset_config soft_reset_config;
struct armv7m_common armv7m;
};