3 * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
5 * SPDX-License-Identifier: GPL-2.0+
8 /*******************************************************/
10 /* abstract: This file contains extern declarations */
11 /* for providing stimulus to the JTAG ports.*/
12 /*******************************************************/
17 /* these constants are used to send the appropriate ports to setPort */
18 /* they should be enumerated types, but some of the microcontroller */
19 /* compilers don't like enumerated types */
25 * Use CONFIG_SYS_FPGA_xxx defines from board include file.
27 #define JTAG_TMS CONFIG_SYS_FPGA_PRG /* output */
28 #define JTAG_TCK CONFIG_SYS_FPGA_CLK /* output */
29 #define JTAG_TDI CONFIG_SYS_FPGA_DATA /* output */
30 #define JTAG_TDO CONFIG_SYS_FPGA_DONE /* input */
32 /* set the port "p" (TCK, TMS, or TDI) to val (0 or 1) */
33 void setPort(short p, short val);
35 /* read the TDO bit and store it in val */
36 unsigned char readTDOBit(void);
38 /* make clock go down->up->down*/
39 void pulseClock(void);
41 /* read the next byte of data from the xsvf file */
42 void readByte(unsigned char *data);
44 void waitTime(long microsec);