Line 38... |
Line 38... |
#include <sys/types.h>
|
#include <sys/types.h>
|
#include <sys/stat.h>
|
#include <sys/stat.h>
|
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
#include <fcntl.h>
|
#include <fcntl.h>
|
|
|
|
/* The following prototype is necessary or the compiler will not
|
|
correctly promote the data argument to ULONGEST */
|
|
static void or1k_write_reg (unsigned int, ULONGEST);
|
|
|
/* JTAG or1k target ops. */
|
/* JTAG or1k target ops. */
|
extern void jtag_init PARAMS ((char * args));
|
extern void jtag_init PARAMS ((char * args));
|
extern ULONGEST jtag_read_reg PARAMS ((unsigned int regno));
|
extern ULONGEST jtag_read_reg PARAMS ((unsigned int regno));
|
extern void jtag_write_reg PARAMS ((unsigned int regno, ULONGEST data));
|
extern void jtag_write_reg PARAMS ((unsigned int regno, ULONGEST data));
|
extern void jtag_done PARAMS ((void));
|
extern void jtag_done PARAMS ((void));
|
Line 332... |
Line 336... |
or1k_write_reg (JTAG_RISCOP, val | 3);
|
or1k_write_reg (JTAG_RISCOP, val | 3);
|
|
|
/* give it some time */
|
/* give it some time */
|
usleep (1000);
|
usleep (1000);
|
or1k_flush_pipeline ();
|
or1k_flush_pipeline ();
|
|
|
|
or1k_set_chain (SC_REGISTER); /* CZ: Changed 16/06/01...must reset
|
|
scan chain after flush_pipeline() */
|
/* Release reset signal, but keep in stall state. */
|
/* Release reset signal, but keep in stall state. */
|
or1k_write_reg (JTAG_RISCOP, val | 1);
|
or1k_write_reg (JTAG_RISCOP, val | 1);
|
or1k_flush_pipeline ();
|
or1k_flush_pipeline ();
|
}
|
}
|
|
|
Line 1450... |
Line 1457... |
or1k_jtag_ops = or1k_sim_ops = or1k_dummy_ops;
|
or1k_jtag_ops = or1k_sim_ops = or1k_dummy_ops;
|
|
|
/* Initialize target-specific fields in the target vectors adn add targets. */
|
/* Initialize target-specific fields in the target vectors adn add targets. */
|
or1k_jtag_ops.to_shortname = "jtag";
|
or1k_jtag_ops.to_shortname = "jtag";
|
or1k_jtag_ops.to_longname = "Remote or1k debugging over JTAG port";
|
or1k_jtag_ops.to_longname = "Remote or1k debugging over JTAG port";
|
or1k_jtag_ops.to_doc = "\
|
or1k_jtag_ops.to_doc = "Debug a board using the OR1K remote debugging protocol"
|
Debug a board using the OR1K remote debugging protocol over a parallel line.\n\
|
" over a parallel line.\nThe argument is the parallel port it is connected "
|
The argument is the device it is connected to or, if it contains a colon,\n";
|
"to, or, if it is formatted\nas a URL of the form jtag://<hostname>:<port>,"
|
|
" then the argument refers to\na remote JTAG proxy server.\n";
|
or1k_jtag_ops.to_open = or1k_jtag_open;
|
or1k_jtag_ops.to_open = or1k_jtag_open;
|
add_target (&or1k_jtag_ops);
|
add_target (&or1k_jtag_ops);
|
|
|
or1k_dummy_ops.to_shortname = "dummy";
|
or1k_dummy_ops.to_shortname = "dummy";
|
or1k_dummy_ops.to_longname = "Dummy target";
|
or1k_dummy_ops.to_longname = "Dummy target";
|