summaryrefslogtreecommitdiffstats
path: root/libpdbg
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2018-06-19 15:25:26 +1000
committerAlistair Popple <alistair@popple.id.au>2018-06-25 14:50:54 +1000
commit9e0991706a9cec65e62c11f61463076399dcbfb0 (patch)
tree925b46f8be46cef2a141e886fb26724482d0c09d /libpdbg
parentdb3412e2ba689a2281d56a50b5d85a34f68561ab (diff)
downloadpdbg-9e0991706a9cec65e62c11f61463076399dcbfb0.tar.gz
pdbg-9e0991706a9cec65e62c11f61463076399dcbfb0.zip
htm: Remove reset by adding it to start
Signed-off-by: Michael Neuling <mikey@neuling.org>
Diffstat (limited to 'libpdbg')
-rw-r--r--libpdbg/htm.c12
-rw-r--r--libpdbg/libpdbg.h1
-rw-r--r--libpdbg/target.h1
3 files changed, 3 insertions, 11 deletions
diff --git a/libpdbg/htm.c b/libpdbg/htm.c
index 48ad001..d7ffbcc 100644
--- a/libpdbg/htm.c
+++ b/libpdbg/htm.c
@@ -207,13 +207,6 @@ int htm_stop(struct pdbg_target *target)
return htm ? htm->stop(htm) : -1;
}
-int htm_reset(struct pdbg_target *target)
-{
- struct htm *htm = check_and_convert(target);
-
- return htm ? htm->reset(htm) : -1;
-}
-
int htm_status(struct pdbg_target *target)
{
struct htm *htm = check_and_convert(target);
@@ -705,6 +698,9 @@ static int do_htm_start(struct htm *htm)
{
struct htm_status status;
+ if (do_htm_reset(htm) < 0)
+ return -1;
+
if (HTM_ERR(get_status(htm, &status)))
return -1;
@@ -950,7 +946,6 @@ static struct htm nhtm = {
},
.start = do_htm_start,
.stop = do_htm_stop,
- .reset = do_htm_reset,
.status = do_htm_status,
.dump = do_htm_dump,
};
@@ -965,7 +960,6 @@ static struct htm chtm = {
},
.start = do_htm_start,
.stop = do_htm_stop,
- .reset = do_htm_reset,
.status = do_htm_status,
.dump = do_htm_dump,
};
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index 1f5c311..21e10c6 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -165,7 +165,6 @@ struct thread_state {
int htm_start(struct pdbg_target *target);
int htm_stop(struct pdbg_target *target);
int htm_status(struct pdbg_target *target);
-int htm_reset(struct pdbg_target *target);
int htm_dump(struct pdbg_target *target, uint64_t size, char *filename);
int adu_getmem(struct pdbg_target *target, uint64_t addr, uint8_t *ouput, uint64_t size);
diff --git a/libpdbg/target.h b/libpdbg/target.h
index ac00b56..6f8d4b8 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -93,7 +93,6 @@ struct htm {
struct pdbg_target target;
int (*start)(struct htm *);
int (*stop)(struct htm *);
- int (*reset)(struct htm *);
int (*status)(struct htm *);
int (*dump)(struct htm *, uint64_t, char *);
};
OpenPOWER on IntegriCloud