mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-11 13:08:31 -04:00
esd/common/fpga.c: fix 'assignment of read-only location' error
Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
c6fe4dabac
commit
8d4f4a838d
@ -96,10 +96,10 @@ static int fpga_boot(const unsigned char *fpgadata, int size)
|
|||||||
{
|
{
|
||||||
int i,index,len;
|
int i,index,len;
|
||||||
int count;
|
int count;
|
||||||
|
unsigned char b;
|
||||||
#ifdef CFG_FPGA_SPARTAN2
|
#ifdef CFG_FPGA_SPARTAN2
|
||||||
int j;
|
int j;
|
||||||
#else
|
#else
|
||||||
unsigned char b;
|
|
||||||
int bit;
|
int bit;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -196,9 +196,10 @@ static int fpga_boot(const unsigned char *fpgadata, int size)
|
|||||||
*/
|
*/
|
||||||
for (i=index; i<size; i++)
|
for (i=index; i<size; i++)
|
||||||
{
|
{
|
||||||
|
b = fpgadata[i];
|
||||||
for (j=0; j<8; j++)
|
for (j=0; j<8; j++)
|
||||||
{
|
{
|
||||||
if ((fpgadata[i] & 0x80) == 0x80)
|
if ((b & 0x80) == 0x80)
|
||||||
{
|
{
|
||||||
FPGA_WRITE_1;
|
FPGA_WRITE_1;
|
||||||
}
|
}
|
||||||
@ -206,7 +207,7 @@ static int fpga_boot(const unsigned char *fpgadata, int size)
|
|||||||
{
|
{
|
||||||
FPGA_WRITE_0;
|
FPGA_WRITE_0;
|
||||||
}
|
}
|
||||||
fpgadata[i] <<= 1;
|
b <<= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user