diff options
author | Matthias Fuchs <matthias.fuchs@esd-electronics.com> | 2009-04-29 09:50:56 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-06-12 20:39:46 +0200 |
commit | c1b2f79788deec75773b1d944d8aaf4a6d5baf9e (patch) | |
tree | 2b7240147049fa213c6418bba195db68dee757a1 /board/esd/common/xilinx_jtag/ports.c | |
parent | 9166b776350d16460c7330bfb0a50154ea0a1903 (diff) |
esd/common: extend cpld command with address parameter
This patch adds support for an address parameter to esd's
cpld command. This is in preparation to remove compiled-in
binary cpld (xsvf) bitstreams.
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/esd/common/xilinx_jtag/ports.c')
-rw-r--r-- | board/esd/common/xilinx_jtag/ports.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/board/esd/common/xilinx_jtag/ports.c b/board/esd/common/xilinx_jtag/ports.c index ac0d7ac2bb..f039d04c5d 100644 --- a/board/esd/common/xilinx_jtag/ports.c +++ b/board/esd/common/xilinx_jtag/ports.c @@ -42,9 +42,7 @@ static int oldstate = 0; static int newstate = 0; static int readptr = 0; -extern long filesize; -extern const unsigned char fpgadata[]; - +extern const unsigned char *xsvfdata; /* if in debugging mode, then just set the variables */ void setPort(short p,short val) @@ -86,10 +84,10 @@ void pulseClock(void) void readByte(unsigned char *data) { /* pretend reading using a file */ - *data = fpgadata[readptr++]; - newstate = (100 * filepos++) / filesize; + *data = xsvfdata[readptr++]; + newstate = filepos++ >> 10; if (newstate != oldstate) { - printf("%4d\r\r\r\r", newstate); + printf("%4d kB\r\r\r\r", newstate); oldstate = newstate; } } |