Patchwork [U-Boot,v3,5/9] fpga: Change the first parameter in fpga_loadbitstream

login
register
mail settings
Submitter Michal Simek
Date May 3, 2013, 7:14 a.m.
Message ID <0e1283363757db10342a5a5a3f3c742db5d54d78.1367565248.git.michal.simek@xilinx.com>
Download mbox | patch
Permalink /patch/241230/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Michal Simek - May 3, 2013, 7:14 a.m.
All fpga functions use devnum as int. Only fpga_loadbitstream
is using it as unsinged long dev.
This patch synchronize it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>

---
Changes in v3:
- New patch in this series

Changes in v2: None

 drivers/fpga/fpga.c   | 2 +-
 drivers/fpga/xilinx.c | 4 ++--
 include/fpga.h        | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

--
1.8.2.1

Patch

diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c
index f0253bf..244f503 100644
--- a/drivers/fpga/fpga.c
+++ b/drivers/fpga/fpga.c
@@ -190,7 +190,7 @@  int fpga_add(fpga_type devtype, void *desc)
 /*
  * Convert bitstream data and load into the fpga
  */
-int __weak fpga_loadbitstream(unsigned long dev, char *fpgadata, size_t size)
+int __weak fpga_loadbitstream(int devnum, char *fpgadata, size_t size)
 {
 	printf("Bitstream support not implemented for this FPGA device\n");
 	return FPGA_FAIL;
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
index 7d0342a..df5f9bf 100644
--- a/drivers/fpga/xilinx.c
+++ b/drivers/fpga/xilinx.c
@@ -48,7 +48,7 @@  static int xilinx_validate (Xilinx_desc * desc, char *fn);

 /* ------------------------------------------------------------------------- */

-int fpga_loadbitstream(unsigned long dev, char *fpgadata, size_t size)
+int fpga_loadbitstream(int devnum, char *fpgadata, size_t size)
 {
 	unsigned int length;
 	unsigned int swapsize;
@@ -131,7 +131,7 @@  int fpga_loadbitstream(unsigned long dev, char *fpgadata, size_t size)
 	dataptr += 4;
 	printf("  bytes in bitstream = %d\n", swapsize);

-	return fpga_load(dev, dataptr, swapsize);
+	return fpga_load(devnum, dataptr, swapsize);
 }

 int xilinx_load(Xilinx_desc *desc, const void *buf, size_t bsize)
diff --git a/include/fpga.h b/include/fpga.h
index 0d01e04..38f62c0 100644
--- a/include/fpga.h
+++ b/include/fpga.h
@@ -68,7 +68,7 @@  extern void fpga_init(void);
 extern int fpga_add(fpga_type devtype, void *desc);
 extern int fpga_count(void);
 extern int fpga_load(int devnum, const void *buf, size_t bsize);
-extern int fpga_loadbitstream(unsigned long dev, char *fpgadata, size_t size);
+extern int fpga_loadbitstream(int devnum, char *fpgadata, size_t size);
 extern int fpga_dump(int devnum, const void *buf, size_t bsize);
 extern int fpga_info(int devnum);