|
|
|
@ -107,6 +107,11 @@
|
|
|
|
|
#define BITMASK_ARMUSBOCD_nTSRST (1 << BIT_ARMUSBOCD_nTRST)
|
|
|
|
|
#define BITMASK_ARMUSBOCD_nTRST_nOE (1 << BIT_ARMUSBOCD_nTRST_nOE)
|
|
|
|
|
#define BITMASK_ARMUSBOCD_RED_LED (1 << BIT_ARMUSBOCD_RED_LED)
|
|
|
|
|
/* bit and bitmask definitions for BFIN-UJTAG */
|
|
|
|
|
#define BIT_BFIN_UJTAG_nTRST 1
|
|
|
|
|
#define BIT_BFIN_UJTAG_nLED 3
|
|
|
|
|
#define BITMASK_BFIN_UJTAG_nTRST (1 << BIT_BFIN_UJTAG_nTRST)
|
|
|
|
|
#define BITMASK_BFIN_UJTAG_nLED (1 << BIT_BFIN_UJTAG_nLED)
|
|
|
|
|
/* bit and bitmask definitions for OOCDLink-s */
|
|
|
|
|
#define BIT_OOCDLINKS_nTRST_nOE 0
|
|
|
|
|
#define BIT_OOCDLINKS_nTRST 1
|
|
|
|
@ -460,6 +465,44 @@ ft2232_armusbocd_init( cable_t *cable )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
ft2232_bfin_ujtag_init( cable_t *cable )
|
|
|
|
|
{
|
|
|
|
|
parport_t *p = cable->link.port;
|
|
|
|
|
params_t *params = (params_t *)cable->params;
|
|
|
|
|
|
|
|
|
|
if (parport_open( p ))
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
/* safe default values */
|
|
|
|
|
params->low_byte_value = 0;
|
|
|
|
|
params->low_byte_dir = 0;
|
|
|
|
|
|
|
|
|
|
/* Set Data Bits Low Byte
|
|
|
|
|
TCK = 0, TMS = 1, TDI = 0 */
|
|
|
|
|
push_to_send( params, SET_BITS_LOW );
|
|
|
|
|
push_to_send( params, params->low_byte_value | BITMASK_TMS );
|
|
|
|
|
push_to_send( params, params->low_byte_dir | BITMASK_TCK | BITMASK_TDI | BITMASK_TMS );
|
|
|
|
|
|
|
|
|
|
/* Set Data Bits High Byte */
|
|
|
|
|
params->high_byte_value_trst_active = BITMASK_BFIN_UJTAG_nLED;
|
|
|
|
|
params->high_byte_value_trst_inactive = BITMASK_BFIN_UJTAG_nTRST;
|
|
|
|
|
params->high_byte_dir = BITMASK_BFIN_UJTAG_nTRST | BITMASK_BFIN_UJTAG_nLED;
|
|
|
|
|
push_to_send( params, SET_BITS_HIGH );
|
|
|
|
|
push_to_send( params, params->high_byte_value_trst_inactive );
|
|
|
|
|
push_to_send( params, 0 );
|
|
|
|
|
push_to_send( params, SET_BITS_HIGH );
|
|
|
|
|
push_to_send( params, params->high_byte_value_trst_inactive );
|
|
|
|
|
push_to_send( params, params->high_byte_dir );
|
|
|
|
|
|
|
|
|
|
ft2232_set_frequency( cable, FT2232_MAX_TCK_FREQ );
|
|
|
|
|
|
|
|
|
|
params->last_tdo_valid = 0;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
|
ft2232_oocdlinks_init( cable_t *cable )
|
|
|
|
|
{
|
|
|
|
@ -721,6 +764,33 @@ ft2232_armusbocd_done( cable_t *cable )
|
|
|
|
|
parport_close( p );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
ft2232_bfin_ujtag_done( cable_t *cable )
|
|
|
|
|
{
|
|
|
|
|
parport_t *p = cable->link.port;
|
|
|
|
|
params_t *params = (params_t *)cable->params;
|
|
|
|
|
|
|
|
|
|
/* Set Data Bits Low Byte
|
|
|
|
|
disable output drivers */
|
|
|
|
|
push_to_send( params, SET_BITS_LOW );
|
|
|
|
|
push_to_send( params, 0 );
|
|
|
|
|
push_to_send( params, 0 );
|
|
|
|
|
|
|
|
|
|
/* Set Data Bits High Byte
|
|
|
|
|
disable output drivers */
|
|
|
|
|
push_to_send( params, SET_BITS_HIGH );
|
|
|
|
|
push_to_send( params, BITMASK_BFIN_UJTAG_nTRST);
|
|
|
|
|
push_to_send( params, BITMASK_BFIN_UJTAG_nTRST | BITMASK_BFIN_UJTAG_nLED);
|
|
|
|
|
|
|
|
|
|
/* Set Data Bits High Byte
|
|
|
|
|
set all to input */
|
|
|
|
|
push_to_send( params, SET_BITS_HIGH );
|
|
|
|
|
push_to_send( params, BITMASK_BFIN_UJTAG_nTRST);
|
|
|
|
|
push_to_send( params, 0 );
|
|
|
|
|
send_and_receive( cable, COMPLETELY );
|
|
|
|
|
|
|
|
|
|
parport_close( p );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
ft2232_oocdlinks_done( cable_t *cable )
|
|
|
|
@ -1380,6 +1450,24 @@ cable_driver_t ft2232_armusbocd_cable_driver = {
|
|
|
|
|
ft2232_usbcable_help
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cable_driver_t ft2232_bfin_ujtag_cable_driver = {
|
|
|
|
|
"BFIN-UJTAG",
|
|
|
|
|
N_("Analog Devices BFIN-UJTAG (FT2232) Cable (EXPERIMENTAL)"),
|
|
|
|
|
ft2232_connect,
|
|
|
|
|
generic_disconnect,
|
|
|
|
|
ft2232_cable_free,
|
|
|
|
|
ft2232_bfin_ujtag_init,
|
|
|
|
|
ft2232_bfin_ujtag_done,
|
|
|
|
|
ft2232_set_frequency,
|
|
|
|
|
ft2232_clock,
|
|
|
|
|
ft2232_get_tdo,
|
|
|
|
|
ft2232_transfer,
|
|
|
|
|
ft2232_set_trst,
|
|
|
|
|
generic_get_trst,
|
|
|
|
|
ft2232_flush,
|
|
|
|
|
ft2232_usbcable_help
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cable_driver_t ft2232_jtagkey_cable_driver = {
|
|
|
|
|
"JTAGkey",
|
|
|
|
|
N_("Amontec JTAGkey (FT2232) Cable"),
|
|
|
|
|