mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
drivers/mmc: fix lba param to int
mmc_read_blocks()/mmc_write_blocks() derived from io_block_ops_t type. It means that lba param should be integer type, not unsigned integer type. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
This commit is contained in:
parent
e74dc940c6
commit
ea315a69de
2 changed files with 12 additions and 13 deletions
|
@ -481,7 +481,7 @@ static int mmc_enumerate(unsigned int clk, unsigned int bus_width)
|
||||||
return mmc_set_ios(clk, bus_width);
|
return mmc_set_ios(clk, bus_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t mmc_read_blocks(unsigned int lba, uintptr_t buf, size_t size)
|
size_t mmc_read_blocks(int lba, uintptr_t buf, size_t size)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int cmd_idx, cmd_arg;
|
unsigned int cmd_idx, cmd_arg;
|
||||||
|
@ -548,7 +548,7 @@ size_t mmc_read_blocks(unsigned int lba, uintptr_t buf, size_t size)
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t mmc_write_blocks(unsigned int lba, const uintptr_t buf, size_t size)
|
size_t mmc_write_blocks(int lba, const uintptr_t buf, size_t size)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int cmd_idx, cmd_arg;
|
unsigned int cmd_idx, cmd_arg;
|
||||||
|
@ -615,7 +615,7 @@ size_t mmc_write_blocks(unsigned int lba, const uintptr_t buf, size_t size)
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t mmc_erase_blocks(unsigned int lba, size_t size)
|
size_t mmc_erase_blocks(int lba, size_t size)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -661,7 +661,7 @@ static inline void mmc_rpmb_disable(void)
|
||||||
PART_CFG_BOOT_PARTITION1_ENABLE);
|
PART_CFG_BOOT_PARTITION1_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t mmc_rpmb_read_blocks(unsigned int lba, uintptr_t buf, size_t size)
|
size_t mmc_rpmb_read_blocks(int lba, uintptr_t buf, size_t size)
|
||||||
{
|
{
|
||||||
size_t size_read;
|
size_t size_read;
|
||||||
|
|
||||||
|
@ -672,7 +672,7 @@ size_t mmc_rpmb_read_blocks(unsigned int lba, uintptr_t buf, size_t size)
|
||||||
return size_read;
|
return size_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t mmc_rpmb_write_blocks(unsigned int lba, const uintptr_t buf, size_t size)
|
size_t mmc_rpmb_write_blocks(int lba, const uintptr_t buf, size_t size)
|
||||||
{
|
{
|
||||||
size_t size_written;
|
size_t size_written;
|
||||||
|
|
||||||
|
@ -683,7 +683,7 @@ size_t mmc_rpmb_write_blocks(unsigned int lba, const uintptr_t buf, size_t size)
|
||||||
return size_written;
|
return size_written;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t mmc_rpmb_erase_blocks(unsigned int lba, size_t size)
|
size_t mmc_rpmb_erase_blocks(int lba, size_t size)
|
||||||
{
|
{
|
||||||
size_t size_erased;
|
size_t size_erased;
|
||||||
|
|
||||||
|
|
|
@ -208,13 +208,12 @@ struct mmc_device_info {
|
||||||
enum mmc_device_type mmc_dev_type; /* Type of MMC */
|
enum mmc_device_type mmc_dev_type; /* Type of MMC */
|
||||||
};
|
};
|
||||||
|
|
||||||
size_t mmc_read_blocks(unsigned int lba, uintptr_t buf, size_t size);
|
size_t mmc_read_blocks(int lba, uintptr_t buf, size_t size);
|
||||||
size_t mmc_write_blocks(unsigned int lba, const uintptr_t buf, size_t size);
|
size_t mmc_write_blocks(int lba, const uintptr_t buf, size_t size);
|
||||||
size_t mmc_erase_blocks(unsigned int lba, size_t size);
|
size_t mmc_erase_blocks(int lba, size_t size);
|
||||||
size_t mmc_rpmb_read_blocks(unsigned int lba, uintptr_t buf, size_t size);
|
size_t mmc_rpmb_read_blocks(int lba, uintptr_t buf, size_t size);
|
||||||
size_t mmc_rpmb_write_blocks(unsigned int lba, const uintptr_t buf,
|
size_t mmc_rpmb_write_blocks(int lba, const uintptr_t buf, size_t size);
|
||||||
size_t size);
|
size_t mmc_rpmb_erase_blocks(int lba, size_t size);
|
||||||
size_t mmc_rpmb_erase_blocks(unsigned int lba, size_t size);
|
|
||||||
int mmc_init(const struct mmc_ops *ops_ptr, unsigned int clk,
|
int mmc_init(const struct mmc_ops *ops_ptr, unsigned int clk,
|
||||||
unsigned int width, unsigned int flags,
|
unsigned int width, unsigned int flags,
|
||||||
struct mmc_device_info *device_info);
|
struct mmc_device_info *device_info);
|
||||||
|
|
Loading…
Add table
Reference in a new issue