summaryrefslogtreecommitdiffstats
path: root/board/esd/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-03-09 10:09:53 +0100
committerWolfgang Denk <wd@denx.de>2008-03-09 10:09:53 +0100
commit8d4f4a838d7dc7cf4de17e3e9a67e2f222b6a1c8 (patch)
tree3bc6cba5f4cd05456e44930cba64734aa4d7abce /board/esd/common
parentc6fe4dabac066e8758345d249032768496983a3e (diff)
downloadblackbird-obmc-uboot-8d4f4a838d7dc7cf4de17e3e9a67e2f222b6a1c8.tar.gz
blackbird-obmc-uboot-8d4f4a838d7dc7cf4de17e3e9a67e2f222b6a1c8.zip
esd/common/fpga.c: fix 'assignment of read-only location' error
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/esd/common')
-rw-r--r--board/esd/common/fpga.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/board/esd/common/fpga.c b/board/esd/common/fpga.c
index aab5509bcb..dc9266256a 100644
--- a/board/esd/common/fpga.c
+++ b/board/esd/common/fpga.c
@@ -96,10 +96,10 @@ static int fpga_boot(const unsigned char *fpgadata, int size)
{
int i,index,len;
int count;
+ unsigned char b;
#ifdef CFG_FPGA_SPARTAN2
int j;
#else
- unsigned char b;
int bit;
#endif
@@ -196,9 +196,10 @@ static int fpga_boot(const unsigned char *fpgadata, int size)
*/
for (i=index; i<size; i++)
{
+ b = fpgadata[i];
for (j=0; j<8; j++)
{
- if ((fpgadata[i] & 0x80) == 0x80)
+ if ((b & 0x80) == 0x80)
{
FPGA_WRITE_1;
}
@@ -206,7 +207,7 @@ static int fpga_boot(const unsigned char *fpgadata, int size)
{
FPGA_WRITE_0;
}
- fpgadata[i] <<= 1;
+ b <<= 1;
}
}
#else
OpenPOWER on IntegriCloud