* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef HAVE_CONFIG_H
#define OR1K_TAP_INST_IDCODE 0x2
#define OR1K_TAP_INST_DEBUG 0x8
-static char *id_to_string(unsigned char id)
+static const char *id_to_string(unsigned char id)
{
switch (id) {
case VJTAG_NODE_ID:
LOG_DEBUG("SLD HUB Configuration register");
LOG_DEBUG("------------------------------");
LOG_DEBUG("m_width = %d", m_width);
- LOG_DEBUG("manufacturer_id = 0x%02x", MANUF(hub_info));
+ LOG_DEBUG("manufacturer_id = 0x%02" PRIx32, MANUF(hub_info));
LOG_DEBUG("nb_of_node = %d", nb_nodes);
- LOG_DEBUG("version = %d", VER(hub_info));
+ LOG_DEBUG("version = %" PRId32, VER(hub_info));
LOG_DEBUG("VIR length = %d", guess_addr_width(nb_nodes) + m_width);
/* Because the number of SLD nodes is now known, the Nodes on the hub can be
LOG_DEBUG("Node info register");
LOG_DEBUG("--------------------");
- LOG_DEBUG("instance_id = %d", ID(node_info));
- LOG_DEBUG("manufacturer_id = 0x%02x", MANUF(node_info));
- LOG_DEBUG("node_id = %d (%s)", ID(node_info),
+ LOG_DEBUG("instance_id = %" PRId32, ID(node_info));
+ LOG_DEBUG("manufacturer_id = 0x%02" PRIx32, MANUF(node_info));
+ LOG_DEBUG("node_id = %" PRId32 " (%s)", ID(node_info),
id_to_string(ID(node_info)));
- LOG_DEBUG("version = %d", VER(node_info));
+ LOG_DEBUG("version = %" PRId32, VER(node_info));
if (ID(node_info) == VJTAG_NODE_ID)
vjtag_node_address = node_index + 1;
}
/* Select VIR */
- t[0] = ALTERA_CYCLONE_CMD_USER1;
+ buf_set_u32(t, 0, tap->ir_length, ALTERA_CYCLONE_CMD_USER1);
field.num_bits = tap->ir_length;
field.out_value = t;
field.in_value = NULL;
jtag_add_ir_scan(tap, &field, TAP_IDLE);
/* Send the DEBUG command to the VJTAG IR */
- buf_set_u32(t, 0, field.num_bits, (vjtag_node_address << m_width) | ALT_VJTAG_CMD_DEBUG);
- field.num_bits = guess_addr_width(nb_nodes) + m_width;
+ int dr_length = guess_addr_width(nb_nodes) + m_width;
+ buf_set_u32(t, 0, dr_length, (vjtag_node_address << m_width) | ALT_VJTAG_CMD_DEBUG);
+ field.num_bits = dr_length;
field.out_value = t;
field.in_value = NULL;
jtag_add_dr_scan(tap, 1, &field, TAP_IDLE);
/* Select the VJTAG DR */
- t[0] = ALTERA_CYCLONE_CMD_USER0;
+ buf_set_u32(t, 0, tap->ir_length, ALTERA_CYCLONE_CMD_USER0);
field.num_bits = tap->ir_length;
field.out_value = t;
field.in_value = NULL;