summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Fuchs <matthias.fuchs@esd.eu>2009-02-15 22:29:15 +0100
committerWolfgang Denk <wd@denx.de>2009-02-21 22:52:44 +0100
commit670cbde8da83690fed1064c3358f54ae1d693ed2 (patch)
treec603b69001af7b9b770ca1f639fd4cd4b1867dab
parent3818b677641038d27b2663fbd6771ad38c932f86 (diff)
downloadu-boot-imx-670cbde8da83690fed1064c3358f54ae1d693ed2.zip
u-boot-imx-670cbde8da83690fed1064c3358f54ae1d693ed2.tar.gz
u-boot-imx-670cbde8da83690fed1064c3358f54ae1d693ed2.tar.bz2
fpga: Fix Spartan III FPGA booting
This patch does some minor fixing of the Xilinx Spartan III FPGA boot code: - Fixed call order of post configuration callback and success message printing (result of copy-paste?) - remove obsolete comment - minor coding style cleanup Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
-rw-r--r--drivers/fpga/spartan3.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/fpga/spartan3.c b/drivers/fpga/spartan3.c
index 9ce41f1..8bb2449 100644
--- a/drivers/fpga/spartan3.c
+++ b/drivers/fpga/spartan3.c
@@ -281,23 +281,18 @@ static int Spartan3_sp_load (Xilinx_desc * desc, void *buf, size_t bsize)
}
}
- if (ret_val == FPGA_SUCCESS) {
-#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
- puts ("Done.\n");
-#endif
- }
/*
* Run the post configuration function if there is one.
*/
- if (*fn->post) {
+ if (*fn->post)
(*fn->post) (cookie);
- }
- else {
#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
+ if (ret_val == FPGA_SUCCESS)
+ puts ("Done.\n");
+ else
puts ("Fail.\n");
#endif
- }
} else {
printf ("%s: NULL Interface function table!\n", __FUNCTION__);
@@ -567,17 +562,14 @@ static int Spartan3_ss_load (Xilinx_desc * desc, void *buf, size_t bsize)
/*
* Run the post configuration function if there is one.
*/
- if (*fn->post) {
+ if (*fn->post)
(*fn->post) (cookie);
- }
#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
} else {