I'm working at restructuring the struct jtag_interface with the main purpose to split it in two sub-parts: - one common part independent from the transport (adapter name, speed, init, quit, ..); - one part containing the specific API of the transport. The final goal is either to get a clean-up and to simplify the add of new transports.
The function execute_queue() in jtag_interface is supposed to be JTAG specific, but it is used by other transports (e.g. SWD) to control SRST and to implement jtag_add_sleep(), by using respectively JTAG commands with type JTAG_RESET and JTAG_SLEEP. It's easy to extract the SRST management and add a transport independent assert_srst() in the common part above. No big issue here. Where I'm confused is about jtag_add_sleep(). For almost all the adapter drivers, this API just flushes the JTAG queue and runs jtag_sleep(). This could be in a common code, with no need to push a JTAG_SLEEP command in the JTAG queue and move the execution to the driver code. But for the adapters "presto" and "ulink", the driver's implementation continuously send commands to the adapter while performing the delay. I don't understand: - why these commands are required for "presto" and "ulink" while performing the sleep? - why there is the need to push the delay request in the JTAG queue? - is this a JTAG specific need (both "presto" and "ulink" drivers are JTAG only), or other transports could require it in the future? Thanks Antonio _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
