[ 1429825 ] EJTAG driver (new data files)
git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@738 b68d4a1b-bc3d-0410-92ed-d4ac073336b7master
parent
dc2cdf8451
commit
8995b5d452
@ -0,0 +1,50 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# JTAG declarations for ADMtek/Infineon ADM5120
|
||||
# Copyright (C) 2005 Marek Michalkiewicz
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Written by Marek Michalkiewicz <marekm@amelek.gda.pl>, 2005.
|
||||
#
|
||||
|
||||
register BR 1
|
||||
register BSR 1
|
||||
register DIR 32
|
||||
register EJIMPCODE 32
|
||||
register EJADDRESS 32
|
||||
register EJDATA 32
|
||||
register EJCONTROL 32
|
||||
register EJALL 96
|
||||
register EJFASTDATA 33
|
||||
|
||||
instruction length 5
|
||||
|
||||
instruction BYPASS 11111 BR
|
||||
instruction SAMPLE/PRELOAD 00010 BSR
|
||||
instruction IDCODE 00001 DIR
|
||||
instruction EJTAG_IMPCODE 00011 EJIMPCODE
|
||||
instruction EJTAG_ADDRESS 01000 EJADDRESS
|
||||
instruction EJTAG_DATA 01001 EJDATA
|
||||
instruction EJTAG_CONTROL 01010 EJCONTROL
|
||||
instruction EJTAG_ALL 01011 EJALL
|
||||
instruction EJTAGBOOT 01100 BR
|
||||
instruction NORMALBOOT 01101 BR
|
||||
instruction EJTAG_FASTDATA 01110 EJFASTDATA
|
||||
|
||||
initbus ejtag
|
||||
endian little
|
@ -0,0 +1,50 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# JTAG declarations for Atheros AR2312
|
||||
# Copyright (C) 2005 Marek Michalkiewicz
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Written by Marek Michalkiewicz <marekm@amelek.gda.pl>, 2005.
|
||||
#
|
||||
|
||||
register BR 1
|
||||
register BSR 1
|
||||
register DIR 32
|
||||
register EJIMPCODE 32
|
||||
register EJADDRESS 32
|
||||
register EJDATA 32
|
||||
register EJCONTROL 32
|
||||
register EJALL 96
|
||||
register EJFASTDATA 33
|
||||
|
||||
instruction length 5
|
||||
|
||||
instruction BYPASS 11111 BR
|
||||
instruction SAMPLE/PRELOAD 00010 BSR
|
||||
instruction IDCODE 00001 DIR
|
||||
instruction EJTAG_IMPCODE 00011 EJIMPCODE
|
||||
instruction EJTAG_ADDRESS 01000 EJADDRESS
|
||||
instruction EJTAG_DATA 01001 EJDATA
|
||||
instruction EJTAG_CONTROL 01010 EJCONTROL
|
||||
instruction EJTAG_ALL 01011 EJALL
|
||||
instruction EJTAGBOOT 01100 BR
|
||||
instruction NORMALBOOT 01101 BR
|
||||
instruction EJTAG_FASTDATA 01110 EJFASTDATA
|
||||
|
||||
initbus ejtag
|
||||
endian big
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
|
||||
# bits 27-12 of the Device Identification Register
|
||||
0000001000000010 msp2006 MSP2006
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
|
||||
# bits 31-28 of the Device Identification Register
|
||||
0001 msp2006 1
|
@ -0,0 +1,29 @@
|
||||
#
|
||||
# $Id$
|
||||
|
||||
register BR 1
|
||||
register BSR 1
|
||||
register DIR 32
|
||||
register EJIMPCODE 32
|
||||
register EJADDRESS 32
|
||||
register EJDATA 32
|
||||
register EJCONTROL 32
|
||||
register EJALL 96
|
||||
register EJFASTDATA 33
|
||||
|
||||
instruction length 5
|
||||
|
||||
instruction BYPASS 11111 BR
|
||||
instruction SAMPLE/PRELOAD 00010 BSR
|
||||
instruction IDCODE 00001 DIR
|
||||
instruction EJTAG_IMPCODE 00011 EJIMPCODE
|
||||
instruction EJTAG_ADDRESS 01000 EJADDRESS
|
||||
instruction EJTAG_DATA 01001 EJDATA
|
||||
instruction EJTAG_CONTROL 01010 EJCONTROL
|
||||
instruction EJTAG_ALL 01011 EJALL
|
||||
instruction EJTAGBOOT 01100 BR
|
||||
instruction NORMALBOOT 01101 BR
|
||||
instruction EJTAG_FASTDATA 01110 EJFASTDATA
|
||||
|
||||
initbus ejtag
|
||||
endian big
|
@ -0,0 +1,23 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
|
||||
# bits 31-28 of the Device Identification Register
|
||||
0000 ar7300 0
|
@ -0,0 +1,29 @@
|
||||
#
|
||||
# $Id$
|
||||
|
||||
register BR 1
|
||||
register BSR 1
|
||||
register DIR 32
|
||||
register EJIMPCODE 32
|
||||
register EJADDRESS 32
|
||||
register EJDATA 32
|
||||
register EJCONTROL 32
|
||||
register EJALL 96
|
||||
register EJFASTDATA 33
|
||||
|
||||
instruction length 5
|
||||
|
||||
instruction BYPASS 11111 BR
|
||||
instruction SAMPLE/PRELOAD 00010 BSR
|
||||
instruction IDCODE 00001 DIR
|
||||
instruction EJTAG_IMPCODE 00011 EJIMPCODE
|
||||
instruction EJTAG_ADDRESS 01000 EJADDRESS
|
||||
instruction EJTAG_DATA 01001 EJDATA
|
||||
instruction EJTAG_CONTROL 01010 EJCONTROL
|
||||
instruction EJTAG_ALL 01011 EJALL
|
||||
instruction EJTAGBOOT 01100 BR
|
||||
instruction NORMALBOOT 01101 BR
|
||||
instruction EJTAG_FASTDATA 01110 EJFASTDATA
|
||||
|
||||
initbus ejtag
|
||||
endian big
|
@ -0,0 +1,25 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2005 Marek Michalkiewicz
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Written by Marek Michalkiewicz <marekm@amelek.gda.pl>, 2005.
|
||||
#
|
||||
|
||||
# bits 27-12 of the Device Identification Register
|
||||
0101001010000000 lx5280 LX5280
|
@ -0,0 +1,25 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2005 Marek Michalkiewicz
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Written by Marek Michalkiewicz <marekm@amelek.gda.pl>, 2005.
|
||||
#
|
||||
|
||||
# bits 31-28 of the Device Identification Register
|
||||
0001 lx5280 1
|
@ -0,0 +1,44 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# JTAG declarations for Lexra LX5280 (Realtek RTL8181, RTL8186)
|
||||
# Copyright (C) 2005 Marek Michalkiewicz
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Written by Marek Michalkiewicz <marekm@amelek.gda.pl>, 2005.
|
||||
#
|
||||
|
||||
register BR 1
|
||||
register DIR 32
|
||||
register EJIMPCODE 32
|
||||
register EJADDRESS 32
|
||||
register EJDATA 32
|
||||
register EJCONTROL 32
|
||||
register EJALL 96
|
||||
|
||||
instruction length 5
|
||||
|
||||
instruction BYPASS 11111 BR
|
||||
instruction IDCODE 00001 DIR
|
||||
instruction EJTAG_IMPCODE 00011 EJIMPCODE
|
||||
instruction EJTAG_ADDRESS 01000 EJADDRESS
|
||||
instruction EJTAG_DATA 01001 EJDATA
|
||||
instruction EJTAG_CONTROL 01010 EJCONTROL
|
||||
instruction EJTAG_ALL 01011 EJALL
|
||||
|
||||
initbus ejtag
|
||||
endian big
|
@ -0,0 +1,57 @@
|
||||
This diff files add:
|
||||
1) EJTAG support. It supply ability to flash almost ALL EJTAG-capable boards (ARM, MIPS).
|
||||
It is not needed to search BSDL sescriptors. it uses STANDARD path to access flash.
|
||||
For new CPU it is needed just add data files wich can be authomatically
|
||||
generated, but jtag-tools originally used this files and auto generation for EJTAG-capable
|
||||
CPUs is not wroted. Anybody can wrote this code.
|
||||
|
||||
EJTAG driver written by Marek Marek Michalkiewicz <marekm@amelek.gda.pl>, 2005
|
||||
under GPL http://www.amelek.gda.pl/rtl8181/jtag/
|
||||
|
||||
2) data files for very different EJTAG capable MIPS CPUs in file data-add.diff
|
||||
Realtek RTL8181, RTL8186, Admtek ADM5120, Atheros AR2312, TI AR7, Brecis (PMC-Sierra) MSP2006.
|
||||
anybody can create files for nes CPUs using this files as template.
|
||||
Truly say, it is needed to change just
|
||||
"instruction length" and "endian" strings.
|
||||
Instruction length can be given by "detect" command:
|
||||
jtag> detect
|
||||
IR length: 5
|
||||
Chain length: 1
|
||||
Device Id: 0001-0000001000000010-00101110000-1
|
||||
^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
|
||||
--->>>> step-PARTS -MANUFACTURER
|
||||
|
||||
3) address-support.diff contains support for non-zero flash address.
|
||||
Different CPUs use different flash addresses.
|
||||
|
||||
Example: TI AR7 (famouse ADSL modems) uses 0x30000000
|
||||
another MIPS CPUs uses 0x3fc00000 (standard for MIPS32 boards).
|
||||
0x1------- is for 8bit access to flash (example: 0x1fc00000)
|
||||
0x3------- is for 16-bit access to flash (example: 0x3fc00000)
|
||||
0x5------- is for 32-bit access to flash (example: 0x5fc00000)
|
||||
length depends on flash. It is possible to try any from this address regions.
|
||||
Many CPUs map flash to all of this addresses.
|
||||
|
||||
So, for EJTAG non-zero flash address support IS NEEDED. Unfortunetly, ejtag-tools
|
||||
not maintained by owner and this patch is not implemented more than 2 years.
|
||||
But, i think, it is not needed to create new sourceforge project.
|
||||
|
||||
For success flashing it is needed to take into attention:
|
||||
in file /libbrux/flash/amd.c there are strings:
|
||||
o = 1; /* Heuristic */
|
||||
Flash can be connected to board using switch in address. In some cases it is needed
|
||||
to add 1 to this digit. For example, MSP2006 boards uses amd_flash_autodetect8
|
||||
with o = 1. And AR7 uses o = 0.
|
||||
|
||||
4) example of successful flashing using EJTAG: http://forum.openwrt.org/viewtopic.php?id=4191
|
||||
|
||||
Patch do not conflicts with another patches.
|
||||
it
|
||||
1)adds /src/bus/ejtag.c file
|
||||
2) register this file in /src/bus/buses.c buses.h makefile.am
|
||||
3) removes one check from /src/tap/parport/ppdev.c
|
||||
4) change in flash.c is not needed, but can speedup flashing. It just exclude "printf" from cycle.
|
||||
5) comment two strings in libbrux/flash/detectflash.c
|
||||
it is not needed
|
||||
6) add non-zero flash address support to libbrux/flash/jedec.c and amd.c
|
||||
i wonder why this is not added to CVS tree. This patch was given by different peoples many times.
|
Loading…
Reference in New Issue