Add new target type: OpenRISC
Add support for OpenRISC target. This implementation supports the adv_debug_sys debug unit core. The mohor dbg_if is not supported. Support for mohor TAP core and Altera Virtual JTAG core are also provided. Change-Id: I3b1cfab1bbb28e497c4fca6ed1bd3a4362609b72 Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Reviewed-on: http://openocd.zylin.com/1547 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
committed by
Spencer Oliver
parent
d19fafc8bd
commit
4e79b48e2c
65
src/target/openrisc/or1k_tap_mohor.c
Normal file
65
src/target/openrisc/or1k_tap_mohor.c
Normal file
@@ -0,0 +1,65 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013 by Franck Jullien *
|
||||
* elec4fun@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* 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
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "or1k_tap.h"
|
||||
#include "or1k.h"
|
||||
|
||||
#include <jtag/jtag.h>
|
||||
|
||||
#define OR1K_TAP_INST_DEBUG 0x8
|
||||
|
||||
static int or1k_tap_mohor_init(struct or1k_jtag *jtag_info)
|
||||
{
|
||||
LOG_DEBUG("Initialising OpenCores JTAG TAP");
|
||||
|
||||
/* Put TAP into state where it can talk to the debug interface
|
||||
* by shifting in correct value to IR.
|
||||
*/
|
||||
|
||||
/* Ensure TAP is reset - maybe not necessary*/
|
||||
jtag_add_tlr();
|
||||
|
||||
struct jtag_tap *tap = jtag_info->tap;
|
||||
struct scan_field field;
|
||||
uint8_t ir_value = OR1K_TAP_INST_DEBUG;
|
||||
|
||||
field.num_bits = tap->ir_length;
|
||||
field.out_value = &ir_value;
|
||||
field.in_value = NULL;
|
||||
|
||||
jtag_add_ir_scan(tap, &field, TAP_IDLE);
|
||||
|
||||
return jtag_execute_queue();
|
||||
}
|
||||
|
||||
static struct or1k_tap_ip mohor_tap = {
|
||||
.name = "mohor",
|
||||
.init = or1k_tap_mohor_init,
|
||||
};
|
||||
|
||||
int or1k_tap_mohor_register(void)
|
||||
{
|
||||
list_add_tail(&mohor_tap.list, &tap_list);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user