summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-07-03 07:11:41 -0700
committerTom Rini <trini@ti.com>2013-07-15 17:06:09 -0400
commit4f6aa3468d8090f2de84a869ba54891a4340a1c8 (patch)
tree0cfb22ad460ed5db92d8aa5238c822667c45c826 /common
parent54e458de55a8833519225d728e3be1f84b399a38 (diff)
downloadu-boot-imx-4f6aa3468d8090f2de84a869ba54891a4340a1c8.zip
u-boot-imx-4f6aa3468d8090f2de84a869ba54891a4340a1c8.tar.gz
u-boot-imx-4f6aa3468d8090f2de84a869ba54891a4340a1c8.tar.bz2
scsi: Correct types of scsi_read/write()
The block device expects to see lbaint_t for the blknr parameter. Change the SCSI read/write functions to suit. This fixes the following build warnings for coreboot: cmd_scsi.c: In function ‘scsi_scan’: cmd_scsi.c:119:30: error: assignment from incompatible pointer type [-Werror] cmd_scsi.c:120:32: error: assignment from incompatible pointer type [-Werror] Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_scsi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index 294d9f5..3b59944 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -82,8 +82,9 @@ void scsi_ident_cpy (unsigned char *dest, unsigned char *src, unsigned int len);
static int scsi_read_capacity(ccb *pccb, lbaint_t *capacity,
unsigned long *blksz);
-static ulong scsi_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer);
-static ulong scsi_write(int device, ulong blknr,
+static ulong scsi_read(int device, lbaint_t blknr, lbaint_t blkcnt,
+ void *buffer);
+static ulong scsi_write(int device, lbaint_t blknr,
lbaint_t blkcnt, const void *buffer);
@@ -372,7 +373,8 @@ int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#define SCSI_MAX_READ_BLK 0xFFFF /* almost the maximum amount of the scsi_ext command.. */
-static ulong scsi_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer)
+static ulong scsi_read(int device, lbaint_t blknr, lbaint_t blkcnt,
+ void *buffer)
{
lbaint_t start, blks;
uintptr_t buf_addr;
@@ -427,7 +429,7 @@ static ulong scsi_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer)
/* Almost the maximum amount of the scsi_ext command.. */
#define SCSI_MAX_WRITE_BLK 0xFFFF
-static ulong scsi_write(int device, ulong blknr,
+static ulong scsi_write(int device, lbaint_t blknr,
lbaint_t blkcnt, const void *buffer)
{
lbaint_t start, blks;