mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-25 21:24:21 +08:00
Fix a bug in the slave serial programming mode for the Xilinx
Spartan2/3 FPGAs. The old code used "< 0" on a "char" type to test if the most significant bit was set, which did not work on any architecture where "char" defaulted to be an unsigned type. Based on a patch by Angelos Manousaridis <amanous@inaccessnetworks.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
d08b7233bc
commit
6ecbb7a3fa
@ -516,7 +516,7 @@ static int Spartan2_ss_load (Xilinx_desc * desc, void *buf, size_t bsize)
|
||||
(*fn->clk) (FALSE, TRUE, cookie);
|
||||
CONFIG_FPGA_DELAY ();
|
||||
/* Write data */
|
||||
(*fn->wr) ((val < 0), TRUE, cookie);
|
||||
(*fn->wr) ((val & 0x80), TRUE, cookie);
|
||||
CONFIG_FPGA_DELAY ();
|
||||
/* Assert the clock */
|
||||
(*fn->clk) (TRUE, TRUE, cookie);
|
||||
|
@ -521,7 +521,7 @@ static int Spartan3_ss_load (Xilinx_desc * desc, void *buf, size_t bsize)
|
||||
(*fn->clk) (FALSE, TRUE, cookie);
|
||||
CONFIG_FPGA_DELAY ();
|
||||
/* Write data */
|
||||
(*fn->wr) ((val < 0), TRUE, cookie);
|
||||
(*fn->wr) ((val & 0x80), TRUE, cookie);
|
||||
CONFIG_FPGA_DELAY ();
|
||||
/* Assert the clock */
|
||||
(*fn->clk) (TRUE, TRUE, cookie);
|
||||
|
Loading…
Reference in New Issue
Block a user