Fix the warnings and some errors.
This commit is contained in:
16
fpga_io.cpp
16
fpga_io.cpp
@@ -131,17 +131,18 @@ static int fpgamgr_test_fpga_ready(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Poll until FPGA is ready to be accessed or timeout occurred */
|
||||
/*
|
||||
// Poll until FPGA is ready to be accessed or timeout occurred
|
||||
static int fpgamgr_poll_fpga_ready(void)
|
||||
{
|
||||
unsigned long i;
|
||||
|
||||
/* If FPGA is blank, wait till WD invoke warm reset */
|
||||
// If FPGA is blank, wait till WD invoke warm reset
|
||||
for (i = 0; i < FPGA_TIMEOUT_CNT; i++) {
|
||||
/* check for init done signal */
|
||||
// check for init done signal
|
||||
if (!is_fpgamgr_initdone_high())
|
||||
continue;
|
||||
/* check again to avoid false glitches */
|
||||
// check again to avoid false glitches
|
||||
if (!is_fpgamgr_initdone_high())
|
||||
continue;
|
||||
return 1;
|
||||
@@ -149,6 +150,7 @@ static int fpgamgr_poll_fpga_ready(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Start the FPGA programming by initialize the FPGA Manager */
|
||||
static int fpgamgr_program_init(void)
|
||||
@@ -431,7 +433,7 @@ static int make_env(const char *name, const char *cfg)
|
||||
*str++ = '=';
|
||||
*str++ = '"';
|
||||
|
||||
for (int i = 0; i < strlen(name); i++)
|
||||
for (uint32_t i = 0; i < strlen(name); i++)
|
||||
{
|
||||
*str++ = name[i];
|
||||
}
|
||||
@@ -479,7 +481,7 @@ int fpga_load_rbf(const char *name, const char *cfg)
|
||||
void *buf = malloc(st.st_size);
|
||||
if (!buf)
|
||||
{
|
||||
printf("Couldn't allocate %d bytes.\n", st.st_size);
|
||||
printf("Couldn't allocate %llu bytes.\n", st.st_size);
|
||||
ret = -1;
|
||||
}
|
||||
else
|
||||
@@ -499,7 +501,7 @@ int fpga_load_rbf(const char *name, const char *cfg)
|
||||
p = (void*)(((uint8_t*)buf) + 16);
|
||||
}
|
||||
do_bridge(0);
|
||||
ret = socfpga_load(buf, st.st_size);
|
||||
ret = socfpga_load(p, sz);
|
||||
if (ret)
|
||||
{
|
||||
printf("Error %d while loading %s\n", ret, path);
|
||||
|
||||
Reference in New Issue
Block a user