diff options
author | wdenk <wdenk> | 2003-10-15 23:53:47 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-10-15 23:53:47 +0000 |
commit | 42d1f0394bef0624fc9664714d54bb137931d6a6 (patch) | |
tree | 892a4130507484d25faf9a72e019cf88cfb3e3d9 /board/esd | |
parent | 2d5b561e2bfdee8552a99b2cf93016cce2a74895 (diff) | |
download | u-boot-imx-42d1f0394bef0624fc9664714d54bb137931d6a6.zip u-boot-imx-42d1f0394bef0624fc9664714d54bb137931d6a6.tar.gz u-boot-imx-42d1f0394bef0624fc9664714d54bb137931d6a6.tar.bz2 |
* 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 cleanup
Diffstat (limited to 'board/esd')
-rw-r--r-- | board/esd/common/xilinx_jtag/lenval.c | 22 | ||||
-rw-r--r-- | board/esd/common/xilinx_jtag/micro.c | 170 | ||||
-rw-r--r-- | board/esd/common/xilinx_jtag/micro.h | 128 | ||||
-rw-r--r-- | board/esd/dp405/dp405.c | 2 |
4 files changed, 161 insertions, 161 deletions
diff --git a/board/esd/common/xilinx_jtag/lenval.c b/board/esd/common/xilinx_jtag/lenval.c index a18a16e..7316266 100644 --- a/board/esd/common/xilinx_jtag/lenval.c +++ b/board/esd/common/xilinx_jtag/lenval.c @@ -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; diff --git a/board/esd/common/xilinx_jtag/micro.c b/board/esd/common/xilinx_jtag/micro.c index f21c235..318f229 100644 --- a/board/esd/common/xilinx_jtag/micro.c +++ b/board/esd/common/xilinx_jtag/micro.c @@ -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; diff --git a/board/esd/common/xilinx_jtag/micro.h b/board/esd/common/xilinx_jtag/micro.h index a68c8d1..3c463ab 100644 --- a/board/esd/common/xilinx_jtag/micro.h +++ b/board/esd/common/xilinx_jtag/micro.h @@ -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. + * 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 */ diff --git a/board/esd/dp405/dp405.c b/board/esd/dp405/dp405.c index 9fc63a7..6d99b60 100644 --- a/board/esd/dp405/dp405.c +++ b/board/esd/dp405/dp405.c @@ -97,7 +97,7 @@ int checkboard (void) unsigned char str[64]; int i = getenv_r ("serial#", str, sizeof(str)); unsigned char trans[16] = {0x0,0x8,0x4,0xc,0x2,0xa,0x6,0xe, - 0x1,0x9,0x5,0xd,0x3,0xb,0x7,0xf}; + 0x1,0x9,0x5,0xd,0x3,0xb,0x7,0xf}; unsigned char id1, id2; puts ("Board: "); |