* Patches by Xianghua Xiao, 15 Oct 2003:
- Added Motorola CPU 8540/8560 support (cpu/85xx) - Added Motorola MPC8540ADS board support (board/mpc8540ads) - Added Motorola MPC8560ADS board support (board/mpc8560ads) * Minor code cleanupmaster
parent
2d5b561e2b
commit
42d1f0394b
12
CHANGELOG
12
CHANGELOG
|
@ -2,6 +2,14 @@
|
|||
Changes for U-Boot 1.0.0:
|
||||
======================================================================
|
||||
|
||||
* Patches by Xianghua Xiao, 15 Oct 2003:
|
||||
|
||||
- Added Motorola CPU 8540/8560 support (cpu/85xx)
|
||||
- Added Motorola MPC8540ADS board support (board/mpc8540ads)
|
||||
- Added Motorola MPC8560ADS board support (board/mpc8560ads)
|
||||
|
||||
* Fix flash timings on TRAB board
|
||||
|
||||
* Make sure HUSH is initialized for running auto-update scripts
|
||||
|
||||
* Make 5200 reset command _really_ reset the board, without running
|
||||
|
@ -38,7 +46,7 @@ Changes for U-Boot 1.0.0:
|
|||
* Patch by Martin Krause, 09 Oct 2003:
|
||||
Fixes for TRAB board
|
||||
- /board/trab/rs485.c: correct baudrate
|
||||
- /board/trab/cmd_trab.c: bug fix for problem with timer overflow in
|
||||
- /board/trab/cmd_trab.c: bug fix for problem with timer overflow in
|
||||
udelay(); fix some timing problems with adc controller
|
||||
- /board/trab/trab_fkt.c: add new commands: gain, eeprom and power;
|
||||
modify commands: touch and buzzer
|
||||
|
@ -88,7 +96,7 @@ Changes for U-Boot 1.0.0:
|
|||
link state to the fault LED.
|
||||
- In NetLoop, make the Fault LED reflect the link status. The link
|
||||
status gets updated on entry, and on timeouts.
|
||||
|
||||
|
||||
* Patch by Anders Larsen, 18 Sep 2003:
|
||||
allow mkimage to build and run on Cygwin-hosted systems
|
||||
|
||||
|
|
25
CREDITS
25
CREDITS
|
@ -18,14 +18,14 @@ N: Dr. Bruno Achauer
|
|||
E: bruno@exet-ag.de
|
||||
D: Support for NetBSD (both as host and target system)
|
||||
|
||||
N: Swen Anderson
|
||||
E: sand@peppercon.de
|
||||
D: ERIC Support
|
||||
|
||||
N: Guillaume Alexandre
|
||||
E: guillaume.alexandre@gespac.ch
|
||||
D: Add PCIPPC6 configuration
|
||||
|
||||
N: Swen Anderson
|
||||
E: sand@peppercon.de
|
||||
D: ERIC Support
|
||||
|
||||
N: Pantelis Antoniou
|
||||
E: panto@intracom.gr
|
||||
D: NETVIA board support, ARTOS support.
|
||||
|
@ -190,6 +190,11 @@ N: Thomas Koeller
|
|||
E: tkoeller@gmx.net
|
||||
D: Port to Motorola Sandpoint 3 (MPC8240)
|
||||
|
||||
N: Raghu Krishnaprasad
|
||||
E: Raghu.Krishnaprasad@fci.com
|
||||
D: Support for Adder-II MPC852T evaluation board
|
||||
W: http://www.forcecomputers.com
|
||||
|
||||
N: Thomas Lange
|
||||
E: thomas@corelatus.se
|
||||
D: Support for GTH and dbau1x00 boards; lots of PCMCIA fixes
|
||||
|
@ -307,12 +312,6 @@ E: azu@sysgo.de
|
|||
D: Overall improvements on StrongARM, ARM720TDMI; Support for Tuxscreen; initial PCMCIA support for ARM
|
||||
W: www.elinos.com
|
||||
|
||||
N: Pantelis Antoniou
|
||||
E: panto@intracom.gr
|
||||
D: NETVIA board support, ARTOS support.
|
||||
|
||||
N: Raghu Krishnaprasad
|
||||
E: Raghu.Krishnaprasad@fci.com
|
||||
D: Support for Adder-II MPC852T evaluation board
|
||||
W: http://www.forcecomputers.com
|
||||
|
||||
N: Xianghua Xiao
|
||||
E: x.xiao@motorola.com
|
||||
D: Support for Motorola 85xx(PowerQUICC III) chip, MPC8540ADS and MPC8560ADS boards.
|
||||
|
|
13
MAINTAINERS
13
MAINTAINERS
|
@ -112,10 +112,6 @@ Dave Ellis <DGE@sixnetio.com>
|
|||
|
||||
SXNI855T MPC8xx
|
||||
|
||||
Raghu Krishnaprasad <raghu.krishnaprasad@fci.com>
|
||||
|
||||
ADDERII MPC852T
|
||||
|
||||
Thomas Frieden <ThomasF@hyperion-entertainment.com>
|
||||
|
||||
AmigaOneG3SE MPC7xx
|
||||
|
@ -158,6 +154,10 @@ Sangmoon Kim <dogoil@etinsys.com>
|
|||
|
||||
debris MPC8245
|
||||
|
||||
Raghu Krishnaprasad <raghu.krishnaprasad@fci.com>
|
||||
|
||||
ADDERII MPC852T
|
||||
|
||||
Nye Liu <nyet@zumanetworks.com>
|
||||
|
||||
ZUMA MPC7xx_74xx
|
||||
|
@ -240,6 +240,11 @@ John Zhan <zhanz@sinovee.com>
|
|||
|
||||
svm_sc8xx MPC8xx
|
||||
|
||||
Xianghua Xiao <x.xiao@motorola.com>
|
||||
|
||||
MPC8540ADS MPC8540
|
||||
MPC8560ADS MPC8560
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Unknown / orphaned boards:
|
||||
|
|
11
MAKEALL
11
MAKEALL
|
@ -86,6 +86,14 @@ LIST_8260=" \
|
|||
TQM8260_AC TQM8260_AD TQM8260_AE ZPC1900 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MPC85xx Systems (includes 8540, 8560 etc.)
|
||||
#########################################################################
|
||||
|
||||
LIST_85xx=" \
|
||||
MPC8540ADS MPC8560ADS \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## 74xx/7xx Systems
|
||||
#########################################################################
|
||||
|
@ -102,6 +110,7 @@ LIST_7xx=" \
|
|||
LIST_ppc="${LIST_5xx} ${LIST_5xxx} \
|
||||
${LIST_8xx} \
|
||||
${LIST_824x} ${LIST_8260} \
|
||||
${LIST_85xx} \
|
||||
${LIST_4xx} \
|
||||
${LIST_74xx} ${LIST_7xx}"
|
||||
|
||||
|
@ -180,7 +189,7 @@ build_target() {
|
|||
for arg in $@
|
||||
do
|
||||
case "$arg" in
|
||||
ppc|5xx|5xxx|8xx|824x|8260|4xx|7xx|74xx| \
|
||||
ppc|5xx|5xxx|8xx|824x|8260|85xx|4xx|7xx|74xx| \
|
||||
arm|SA|ARM7|ARM9|pxa|ixp| \
|
||||
mips| \
|
||||
x86|I486)
|
||||
|
|
13
Makefile
13
Makefile
|
@ -106,6 +106,9 @@ endif
|
|||
ifeq ($(CPU),ppc4xx)
|
||||
OBJS += cpu/$(CPU)/resetvec.o
|
||||
endif
|
||||
ifeq ($(CPU),mpc85xx)
|
||||
OBJS += cpu/$(CPU)/resetvec.o
|
||||
endif
|
||||
|
||||
LIBS = board/$(BOARDDIR)/lib$(BOARD).a
|
||||
LIBS += cpu/$(CPU)/lib$(CPU).a
|
||||
|
@ -774,6 +777,16 @@ TQM8265_AA_config: unconfig
|
|||
ZPC1900_config: unconfig
|
||||
@./mkconfig $(@:_config=) ppc mpc8260 zpc1900
|
||||
|
||||
#########################################################################
|
||||
## MPC85xx Systems
|
||||
#########################################################################
|
||||
|
||||
MPC8540ADS_config: unconfig
|
||||
@./mkconfig $(@:_config=) ppc mpc85xx mpc8540ads
|
||||
|
||||
MPC8560ADS_config: unconfig
|
||||
@./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads
|
||||
|
||||
#########################################################################
|
||||
## 74xx/7xx Systems
|
||||
#########################################################################
|
||||
|
|
32
README
32
README
|
@ -146,6 +146,7 @@ Directory Hierarchy:
|
|||
- cpu/mpc8xx Files specific to Motorola MPC8xx CPUs
|
||||
- cpu/mpc824x Files specific to Motorola MPC824x CPUs
|
||||
- cpu/mpc8260 Files specific to Motorola MPC8260 CPU
|
||||
- cpu/mpc85xx Files specific to Motorola MPC85xx CPUs
|
||||
- cpu/ppc4xx Files specific to IBM 4xx CPUs
|
||||
|
||||
|
||||
|
@ -199,6 +200,10 @@ Directory Hierarchy:
|
|||
- board/mbx8xx Files specific to MBX boards
|
||||
- board/mpc8260ads
|
||||
Files specific to MPC8260ADS and PQ2FADS-ZU boards
|
||||
- board/mpc8540ads
|
||||
Files specific to MPC8540ADS boards
|
||||
- board/mpc8560ads
|
||||
Files specific to MPC8560ADS boards
|
||||
- board/mpl/ Files specific to boards manufactured by MPL
|
||||
- board/mpl/common Common files for MPL boards
|
||||
- board/mpl/pip405 Files specific to PIP405 boards
|
||||
|
@ -210,7 +215,7 @@ Directory Hierarchy:
|
|||
- board/oxc Files specific to OXC boards
|
||||
- board/omap1510inn
|
||||
Files specific to OMAP 1510 Innovator boards
|
||||
- board/omap1610inn
|
||||
- board/omap1610inn
|
||||
Files specific to OMAP 1610 Innovator boards
|
||||
- board/pcippc2 Files specific to PCIPPC2/PCIPPC6 boards
|
||||
- board/pm826 Files specific to PM826 boards
|
||||
|
@ -306,6 +311,7 @@ The following options need to be configured:
|
|||
CONFIG_MPC823, CONFIG_MPC850, CONFIG_MPC855, CONFIG_MPC860
|
||||
or CONFIG_MPC5xx
|
||||
or CONFIG_MPC824X, CONFIG_MPC8260
|
||||
or CONFIG_MPC85xx
|
||||
or CONFIG_IOP480
|
||||
or CONFIG_405GP
|
||||
or CONFIG_405EP
|
||||
|
@ -356,7 +362,8 @@ The following options need to be configured:
|
|||
CONFIG_IAD210, CONFIG_RPXlite, CONFIG_sbc8260,
|
||||
CONFIG_EBONY, CONFIG_sacsng, CONFIG_FPS860L,
|
||||
CONFIG_V37, CONFIG_ELPT860, CONFIG_CMI,
|
||||
CONFIG_NETVIA, CONFIG_RBC823, CONFIG_ZPC1900
|
||||
CONFIG_NETVIA, CONFIG_RBC823, CONFIG_ZPC1900,
|
||||
CONFIG_MPC8540ADS, CONFIG_MPC8560ADS
|
||||
|
||||
ARM based boards:
|
||||
-----------------
|
||||
|
@ -591,7 +598,7 @@ The following options need to be configured:
|
|||
CFG_CMD_DHCP DHCP support
|
||||
CFG_CMD_DIAG * Diagnostics
|
||||
CFG_CMD_DOC * Disk-On-Chip Support
|
||||
CFG_CMD_DTT Digital Therm and Thermostat
|
||||
CFG_CMD_DTT Digital Therm and Thermostat
|
||||
CFG_CMD_ECHO * echo arguments
|
||||
CFG_CMD_EEPROM * EEPROM read/write support
|
||||
CFG_CMD_ELF bootelf, bootvx
|
||||
|
@ -893,9 +900,9 @@ The following options need to be configured:
|
|||
images is included. If not, only uncompressed and gzip
|
||||
compressed images are supported.
|
||||
|
||||
NOTE: the bzip2 algorithm requires a lot of RAM, so
|
||||
the malloc area (as defined by CFG_MALLOC_LEN) should
|
||||
be at least 4MB.
|
||||
NOTE: the bzip2 algorithm requires a lot of RAM, so
|
||||
the malloc area (as defined by CFG_MALLOC_LEN) should
|
||||
be at least 4MB.
|
||||
|
||||
- Ethernet address:
|
||||
CONFIG_ETHADDR
|
||||
|
@ -1757,13 +1764,13 @@ the default environment is used; a new CRC is computed as soon as you
|
|||
use the "saveenv" command to store a valid environment.
|
||||
|
||||
- CFG_FAULT_ECHO_LINK_DOWN:
|
||||
Echo the inverted Ethernet link state to the fault LED.
|
||||
Echo the inverted Ethernet link state to the fault LED.
|
||||
|
||||
Note: If this option is active, then CFG_FAULT_MII_ADDR
|
||||
also needs to be defined.
|
||||
|
||||
- CFG_FAULT_MII_ADDR:
|
||||
MII address of the PHY to check for the Ethernet link state.
|
||||
MII address of the PHY to check for the Ethernet link state.
|
||||
|
||||
Low Level (hardware related) configuration options:
|
||||
---------------------------------------------------
|
||||
|
@ -1774,9 +1781,9 @@ Low Level (hardware related) configuration options:
|
|||
- CFG_DEFAULT_IMMR:
|
||||
Default address of the IMMR after system reset.
|
||||
|
||||
Needed on some 8260 systems (MPC8260ADS, PQ2FADS-ZU,
|
||||
and RPXsuper) to be able to adjust the position of
|
||||
the IMMR register after a reset.
|
||||
Needed on some 8260 systems (MPC8260ADS, PQ2FADS-ZU,
|
||||
and RPXsuper) to be able to adjust the position of
|
||||
the IMMR register after a reset.
|
||||
|
||||
- Floppy Disk Support:
|
||||
CFG_FDC_DRIVE_NUMBER
|
||||
|
@ -1950,7 +1957,8 @@ configurations; the following names are supported:
|
|||
GEN860T_config EBONY_config FPS860L_config
|
||||
ELPT860_config cmi_mpc5xx_config NETVIA_config
|
||||
at91rm9200dk_config omap1510inn_config MPC8260ADS_config
|
||||
omap1610inn_config ZPC1900_config
|
||||
omap1610inn_config ZPC1900_config MPC8540ADS_config
|
||||
MPC8560ADS_config
|
||||
|
||||
Note: for some board special configuration names may exist; check if
|
||||
additional information is available from the board vendor; for
|
||||
|
|
|
@ -41,5 +41,3 @@
|
|||
* | |
|
||||
* | ... |
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
|
|
|
@ -26,4 +26,3 @@
|
|||
#
|
||||
|
||||
TEXT_BASE = 0xFE000000
|
||||
|
||||
|
|
|
@ -144,4 +144,3 @@ SECTIONS
|
|||
_end = . ;
|
||||
PROVIDE (end = .);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ int gunzip(void *, int, unsigned char *, int *);
|
|||
int board_pre_init (void)
|
||||
{
|
||||
out32(GPIO0_OR, CFG_NAND0_CE); /* set initial outputs */
|
||||
out32(GPIO0_OR, CFG_NAND1_CE); /* set initial outputs */
|
||||
out32(GPIO0_OR, CFG_NAND1_CE); /* set initial outputs */
|
||||
|
||||
/*
|
||||
* IRQ 0-15 405GP internally generated; active high; level sensitive
|
||||
|
|
|
@ -46,8 +46,8 @@ unsigned long flash_init (void)
|
|||
#else
|
||||
unsigned long size_b0;
|
||||
int i;
|
||||
uint pbcr;
|
||||
unsigned long base_b0;
|
||||
uint pbcr;
|
||||
unsigned long base_b0;
|
||||
int size_val = 0;
|
||||
|
||||
/* Init: no FLASHes known */
|
||||
|
@ -64,14 +64,14 @@ unsigned long flash_init (void)
|
|||
size_b0, size_b0<<20);
|
||||
}
|
||||
|
||||
/* Setup offsets */
|
||||
flash_get_offsets (-size_b0, &flash_info[0]);
|
||||
/* Setup offsets */
|
||||
flash_get_offsets (-size_b0, &flash_info[0]);
|
||||
|
||||
/* Re-do sizing to get full correct info */
|
||||
mtdcr(ebccfga, pb0cr);
|
||||
pbcr = mfdcr(ebccfgd);
|
||||
mtdcr(ebccfga, pb0cr);
|
||||
base_b0 = -size_b0;
|
||||
/* Re-do sizing to get full correct info */
|
||||
mtdcr(ebccfga, pb0cr);
|
||||
pbcr = mfdcr(ebccfgd);
|
||||
mtdcr(ebccfga, pb0cr);
|
||||
base_b0 = -size_b0;
|
||||
switch (size_b0) {
|
||||
case 1 << 20:
|
||||
size_val = 0;
|
||||
|
@ -90,15 +90,15 @@ unsigned long flash_init (void)
|
|||
break;
|
||||
}
|
||||
pbcr = (pbcr & 0x0001ffff) | base_b0 | (size_val << 17);
|
||||
mtdcr(ebccfgd, pbcr);
|
||||
mtdcr(ebccfgd, pbcr);
|
||||
|
||||
/* Monitor protection ON by default */
|
||||
(void)flash_protect(FLAG_PROTECT_SET,
|
||||
-CFG_MONITOR_LEN,
|
||||
0xffffffff,
|
||||
&flash_info[0]);
|
||||
/* Monitor protection ON by default */
|
||||
(void)flash_protect(FLAG_PROTECT_SET,
|
||||
-CFG_MONITOR_LEN,
|
||||
0xffffffff,
|
||||
&flash_info[0]);
|
||||
|
||||
flash_info[0].size = size_b0;
|
||||
flash_info[0].size = size_b0;
|
||||
|
||||
return (size_b0);
|
||||
#endif
|
||||
|
|
|
@ -40,11 +40,11 @@ static void flash_get_offsets (ulong base, flash_info_t *info)
|
|||
short n;
|
||||
|
||||
/* set up sector start address table */
|
||||
if (((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST) ||
|
||||
if (((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AM640U)) {
|
||||
for (i = 0; i < info->sector_count; i++)
|
||||
info->start[i] = base + (i * 0x00010000);
|
||||
} else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322B) ||
|
||||
} else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322B) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL323B) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320B) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL324B)) {
|
||||
|
@ -58,7 +58,7 @@ static void flash_get_offsets (ulong base, flash_info_t *info)
|
|||
base += 64 << 10;
|
||||
++i;
|
||||
}
|
||||
} else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322T) ||
|
||||
} else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322T) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL323T) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320T) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL324T)) {
|
||||
|
@ -75,7 +75,7 @@ static void flash_get_offsets (ulong base, flash_info_t *info)
|
|||
--i;
|
||||
info->start[i] = base;
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
if (info->flash_id & FLASH_BTYPE) {
|
||||
/* set sector offsets for bottom boot block type */
|
||||
info->start[0] = base + 0x00000000;
|
||||
|
@ -103,10 +103,10 @@ static void flash_get_offsets (ulong base, flash_info_t *info)
|
|||
void flash_print_info (flash_info_t *info)
|
||||
{
|
||||
int i;
|
||||
int k;
|
||||
int size;
|
||||
int erased;
|
||||
volatile unsigned long *flash;
|
||||
int k;
|
||||
int size;
|
||||
int erased;
|
||||
volatile unsigned long *flash;
|
||||
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
printf ("missing or unknown FLASH type\n");
|
||||
|
@ -164,28 +164,28 @@ void flash_print_info (flash_info_t *info)
|
|||
printf (" Sector Start Addresses:");
|
||||
for (i=0; i<info->sector_count; ++i) {
|
||||
#ifdef CFG_FLASH_EMPTY_INFO
|
||||
/*
|
||||
* Check if whole sector is erased
|
||||
*/
|
||||
if (i != (info->sector_count-1))
|
||||
size = info->start[i+1] - info->start[i];
|
||||
else
|
||||
size = info->start[0] + info->size - info->start[i];
|
||||
erased = 1;
|
||||
flash = (volatile unsigned long *)info->start[i];
|
||||
size = size >> 2; /* divide by 4 for longword access */
|
||||
for (k=0; k<size; k++)
|
||||
{
|
||||
if (*flash++ != 0xffffffff)
|
||||
{
|
||||
erased = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Check if whole sector is erased
|
||||
*/
|
||||
if (i != (info->sector_count-1))
|
||||
size = info->start[i+1] - info->start[i];
|
||||
else
|
||||
size = info->start[0] + info->size - info->start[i];
|
||||
erased = 1;
|
||||
flash = (volatile unsigned long *)info->start[i];
|
||||
size = size >> 2; /* divide by 4 for longword access */
|
||||
for (k=0; k<size; k++)
|
||||
{
|
||||
if (*flash++ != 0xffffffff)
|
||||
{
|
||||
erased = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((i % 5) == 0)
|
||||
printf ("\n ");
|
||||
/* print empty and read-only info */
|
||||
/* print empty and read-only info */
|
||||
printf (" %08lX%s%s",
|
||||
info->start[i],
|
||||
erased ? " E" : " ",
|
||||
|
@ -219,7 +219,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
|
|||
short n;
|
||||
CFG_FLASH_WORD_SIZE value;
|
||||
ulong base = (ulong)addr;
|
||||
volatile CFG_FLASH_WORD_SIZE *addr2 = (CFG_FLASH_WORD_SIZE *)addr;
|
||||
volatile CFG_FLASH_WORD_SIZE *addr2 = (CFG_FLASH_WORD_SIZE *)addr;
|
||||
|
||||
/* Write auto select command: read Manufacturer ID */
|
||||
addr2[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
|
@ -288,42 +288,42 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
|
|||
break; /* => 2 MB */
|
||||
|
||||
case (CFG_FLASH_WORD_SIZE)STM_ID_29W320DT:
|
||||
info->flash_id += FLASH_STMW320DT;
|
||||
info->sector_count = 67;
|
||||
info->flash_id += FLASH_STMW320DT;
|
||||
info->sector_count = 67;
|
||||
info->size = 0x00400000; break; /* => 4 MB */
|
||||
|
||||
case (CFG_FLASH_WORD_SIZE)AMD_ID_LV320T:
|
||||
info->flash_id += FLASH_AM320T;
|
||||
info->sector_count = 71;
|
||||
info->flash_id += FLASH_AM320T;
|
||||
info->sector_count = 71;
|
||||
info->size = 0x00400000; break; /* => 4 MB */
|
||||
|
||||
case (CFG_FLASH_WORD_SIZE)AMD_ID_LV320B:
|
||||
info->flash_id += FLASH_AM320B;
|
||||
info->flash_id += FLASH_AM320B;
|
||||
info->sector_count = 71;
|
||||
info->size = 0x00400000; break; /* => 4 MB */
|
||||
|
||||
case (CFG_FLASH_WORD_SIZE)AMD_ID_DL322T:
|
||||
info->flash_id += FLASH_AMDL322T;
|
||||
info->sector_count = 71;
|
||||
info->flash_id += FLASH_AMDL322T;
|
||||
info->sector_count = 71;
|
||||
info->size = 0x00400000; break; /* => 4 MB */
|
||||
|
||||
case (CFG_FLASH_WORD_SIZE)AMD_ID_DL322B:
|
||||
info->flash_id += FLASH_AMDL322B;
|
||||
info->flash_id += FLASH_AMDL322B;
|
||||
info->sector_count = 71;
|
||||
info->size = 0x00400000; break; /* => 4 MB */
|
||||
|
||||
case (CFG_FLASH_WORD_SIZE)AMD_ID_DL323T:
|
||||
info->flash_id += FLASH_AMDL323T;
|
||||
info->flash_id += FLASH_AMDL323T;
|
||||
info->sector_count = 71;
|
||||
info->size = 0x00400000; break; /* => 4 MB */
|
||||
|
||||
case (CFG_FLASH_WORD_SIZE)AMD_ID_DL323B:
|
||||
info->flash_id += FLASH_AMDL323B;
|
||||
info->flash_id += FLASH_AMDL323B;
|
||||
info->sector_count = 71;
|
||||
info->size = 0x00400000; break; /* => 4 MB */
|
||||
|
||||
case (CFG_FLASH_WORD_SIZE)AMD_ID_LV640U:
|
||||
info->flash_id += FLASH_AM640U;
|
||||
info->flash_id += FLASH_AM640U;
|
||||
info->sector_count = 128;
|
||||
info->size = 0x00800000; break; /* => 8 MB */
|
||||
|
||||
|
@ -346,11 +346,11 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
|
|||
}
|
||||
|
||||
/* set up sector start address table */
|
||||
if (((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST) ||
|
||||
if (((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AM640U)) {
|
||||
for (i = 0; i < info->sector_count; i++)
|
||||
info->start[i] = base + (i * 0x00010000);
|
||||
} else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322B) ||
|
||||
} else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322B) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL323B) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320B) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL324B)) {
|
||||
|
@ -364,7 +364,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
|
|||
base += 64 << 10;
|
||||
++i;
|
||||
}
|
||||
} else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322T) ||
|
||||
} else if (((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL322T) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL323T) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AM320T) ||
|
||||
((info->flash_id & FLASH_TYPEMASK) == FLASH_AMDL324T)) {
|
||||
|
@ -381,13 +381,13 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
|
|||
--i;
|
||||
info->start[i] = base;
|
||||
}
|
||||
} else if ((info->flash_id & FLASH_TYPEMASK) == FLASH_STMW320DT) {
|
||||
} else if ((info->flash_id & FLASH_TYPEMASK) == FLASH_STMW320DT) {
|
||||
/* set sector offsets for top boot block type */
|
||||
base += info->size;
|
||||
i = info->sector_count;
|
||||
/* 1 x 16k boot sector */
|
||||
/* 1 x 16k boot sector */
|
||||
base -= 16 << 10;
|
||||
--i;
|
||||
--i;
|
||||
info->start[i] = base;
|
||||
/* 2 x 8k boot sectors */
|
||||
for (n=0; n<2; ++n) {
|
||||
|
@ -395,9 +395,9 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
|
|||
--i;
|
||||
info->start[i] = base;
|
||||
}
|
||||
/* 1 x 32k boot sector */
|
||||
/* 1 x 32k boot sector */
|
||||
base -= 32 << 10;
|
||||
--i;
|
||||
--i;
|
||||
info->start[i] = base;
|
||||
|
||||
while (i > 0) { /* 64k regular sectors */
|
||||
|
@ -405,7 +405,7 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
|
|||
--i;
|
||||
info->start[i] = base;
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
if (info->flash_id & FLASH_BTYPE) {
|
||||
/* set sector offsets for bottom boot block type */
|
||||
info->start[0] = base + 0x00000000;
|
||||
|
@ -432,10 +432,10 @@ static ulong flash_get_size (vu_long *addr, flash_info_t *info)
|
|||
/* read sector protection at sector address, (A7 .. A0) = 0x02 */
|
||||
/* D0 = 1 if protected */
|
||||
addr2 = (volatile CFG_FLASH_WORD_SIZE *)(info->start[i]);
|
||||
if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST)
|
||||
info->protect[i] = 0;
|
||||
else
|
||||
info->protect[i] = addr2[CFG_FLASH_READ2] & 1;
|
||||
if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST)
|
||||
info->protect[i] = 0;
|
||||
else
|
||||
info->protect[i] = addr2[CFG_FLASH_READ2] & 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -459,7 +459,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
|
|||
volatile CFG_FLASH_WORD_SIZE *addr2;
|
||||
int flag, prot, sect, l_sect;
|
||||
ulong start, now, last;
|
||||
int i;
|
||||
int i;
|
||||
|
||||
if ((s_first < 0) || (s_first > s_last)) {
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
|
@ -498,25 +498,25 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
|
|||
for (sect = s_first; sect<=s_last; sect++) {
|
||||
if (info->protect[sect] == 0) { /* not protected */
|
||||
addr2 = (CFG_FLASH_WORD_SIZE *)(info->start[sect]);
|
||||
if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST) {
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00800080;
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
addr2[0] = (CFG_FLASH_WORD_SIZE)0x00500050; /* block erase */
|
||||
for (i=0; i<50; i++)
|
||||
udelay(1000); /* wait 1 ms */
|
||||
} else {
|
||||
if (sect == s_first) {
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00800080;
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
}
|
||||
addr2[0] = (CFG_FLASH_WORD_SIZE)0x00300030; /* sector erase */
|
||||
}
|
||||
if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST) {
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00800080;
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
addr2[0] = (CFG_FLASH_WORD_SIZE)0x00500050; /* block erase */
|
||||
for (i=0; i<50; i++)
|
||||
udelay(1000); /* wait 1 ms */
|
||||
} else {
|
||||
if (sect == s_first) {
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00800080;
|
||||
addr[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
}
|
||||
addr2[0] = (CFG_FLASH_WORD_SIZE)0x00300030; /* sector erase */
|
||||
}
|
||||
l_sect = sect;
|
||||
}
|
||||
}
|
||||
|
@ -637,42 +637,42 @@ int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
|
|||
*/
|
||||
static int write_word (flash_info_t *info, ulong dest, ulong data)
|
||||
{
|
||||
volatile CFG_FLASH_WORD_SIZE *addr2 = (CFG_FLASH_WORD_SIZE *)(info->start[0]);
|
||||
volatile CFG_FLASH_WORD_SIZE *dest2 = (CFG_FLASH_WORD_SIZE *)dest;
|
||||
volatile CFG_FLASH_WORD_SIZE *data2 = (CFG_FLASH_WORD_SIZE *)&data;
|
||||
volatile CFG_FLASH_WORD_SIZE *addr2 = (CFG_FLASH_WORD_SIZE *)(info->start[0]);
|
||||
volatile CFG_FLASH_WORD_SIZE *dest2 = (CFG_FLASH_WORD_SIZE *)dest;
|
||||
volatile CFG_FLASH_WORD_SIZE *data2 = (CFG_FLASH_WORD_SIZE *)&data;
|
||||
ulong start;
|
||||
int flag;
|
||||
int i;
|
||||
int i;
|
||||
|
||||
/* Check if Flash is (sufficiently) erased */
|
||||
if ((*((volatile CFG_FLASH_WORD_SIZE *)dest) &
|
||||
(CFG_FLASH_WORD_SIZE)data) != (CFG_FLASH_WORD_SIZE)data) {
|
||||
(CFG_FLASH_WORD_SIZE)data) != (CFG_FLASH_WORD_SIZE)data) {
|
||||
return (2);
|
||||
}
|
||||
/* Disable interrupts which might cause a timeout here */
|
||||
flag = disable_interrupts();
|
||||
|
||||
for (i=0; i<4/sizeof(CFG_FLASH_WORD_SIZE); i++)
|
||||
{
|
||||
addr2[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr2[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
addr2[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00A000A0;
|
||||
for (i=0; i<4/sizeof(CFG_FLASH_WORD_SIZE); i++)
|
||||
{
|
||||
addr2[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00AA00AA;
|
||||
addr2[CFG_FLASH_ADDR1] = (CFG_FLASH_WORD_SIZE)0x00550055;
|
||||
addr2[CFG_FLASH_ADDR0] = (CFG_FLASH_WORD_SIZE)0x00A000A0;
|
||||
|
||||
dest2[i] = data2[i];
|
||||
dest2[i] = data2[i];
|
||||
|
||||
/* re-enable interrupts if necessary */
|
||||
if (flag)
|
||||
enable_interrupts();
|
||||
/* re-enable interrupts if necessary */
|
||||
if (flag)
|
||||
enable_interrupts();
|
||||
|
||||
/* data polling for D7 */
|
||||
start = get_timer (0);
|
||||
while ((dest2[i] & (CFG_FLASH_WORD_SIZE)0x00800080) !=
|
||||
(data2[i] & (CFG_FLASH_WORD_SIZE)0x00800080)) {
|
||||
if (get_timer(start) > CFG_FLASH_WRITE_TOUT) {
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* data polling for D7 */
|
||||
start = get_timer (0);
|
||||
while ((dest2[i] & (CFG_FLASH_WORD_SIZE)0x00800080) !=
|
||||
(data2[i] & (CFG_FLASH_WORD_SIZE)0x00800080)) {
|
||||
if (get_timer(start) > CFG_FLASH_WRITE_TOUT) {
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
|
@ -57,16 +57,16 @@
|
|||
#define SET_FPGA(data) out32(GPIO0_OR, data)
|
||||
|
||||
#define FPGA_WRITE_1 { \
|
||||
SET_FPGA(FPGA_PRG | FPGA_DATA); /* set clock to 0 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_DATA); /* set data to 1 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA); /* set clock to 1 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);} /* set data to 1 */
|
||||
SET_FPGA(FPGA_PRG | FPGA_DATA); /* set clock to 0 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_DATA); /* set data to 1 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA); /* set clock to 1 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);} /* set data to 1 */
|
||||
|
||||
#define FPGA_WRITE_0 { \
|
||||
SET_FPGA(FPGA_PRG | FPGA_DATA); /* set clock to 0 */ \
|
||||
SET_FPGA(FPGA_PRG); /* set data to 0 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_CLK); /* set clock to 1 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);} /* set data to 1 */
|
||||
SET_FPGA(FPGA_PRG | FPGA_DATA); /* set clock to 0 */ \
|
||||
SET_FPGA(FPGA_PRG); /* set data to 0 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_CLK); /* set clock to 1 */ \
|
||||
SET_FPGA(FPGA_PRG | FPGA_CLK | FPGA_DATA);} /* set data to 1 */
|
||||
|
||||
#if 0
|
||||
static int fpga_boot (unsigned char *fpgadata, int size)
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
memsetup:
|
||||
/* First setup pll:s to make serial work ok */
|
||||
/* We have a 12 MHz crystal */
|
||||
li t0, SYS_CPUPLL
|
||||
li t1, 0x21 /* 396 MHz */
|
||||
sw t1, 0(t0)
|
||||
sync
|
||||
nop
|
||||
li t0, SYS_CPUPLL
|
||||
li t1, 0x21 /* 396 MHz */
|
||||
sw t1, 0(t0)
|
||||
sync
|
||||
nop
|
||||
|
||||
/* Setup AUX PLL */
|
||||
/* Setup AUX PLL */
|
||||
li t0, SYS_AUXPLL
|
||||
li t1, 8 /* 96 MHz */
|
||||
sw t1, 0(t0) /* aux pll */
|
||||
sync
|
||||
sw t1, 0(t0) /* aux pll */
|
||||
sync
|
||||
|
||||
/* SDCS 0,1 SDRAM */
|
||||
li t0, MEM_SDMODE0
|
||||
|
|
|
@ -27,4 +27,3 @@ TEXT_BASE = 0x018c0000
|
|||
ifeq ($(debug),1)
|
||||
PLATFORM_CPPFLAGS += -DDEBUG
|
||||
endif
|
||||
|
||||
|
|
|
@ -33,17 +33,17 @@ SECTIONS
|
|||
cpu/nios/start.o (.text)
|
||||
*(.text)
|
||||
}
|
||||
__text_end = .;
|
||||
__text_end = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata :
|
||||
. = ALIGN(4);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
}
|
||||
__rodata_end = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
.data :
|
||||
. = ALIGN(4);
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
}
|
||||
|
@ -59,12 +59,11 @@ SECTIONS
|
|||
__u_boot_cmd_end = .;
|
||||
|
||||
__bss_start = .;
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
. = ALIGN(4);
|
||||
.bss :
|
||||
{
|
||||
*(.bss)
|
||||
}
|
||||
. = ALIGN(4);
|
||||
__bss_end = .;
|
||||
}
|
||||
|
||||
|
|
|
@ -120,5 +120,3 @@ _vectors:
|
|||
.long _def_xhandler@h /* Vector 61 */
|
||||
.long _def_xhandler@h /* Vector 62 */
|
||||
.long _def_xhandler@h /* Vector 63 */
|
||||
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ long value( lenVal* plvValue )
|
|||
* Returns: void.
|
||||
*****************************************************************************/
|
||||
void initLenVal( lenVal* plv,
|
||||
long lValue )
|
||||
long lValue )
|
||||
{
|
||||
plv->len = 1;
|
||||
plv->val[0] = (unsigned char)lValue;
|
||||
|
@ -79,8 +79,8 @@ void initLenVal( lenVal* plv,
|
|||
* Returns: short - 0 = mismatch; 1 = equal.
|
||||
*****************************************************************************/
|
||||
short EqualLenVal( lenVal* plvTdoExpected,
|
||||
lenVal* plvTdoCaptured,
|
||||
lenVal* plvTdoMask )
|
||||
lenVal* plvTdoCaptured,
|
||||
lenVal* plvTdoMask )
|
||||
{
|
||||
short sEqual;
|
||||
short sIndex;
|
||||
|
@ -120,8 +120,8 @@ short EqualLenVal( lenVal* plvTdoExpected,
|
|||
* Returns: short - the bit value.
|
||||
*****************************************************************************/
|
||||
short RetBit( lenVal* plv,
|
||||
int iByte,
|
||||
int iBit )
|
||||
int iByte,
|
||||
int iBit )
|
||||
{
|
||||
/* assert( ( iByte >= 0 ) && ( iByte < plv->len ) ); */
|
||||
/* assert( ( iBit >= 0 ) && ( iBit < 8 ) ); */
|
||||
|
@ -139,9 +139,9 @@ short RetBit( lenVal* plv,
|
|||
* Returns: void.
|
||||
*****************************************************************************/
|
||||
void SetBit( lenVal* plv,
|
||||
int iByte,
|
||||
int iBit,
|
||||
short sVal )
|
||||
int iByte,
|
||||
int iBit,
|
||||
short sVal )
|
||||
{
|
||||
unsigned char ucByteVal;
|
||||
unsigned char ucBitMask;
|
||||
|
@ -166,8 +166,8 @@ void SetBit( lenVal* plv,
|
|||
* Returns: void.
|
||||
*****************************************************************************/
|
||||
void addVal( lenVal* plvResVal,
|
||||
lenVal* plvVal1,
|
||||
lenVal* plvVal2 )
|
||||
lenVal* plvVal1,
|
||||
lenVal* plvVal2 )
|
||||
{
|
||||
unsigned char ucCarry;
|
||||
unsigned short usSum;
|
||||
|
@ -204,7 +204,7 @@ void addVal( lenVal* plvResVal,
|
|||
* Returns: void.
|
||||
*****************************************************************************/
|
||||
void readVal( lenVal* plv,
|
||||
short sNumBytes )
|
||||
short sNumBytes )
|
||||
{
|
||||
unsigned char* pucVal;
|
||||
|
||||
|
|
|
@ -114,20 +114,20 @@ extern int filesize;
|
|||
|
||||
#ifdef DEBUG_MODE
|
||||
#define XSVFDBG_PRINTF(iDebugLevel,pzFormat) \
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
printf( pzFormat ); }
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
printf( pzFormat ); }
|
||||
#define XSVFDBG_PRINTF1(iDebugLevel,pzFormat,arg1) \
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
printf( pzFormat, arg1 ); }
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
printf( pzFormat, arg1 ); }
|
||||
#define XSVFDBG_PRINTF2(iDebugLevel,pzFormat,arg1,arg2) \
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
printf( pzFormat, arg1, arg2 ); }
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
printf( pzFormat, arg1, arg2 ); }
|
||||
#define XSVFDBG_PRINTF3(iDebugLevel,pzFormat,arg1,arg2,arg3) \
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
printf( pzFormat, arg1, arg2, arg3 ); }
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
printf( pzFormat, arg1, arg2, arg3 ); }
|
||||
#define XSVFDBG_PRINTLENVAL(iDebugLevel,plenVal) \
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
xsvfPrintLenVal(plenVal); }
|
||||
{ if ( xsvf_iDebugLevel >= iDebugLevel ) \
|
||||
xsvfPrintLenVal(plenVal); }
|
||||
#else /* !DEBUG_MODE */
|
||||
#define XSVFDBG_PRINTF(iDebugLevel,pzFormat)
|
||||
#define XSVFDBG_PRINTF1(iDebugLevel,pzFormat,arg1)
|
||||
|
@ -327,68 +327,68 @@ TXsvfDoCmdFuncPtr xsvf_pfDoCmd[] =
|
|||
#ifdef DEBUG_MODE
|
||||
char* xsvf_pzCommandName[] =
|
||||
{
|
||||
"XCOMPLETE",
|
||||
"XTDOMASK",
|
||||
"XSIR",
|
||||
"XSDR",
|
||||
"XRUNTEST",
|
||||
"Reserved5",
|
||||
"Reserved6",
|
||||
"XREPEAT",
|
||||
"XSDRSIZE",
|
||||
"XSDRTDO",
|
||||
"XSETSDRMASKS",
|
||||
"XSDRINC",
|
||||
"XSDRB",
|
||||
"XSDRC",
|
||||
"XSDRE",
|
||||
"XSDRTDOB",
|
||||
"XSDRTDOC",
|
||||
"XSDRTDOE",
|
||||
"XSTATE",
|
||||
"XENDIR",
|
||||
"XENDDR",
|
||||
"XSIR2",
|
||||
"XCOMMENT",
|
||||
"XWAIT"
|
||||
"XCOMPLETE",
|
||||
"XTDOMASK",
|
||||
"XSIR",
|
||||
"XSDR",
|
||||
"XRUNTEST",
|
||||
"Reserved5",
|
||||
"Reserved6",
|
||||
"XREPEAT",
|
||||
"XSDRSIZE",
|
||||
"XSDRTDO",
|
||||
"XSETSDRMASKS",
|
||||
"XSDRINC",
|
||||
"XSDRB",
|
||||
"XSDRC",
|
||||
"XSDRE",
|
||||
"XSDRTDOB",
|
||||
"XSDRTDOC",
|
||||
"XSDRTDOE",
|
||||
"XSTATE",
|
||||
"XENDIR",
|
||||
"XENDDR",
|
||||
"XSIR2",
|
||||
"XCOMMENT",
|
||||
"XWAIT"
|
||||
};
|
||||
|
||||
char* xsvf_pzErrorName[] =
|
||||
{
|
||||
"No error",
|
||||
"ERROR: Unknown",
|
||||
"ERROR: TDO mismatch",
|
||||
"ERROR: TDO mismatch and exceeded max retries",
|
||||
"ERROR: Unsupported XSVF command",
|
||||
"ERROR: Illegal state specification",
|
||||
"ERROR: Data overflows allocated MAX_LEN buffer size"
|
||||
"No error",
|
||||
"ERROR: Unknown",
|
||||
"ERROR: TDO mismatch",
|
||||
"ERROR: TDO mismatch and exceeded max retries",
|
||||
"ERROR: Unsupported XSVF command",
|
||||
"ERROR: Illegal state specification",
|
||||
"ERROR: Data overflows allocated MAX_LEN buffer size"
|
||||
};
|
||||
|
||||
char* xsvf_pzTapState[] =
|
||||
{
|
||||
"RESET", /* 0x00 */
|
||||
"RUNTEST/IDLE", /* 0x01 */
|
||||
"DRSELECT", /* 0x02 */
|
||||
"DRCAPTURE", /* 0x03 */
|
||||
"DRSHIFT", /* 0x04 */
|
||||
"DREXIT1", /* 0x05 */
|
||||
"DRPAUSE", /* 0x06 */
|
||||
"DREXIT2", /* 0x07 */
|
||||
"DRUPDATE", /* 0x08 */
|
||||
"IRSELECT", /* 0x09 */
|
||||
"IRCAPTURE", /* 0x0A */
|
||||
"IRSHIFT", /* 0x0B */
|
||||
"IREXIT1", /* 0x0C */
|
||||
"IRPAUSE", /* 0x0D */
|
||||
"IREXIT2", /* 0x0E */
|
||||
"IRUPDATE" /* 0x0F */
|
||||
"RESET", /* 0x00 */
|
||||
"RUNTEST/IDLE", /* 0x01 */
|
||||
"DRSELECT", /* 0x02 */
|
||||
"DRCAPTURE", /* 0x03 */
|
||||
"DRSHIFT", /* 0x04 */
|
||||
"DREXIT1", /* 0x05 */
|
||||
"DRPAUSE", /* 0x06 */
|
||||
"DREXIT2", /* 0x07 */
|
||||
"DRUPDATE", /* 0x08 */
|
||||
"IRSELECT", /* 0x09 */
|
||||
"IRCAPTURE", /* 0x0A */
|
||||
"IRSHIFT", /* 0x0B */
|
||||
"IREXIT1", /* 0x0C */
|
||||
"IRPAUSE", /* 0x0D */
|
||||
"IREXIT2", /* 0x0E */
|
||||
"IRUPDATE" /* 0x0F */
|
||||
};
|
||||
#endif /* DEBUG_MODE */
|
||||
|
||||
//#ifdef DEBUG_MODE
|
||||
// FILE* in; /* Legacy DEBUG_MODE file pointer */
|
||||
/*#ifdef DEBUG_MODE */
|
||||
/* FILE* in; /XXX* Legacy DEBUG_MODE file pointer */
|
||||
int xsvf_iDebugLevel;
|
||||
//#endif /* DEBUG_MODE */
|
||||
/*#endif /XXX* DEBUG_MODE */
|
||||
|
||||
/*============================================================================
|
||||
* Utility Functions
|
||||
|
@ -493,7 +493,7 @@ void xsvfTmsTransition( short sTms )
|
|||
* Returns: int - 0 = success; otherwise error.
|
||||
*****************************************************************************/
|
||||
int xsvfGotoTapState( unsigned char* pucTapState,
|
||||
unsigned char ucTargetState )
|
||||
unsigned char ucTargetState )
|
||||
{
|
||||
int i;
|
||||
int iErrorCode;
|
||||
|
@ -708,9 +708,9 @@ int xsvfGotoTapState( unsigned char* pucTapState,
|
|||
* Returns: void.
|
||||
*****************************************************************************/
|
||||
void xsvfShiftOnly( long lNumBits,
|
||||
lenVal* plvTdi,
|
||||
lenVal* plvTdoCaptured,
|
||||
int iExitShift )
|
||||
lenVal* plvTdi,
|
||||
lenVal* plvTdoCaptured,
|
||||
int iExitShift )
|
||||
{
|
||||
unsigned char* pucTdi;
|
||||
unsigned char* pucTdo;
|
||||
|
@ -796,15 +796,15 @@ void xsvfShiftOnly( long lNumBits,
|
|||
* is NOT all zeros and sMatch==1.
|
||||
*****************************************************************************/
|
||||
int xsvfShift( unsigned char* pucTapState,
|
||||
unsigned char ucStartState,
|
||||
long lNumBits,
|
||||
lenVal* plvTdi,
|
||||
lenVal* plvTdoCaptured,
|
||||
lenVal* plvTdoExpected,
|
||||
lenVal* plvTdoMask,
|
||||
unsigned char ucEndState,
|
||||
long lRunTestTime,
|
||||
unsigned char ucMaxRepeat )
|
||||
unsigned char ucStartState,
|
||||
long lNumBits,
|
||||
lenVal* plvTdi,
|
||||
lenVal* plvTdoCaptured,
|
||||
lenVal* plvTdoExpected,
|
||||
lenVal* plvTdoMask,
|
||||
unsigned char ucEndState,
|
||||
long lRunTestTime,
|
||||
unsigned char ucMaxRepeat )
|
||||
{
|
||||
int iErrorCode;
|
||||
int iMismatch;
|
||||
|
@ -935,15 +935,15 @@ int xsvfShift( unsigned char* pucTapState,
|
|||
* Returns: int - 0 = success; otherwise TDO mismatch.
|
||||
*****************************************************************************/
|
||||
int xsvfBasicXSDRTDO( unsigned char* pucTapState,
|
||||
long lShiftLengthBits,
|
||||
short sShiftLengthBytes,
|
||||
lenVal* plvTdi,
|
||||
lenVal* plvTdoCaptured,
|
||||
lenVal* plvTdoExpected,
|
||||
lenVal* plvTdoMask,
|
||||
unsigned char ucEndState,
|
||||
long lRunTestTime,
|
||||
unsigned char ucMaxRepeat )
|
||||
long lShiftLengthBits,
|
||||
short sShiftLengthBytes,
|
||||
lenVal* plvTdi,
|
||||
lenVal* plvTdoCaptured,
|
||||
lenVal* plvTdoExpected,
|
||||
lenVal* plvTdoMask,
|
||||
unsigned char ucEndState,
|
||||
long lRunTestTime,
|
||||
unsigned char ucMaxRepeat )
|
||||
{
|
||||
readVal( plvTdi, sShiftLengthBytes );
|
||||
if ( plvTdoExpected )
|
||||
|
@ -968,9 +968,9 @@ int xsvfBasicXSDRTDO( unsigned char* pucTapState,
|
|||
*****************************************************************************/
|
||||
#ifdef XSVF_SUPPORT_COMPRESSION
|
||||
void xsvfDoSDRMasking( lenVal* plvTdi,
|
||||
lenVal* plvNextData,
|
||||
lenVal* plvAddressMask,
|
||||
lenVal* plvDataMask )
|
||||
lenVal* plvNextData,
|
||||
lenVal* plvAddressMask,
|
||||
lenVal* plvDataMask )
|
||||
{
|
||||
int i;
|
||||
unsigned char ucTdi;
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
/*
|
||||
* (C) Copyright 2003
|
||||
* Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
* File: micro.h
|
||||
* Description: This header file contains the function prototype to the
|
||||
* primary interface function for the XSVF player.
|
||||
* Usage: FIRST - PORTS.C
|
||||
* Customize the ports.c function implementations to establish
|
||||
* the correct protocol for communicating with your JTAG ports
|
||||
* (setPort() and readTDOBit()) and tune the waitTime() delay
|
||||
* function. Also, establish access to the XSVF data source
|
||||
* in the readByte() function.
|
||||
* FINALLY - Call xsvfExecute().
|
||||
*****************************************************************************/
|
||||
#ifndef XSVF_MICRO_H
|
||||
#define XSVF_MICRO_H
|
||||
|
||||
/* Legacy error codes for xsvfExecute from original XSVF player v2.0 */
|
||||
#define XSVF_LEGACY_SUCCESS 1
|
||||
#define XSVF_LEGACY_ERROR 0
|
||||
|
||||
/* 4.04 [NEW] Error codes for xsvfExecute. */
|
||||
/* Must #define XSVF_SUPPORT_ERRORCODES in micro.c to get these codes */
|
||||
#define XSVF_ERROR_NONE 0
|
||||
#define XSVF_ERROR_UNKNOWN 1
|
||||
#define XSVF_ERROR_TDOMISMATCH 2
|
||||
#define XSVF_ERROR_MAXRETRIES 3 /* TDO mismatch after max retries */
|
||||
#define XSVF_ERROR_ILLEGALCMD 4
|
||||
#define XSVF_ERROR_ILLEGALSTATE 5
|
||||
#define XSVF_ERROR_DATAOVERFLOW 6 /* Data > lenVal MAX_LEN buffer size*/
|
||||
/* Insert new errors here */
|
||||
#define XSVF_ERROR_LAST 7
|
||||
|
||||
/*****************************************************************************
|
||||
* Function: xsvfExecute
|
||||
* Description: Process, interpret, and apply the XSVF commands.
|
||||
* See port.c:readByte for source of XSVF data.
|
||||
* Parameters: none.
|
||||
* Returns: int - For error codes see above.
|
||||
*****************************************************************************/
|
||||
int xsvfExecute(void);
|
||||
|
||||
#endif /* XSVF_MICRO_H */
|
||||
/*
|
||||
* (C) Copyright 2003
|
||||
* Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/*****************************************************************************
|
||||
* File: micro.h
|
||||
* Description: This header file contains the function prototype to the
|
||||
* primary interface function for the XSVF player.
|
||||