From a3245bd7cdd2d8c3740c5e8f31efcd78de67837a Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sat, 27 Feb 2010 00:12:38 -0800 Subject: interface: define TMS sequence command For support of SWD we need to be able to clock out special bit sequences over TMS or SWDIO. Create this as a generic operation, not yet called by anything, which is split as usual into: - upper level abstraction ... here, jtag_add_tms_seq(); - midlayer implementation logic hooking that to the lowlevel code; - lowlevel minidriver operation ... here, interface_add_tms_seq(); - message type for request queue, here JTAG_TMS. This is done slightly differently than other operations: there's a flag saying whether the interface driver supports this request. (In fact a flag *word* so upper layers can learn about other capabilities too ... for example, supporting SWD operations.) That approach (flag) lets this method *eventually* be used to eliminate pathmove() and statemove() support from most adapter drivers, by moving all that logic into the mid-layer and increasing uniformity between the various drivers. (Which will in turn reduce subtle bugginess.) Signed-off-by: David Brownell --- src/jtag/zy1000/zy1000.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/jtag/zy1000/zy1000.c') diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index d920c30b..e21104c7 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -804,7 +804,16 @@ int interface_jtag_add_pathmove(int num_states, const tap_state_t *path) return ERROR_OK; } - +int interface_add_tms_seq(unsigned num_bits, const uint8_t *seq) +{ + /* FIXME just implement this, like pathmove but without + * JTAG-specific state transition checking. Then update + * zy1000_interface to report that it's supported. + * + * Eventually interface_jtag_add_pathmove() could vanish. + */ + return ERROR_JTAG_NOT_IMPLEMENTED; +} void embeddedice_write_dcc(struct jtag_tap *tap, int reg_addr, uint8_t *buffer, int little, int count) { -- cgit v1.2.3