mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
fpga: altera: cyclon2: Fix most checkpatch warnings
Nothing special, but done before further cleanup. * spacing * braces * __FUNCTION__ → __func__ Suggested-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Alexander Dahl <ada@thorsis.com>
This commit is contained in:
parent
3b2a595fc6
commit
bb2c0fa03e
1 changed files with 39 additions and 42 deletions
|
@ -41,7 +41,7 @@ int CYC2_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
|
||||
switch (desc->iface) {
|
||||
case passive_serial:
|
||||
PRINTF ("%s: Launching Passive Serial Loader\n", __FUNCTION__);
|
||||
PRINTF("%s: Launching Passive Serial Loader\n", __func__);
|
||||
ret_val = CYC2_ps_load(desc, buf, bsize);
|
||||
break;
|
||||
|
||||
|
@ -51,7 +51,7 @@ int CYC2_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
* function for FPP, too.
|
||||
*/
|
||||
PRINTF("%s: Launching Fast Passive Parallel Loader\n",
|
||||
__FUNCTION__);
|
||||
__func__);
|
||||
ret_val = CYC2_ps_load(desc, buf, bsize);
|
||||
break;
|
||||
|
||||
|
@ -59,7 +59,7 @@ int CYC2_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
|
||||
default:
|
||||
printf("%s: Unsupported interface type, %d\n",
|
||||
__FUNCTION__, desc->iface);
|
||||
__func__, desc->iface);
|
||||
}
|
||||
|
||||
return ret_val;
|
||||
|
@ -71,7 +71,7 @@ int CYC2_dump(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
|
||||
switch (desc->iface) {
|
||||
case passive_serial:
|
||||
PRINTF ("%s: Launching Passive Serial Dump\n", __FUNCTION__);
|
||||
PRINTF("%s: Launching Passive Serial Dump\n", __func__);
|
||||
ret_val = CYC2_ps_dump(desc, buf, bsize);
|
||||
break;
|
||||
|
||||
|
@ -79,7 +79,7 @@ int CYC2_dump(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
|
||||
default:
|
||||
printf("%s: Unsupported interface type, %d\n",
|
||||
__FUNCTION__, desc->iface);
|
||||
__func__, desc->iface);
|
||||
}
|
||||
|
||||
return ret_val;
|
||||
|
@ -99,7 +99,7 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
int ret = 0;
|
||||
|
||||
PRINTF("%s: start with interface functions @ 0x%p\n",
|
||||
__FUNCTION__, fn);
|
||||
__func__, fn);
|
||||
|
||||
if (fn) {
|
||||
int cookie = desc->cookie; /* make a local copy */
|
||||
|
@ -112,7 +112,7 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
"status:\t0x%p\n"
|
||||
"write:\t0x%p\n"
|
||||
"done:\t0x%p\n\n",
|
||||
__FUNCTION__, &fn, fn, fn->config, fn->status,
|
||||
__func__, &fn, fn, fn->config, fn->status,
|
||||
fn->write, fn->done);
|
||||
#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
|
||||
printf("Loading FPGA Device %d...", cookie);
|
||||
|
@ -121,9 +121,8 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
/*
|
||||
* Run the pre configuration function if there is one.
|
||||
*/
|
||||
if (*fn->pre) {
|
||||
if (*fn->pre)
|
||||
(*fn->pre) (cookie);
|
||||
}
|
||||
|
||||
/* Establish the initial state */
|
||||
(*fn->config) (false, true, cookie); /* De-assert nCONFIG */
|
||||
|
@ -136,7 +135,8 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
ts = get_timer(0); /* get current time */
|
||||
do {
|
||||
CONFIG_FPGA_DELAY();
|
||||
if (get_timer (ts) > CONFIG_SYS_FPGA_WAIT) { /* check the time */
|
||||
if (get_timer(ts) > CONFIG_SYS_FPGA_WAIT) {
|
||||
/* check the time */
|
||||
puts("** Timeout waiting for STATUS to go high.\n");
|
||||
(*fn->abort) (cookie);
|
||||
return FPGA_FAIL;
|
||||
|
@ -169,7 +169,7 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
if (!(*fn->done) (cookie)) {
|
||||
puts("** Booting failed! CONF_DONE is still deasserted.\n");
|
||||
(*fn->abort) (cookie);
|
||||
return (FPGA_FAIL);
|
||||
return FPGA_FAIL;
|
||||
}
|
||||
#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
|
||||
puts(" OK\n");
|
||||
|
@ -178,17 +178,15 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
ret_val = FPGA_SUCCESS;
|
||||
|
||||
#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
|
||||
if (ret_val == FPGA_SUCCESS) {
|
||||
if (ret_val == FPGA_SUCCESS)
|
||||
puts("Done.\n");
|
||||
}
|
||||
else {
|
||||
else
|
||||
puts("Fail.\n");
|
||||
}
|
||||
#endif
|
||||
(*fn->post) (cookie);
|
||||
|
||||
} else {
|
||||
printf ("%s: NULL Interface function table!\n", __FUNCTION__);
|
||||
printf("%s: NULL Interface function table!\n", __func__);
|
||||
}
|
||||
|
||||
return ret_val;
|
||||
|
@ -198,7 +196,6 @@ static int CYC2_ps_dump(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
{
|
||||
/* Readback is only available through the Slave Parallel and */
|
||||
/* boundary-scan interfaces. */
|
||||
printf ("%s: Passive Serial Dumping is unavailable\n",
|
||||
__FUNCTION__);
|
||||
printf("%s: Passive Serial Dumping is unavailable\n", __func__);
|
||||
return FPGA_FAIL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue