From 085c980215de2b5346b78629d7654aa82ba757b4 Mon Sep 17 00:00:00 2001 From: Chuck McManis Date: Sun, 4 Dec 2016 13:51:27 -0800 Subject: [PATCH] Remove EXTENDED_RESET define --- src/target/cortexm.c | 2 +- src/target/cortexm.h | 1 - src/target/sam4l.c | 7 +------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/target/cortexm.c b/src/target/cortexm.c index 887d835..59fce89 100644 --- a/src/target/cortexm.c +++ b/src/target/cortexm.c @@ -444,7 +444,7 @@ static void cortexm_reset(target *t) CORTEXM_AIRCR_VECTKEY | CORTEXM_AIRCR_SYSRESETREQ); /* If target needs to do something extra (see Atmel SAM4L for example) */ - if ((t->target_options & CORTEXM_TOPT_EXTENDED_RESET) != 0) { + if (t->extended_reset != NULL) { t->extended_reset(t); } diff --git a/src/target/cortexm.h b/src/target/cortexm.h index 7d42f19..bf1d821 100644 --- a/src/target/cortexm.h +++ b/src/target/cortexm.h @@ -155,7 +155,6 @@ #define ARM_THUMB_BREAKPOINT 0xBE00 #define CORTEXM_TOPT_INHIBIT_SRST (1 << 2) -#define CORTEXM_TOPT_EXTENDED_RESET (1 << 3) bool cortexm_probe(ADIv5_AP_t *ap); ADIv5_AP_t *cortexm_ap(target *t); diff --git a/src/target/sam4l.c b/src/target/sam4l.c index 8b82e40..cdb9072 100644 --- a/src/target/sam4l.c +++ b/src/target/sam4l.c @@ -229,12 +229,7 @@ bool sam4l_probe(target *t) t->idcode = target_mem_read32(t, SAM4L_CHIPID_CIDR); if (((t->idcode >> CHIPID_CIDR_ARCH_SHIFT) & CHIPID_CIDR_ARCH_MASK) == SAM4L_ARCH) { t->driver = "Atmel SAM4L"; -#ifdef SAM4_DISABLE_SRST - /* Check to see if our extended reset will fix this */ - t->target_options |= CORTEXM_TOPT_INHIBIT_SRST; -#endif - /* this option says we need to do "extra" stuff after reset */ - t->target_options |= CORTEXM_TOPT_EXTENDED_RESET; + /* this function says we need to do "extra" stuff after reset */ t->extended_reset = sam4l_extended_reset; ram_size = sam_ram_size(t->idcode); target_add_ram(t, 0x20000000, ram_size);