/external/u-boot/drivers/mmc/ |
D | mmc_write.c | 17 static ulong mmc_erase_t(struct mmc *mmc, ulong start, lbaint_t blkcnt) in mmc_erase_t() argument 24 end = start + blkcnt - 1; in mmc_erase_t() 26 end = (start + blkcnt - 1) * mmc->write_bl_len; in mmc_erase_t() 69 ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt) in mmc_berase() argument 71 ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt) in mmc_berase() 98 err = div_u64_rem(blkcnt, mmc->erase_grp_size, &blkcnt_rem); in mmc_berase() 104 ((start + blkcnt + mmc->erase_grp_size) in mmc_berase() 107 while (blk < blkcnt) { in mmc_berase() 109 blk_r = ((blkcnt - blk) > mmc->ssr.au) ? in mmc_berase() 110 mmc->ssr.au : (blkcnt - blk); in mmc_berase() [all …]
|
D | mmc_private.h | 23 ulong mmc_bread(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, 26 ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, 33 ulong mmc_bwrite(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, 35 ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt); 37 ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, 39 ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt); 48 lbaint_t start, lbaint_t blkcnt) in mmc_berase() argument 54 lbaint_t blkcnt, const void *src) in mmc_bwrite() argument 60 lbaint_t start, lbaint_t blkcnt) in mmc_berase() argument 66 lbaint_t blkcnt, const void *src) in mmc_bwrite() argument
|
/external/u-boot/include/ |
D | blk.h | 97 lbaint_t blkcnt, 101 lbaint_t blkcnt, 105 lbaint_t blkcnt); 128 lbaint_t start, lbaint_t blkcnt, 144 lbaint_t start, lbaint_t blkcnt, 185 lbaint_t start, lbaint_t blkcnt, in blkcache_read() argument 192 lbaint_t start, lbaint_t blkcnt, in blkcache_fill() argument 215 lbaint_t blkcnt, void *buffer); 228 lbaint_t blkcnt, const void *buffer); 240 lbaint_t blkcnt); [all …]
|
D | ide.h | 25 ulong ide_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, 27 ulong ide_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, 30 ulong ide_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, 32 ulong ide_write(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt,
|
D | usb_mass_storage.h | 19 ulong start, lbaint_t blkcnt, void *buf); 21 ulong start, lbaint_t blkcnt, const void *buf);
|
D | sata.h | 9 ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer); 10 ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer);
|
/external/u-boot/drivers/block/ |
D | blkcache.c | 19 lbaint_t blkcnt; member 32 lbaint_t start, lbaint_t blkcnt, in cache_find() argument 42 (node->start + node->blkcnt >= start + blkcnt)) { in cache_find() 54 lbaint_t start, lbaint_t blkcnt, in blkcache_read() argument 58 blkcnt, blksz); in blkcache_read() 61 memcpy(buffer, src, blksz * blkcnt); in blkcache_read() 63 start, blkcnt); in blkcache_read() 69 start, blkcnt); in blkcache_read() 75 lbaint_t start, lbaint_t blkcnt, in blkcache_fill() argument 82 if (blkcnt > _stats.max_blocks_per_entry) in blkcache_fill() [all …]
|
D | blk-uclass.c | 284 lbaint_t blkcnt, void *buffer) in blk_read_devnum() argument 293 n = blk_dread(desc, start, blkcnt, buffer); in blk_read_devnum() 301 lbaint_t blkcnt, const void *buffer) in blk_write_devnum() argument 309 return blk_dwrite(desc, start, blkcnt, buffer); in blk_write_devnum() 405 lbaint_t blkcnt, void *buffer) in blk_dread() argument 415 start, blkcnt, block_dev->blksz, buffer)) in blk_dread() 416 return blkcnt; in blk_dread() 417 blks_read = ops->read(dev, start, blkcnt, buffer); in blk_dread() 418 if (blks_read == blkcnt) in blk_dread() 420 start, blkcnt, block_dev->blksz, buffer); in blk_dread() [all …]
|
D | sandbox.c | 33 unsigned long start, lbaint_t blkcnt, argument 41 unsigned long start, lbaint_t blkcnt, 56 ssize_t len = os_read(host_dev->fd, buffer, blkcnt * block_dev->blksz); 64 unsigned long start, lbaint_t blkcnt, argument 71 unsigned long start, lbaint_t blkcnt, 83 ssize_t len = os_write(host_dev->fd, buffer, blkcnt * block_dev->blksz);
|
D | ide.c | 409 ulong atapi_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, in atapi_read() argument 418 " buffer at %lX\n", device, blknr, blkcnt, (ulong) buffer); in atapi_read() 421 if (blkcnt > ATAPI_READ_MAX_BLOCK) in atapi_read() 424 cnt = blkcnt; in atapi_read() 446 blkcnt -= cnt; in atapi_read() 449 } while (blkcnt > 0); in atapi_read() 931 ulong ide_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, in ide_read() argument 934 ulong ide_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, in ide_read() 955 device, blknr, blkcnt, (ulong) buffer); in ide_read() 988 while (blkcnt-- > 0) { in ide_read() [all …]
|
D | blk_legacy.c | 218 lbaint_t blkcnt, void *buffer) in blk_read_devnum() argument 230 n = desc->block_read(desc, start, blkcnt, buffer); in blk_read_devnum() 238 lbaint_t blkcnt, const void *buffer) in blk_write_devnum() argument 249 return desc->block_write(desc, start, blkcnt, buffer); in blk_write_devnum()
|
/external/u-boot/lib/ |
D | image-sparse.c | 53 lbaint_t blkcnt; in write_sparse_image() local 133 blkcnt = chunk_data_sz / info->blksz; in write_sparse_image() 143 if (blk + blkcnt > info->start + info->size) { in write_sparse_image() 152 blks = info->write(info, blk, blkcnt, data); in write_sparse_image() 154 if (blks < blkcnt) { in write_sparse_image() 162 bytes_written += blkcnt * info->blksz; in write_sparse_image() 194 if (blk + blkcnt > info->start + info->size) { in write_sparse_image() 203 for (i = 0; i < blkcnt;) { in write_sparse_image() 204 j = blkcnt - i; in write_sparse_image() 222 bytes_written += blkcnt * info->blksz; in write_sparse_image() [all …]
|
/external/u-boot/drivers/fastboot/ |
D | fb_mmc.c | 58 lbaint_t blkcnt, const void *buffer) in fb_mmc_blk_write() argument 66 for (i = 0; i < blkcnt; i += FASTBOOT_MAX_BLK_WRITE) { in fb_mmc_blk_write() 67 cur_blkcnt = min((int)blkcnt - i, FASTBOOT_MAX_BLK_WRITE); in fb_mmc_blk_write() 85 lbaint_t blk, lbaint_t blkcnt, const void *buffer) in fb_mmc_sparse_write() argument 90 return fb_mmc_blk_write(dev_desc, blk, blkcnt, buffer); in fb_mmc_sparse_write() 94 lbaint_t blk, lbaint_t blkcnt) in fb_mmc_sparse_reserve() argument 96 return blkcnt; in fb_mmc_sparse_reserve() 103 lbaint_t blkcnt; in write_raw_image() local 107 blkcnt = ((download_bytes + (info->blksz - 1)) & ~(info->blksz - 1)); in write_raw_image() 108 blkcnt = lldiv(blkcnt, info->blksz); in write_raw_image() [all …]
|
D | fb_nand.c | 106 lbaint_t blk, lbaint_t blkcnt, const void *buffer) in fb_nand_sparse_write() argument 114 blkcnt * info->blksz, &written); in fb_nand_sparse_write() 130 lbaint_t blk, lbaint_t blkcnt) in fb_nand_sparse_reserve() argument 145 return blkcnt + bad_blocks; in fb_nand_sparse_reserve()
|
/external/u-boot/lib/efi_driver/ |
D | efi_block_device.c | 55 static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, in efi_bl_read() argument 63 __func__, dev->name, blknr, blkcnt); in efi_bl_read() 66 (efi_uintn_t)blkcnt * in efi_bl_read() 72 return blkcnt; in efi_bl_read() 84 static ulong efi_bl_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, in efi_bl_write() argument 92 __func__, dev->name, blknr, blkcnt); in efi_bl_write() 95 (efi_uintn_t)blkcnt * in efi_bl_write() 102 return blkcnt; in efi_bl_write()
|
/external/u-boot/drivers/ata/ |
D | dwc_ahsata.c | 550 u32 blkcnt, u8 *buffer, int is_write) in dwc_ahsata_rw_cmd() argument 570 cfis->sector_count = (u8)(blkcnt & 0xff); in dwc_ahsata_rw_cmd() 573 ATA_SECT_SIZE * blkcnt, is_write) > 0) in dwc_ahsata_rw_cmd() 574 return blkcnt; in dwc_ahsata_rw_cmd() 595 lbaint_t blkcnt, u8 *buffer, int is_write) in dwc_ahsata_rw_cmd_ext() argument 619 cfis->sector_count_exp = (blkcnt >> 8) & 0xff; in dwc_ahsata_rw_cmd_ext() 620 cfis->sector_count = blkcnt & 0xff; in dwc_ahsata_rw_cmd_ext() 623 ATA_SECT_SIZE * blkcnt, is_write) > 0) in dwc_ahsata_rw_cmd_ext() 624 return blkcnt; in dwc_ahsata_rw_cmd_ext() 655 lbaint_t blkcnt, const void *buffer, in ata_low_level_rw_lba48() argument [all …]
|
D | fsl_sata.c | 536 static u32 fsl_sata_rw_cmd(int dev, u32 start, u32 blkcnt, u8 *buffer, int is_write) in fsl_sata_rw_cmd() argument 555 cfis->sector_count = (u8)(blkcnt & 0xff); in fsl_sata_rw_cmd() 557 fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, buffer, ATA_SECT_SIZE * blkcnt); in fsl_sata_rw_cmd() 558 return blkcnt; in fsl_sata_rw_cmd() 575 static u32 fsl_sata_rw_cmd_ext(int dev, u32 start, u32 blkcnt, u8 *buffer, int is_write) in fsl_sata_rw_cmd_ext() argument 598 cfis->sector_count_exp = (blkcnt >> 8) & 0xff; in fsl_sata_rw_cmd_ext() 599 cfis->sector_count = blkcnt & 0xff; in fsl_sata_rw_cmd_ext() 601 fsl_sata_exec_cmd(sata, cfis, CMD_ATA, 0, buffer, ATA_SECT_SIZE * blkcnt); in fsl_sata_rw_cmd_ext() 602 return blkcnt; in fsl_sata_rw_cmd_ext() 605 static u32 fsl_sata_rw_ncq_cmd(int dev, u32 start, u32 blkcnt, u8 *buffer, in fsl_sata_rw_ncq_cmd() argument [all …]
|
D | sata_sil.c | 266 static ulong sil_sata_rw_cmd(int dev, ulong start, ulong blkcnt, in sil_sata_rw_cmd() argument 293 pcmd->prb.fis.sector_count = (u8)blkcnt & 0xff; in sil_sata_rw_cmd() 296 pcmd->sge.cnt = cpu_to_le32(blkcnt * ATA_SECT_SIZE); in sil_sata_rw_cmd() 308 return blkcnt; in sil_sata_rw_cmd() 311 static ulong sil_sata_rw_cmd_ext(int dev, ulong start, ulong blkcnt, in sil_sata_rw_cmd_ext() argument 340 pcmd->prb.fis.sector_count_exp = (blkcnt >> 8) & 0xff; in sil_sata_rw_cmd_ext() 341 pcmd->prb.fis.sector_count = blkcnt & 0xff; in sil_sata_rw_cmd_ext() 344 pcmd->sge.cnt = cpu_to_le32(blkcnt * ATA_SECT_SIZE); in sil_sata_rw_cmd_ext() 356 return blkcnt; in sil_sata_rw_cmd_ext() 359 static ulong sil_sata_rw_lba28(int dev, ulong blknr, lbaint_t blkcnt, in sil_sata_rw_lba28() argument [all …]
|
D | sata.c | 62 lbaint_t blkcnt, void *dst) in sata_bread() argument 68 lbaint_t blkcnt, const void *buffer) in sata_bwrite() argument 74 lbaint_t blkcnt, void *dst) in sata_bread() argument 76 return sata_read(block_dev->devnum, start, blkcnt, dst); in sata_bread() 80 lbaint_t blkcnt, const void *buffer) in sata_bwrite() argument 82 return sata_write(block_dev->devnum, start, blkcnt, buffer); in sata_bwrite()
|
D | sata_mv.c | 657 static u32 mv_sata_rw_cmd_ext(int port, lbaint_t start, u32 blkcnt, in mv_sata_rw_cmd_ext() argument 678 cfis.sector_count_exp = (blkcnt >> 8) & 0xff; in mv_sata_rw_cmd_ext() 679 cfis.sector_count = blkcnt & 0xff; in mv_sata_rw_cmd_ext() 681 res = mv_ata_exec_ata_cmd(port, &cfis, buffer, ATA_SECT_SIZE * blkcnt, in mv_sata_rw_cmd_ext() 684 return res >= 0 ? blkcnt : res; in mv_sata_rw_cmd_ext() 687 static u32 mv_sata_rw_cmd(int port, lbaint_t start, u32 blkcnt, u8 *buffer, in mv_sata_rw_cmd() argument 706 cfis.sector_count = (u8)(blkcnt & 0xff); in mv_sata_rw_cmd() 708 res = mv_ata_exec_ata_cmd(port, &cfis, buffer, ATA_SECT_SIZE * blkcnt, in mv_sata_rw_cmd() 711 return res >= 0 ? blkcnt : res; in mv_sata_rw_cmd() 714 static u32 ata_low_level_rw(int dev, lbaint_t blknr, lbaint_t blkcnt, in ata_low_level_rw() argument [all …]
|
D | sata_sandbox.c | 24 ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer) in sata_read() argument 29 ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer) in sata_write() argument
|
D | sata_sil3114.c | 436 static u8 do_one_read (int device, ulong block, u8 blkcnt, u16 * buff, in do_one_read() argument 459 writeb (blkcnt, port[device].ioaddr.nsect_addr); in do_one_read() 487 while (blkcnt--) { in do_one_read() 509 ulong sata_read (int device, ulong block, lbaint_t blkcnt, void *buff) in sata_read() argument 528 while (blkcnt > 0) { in sata_read() 530 if (blkcnt > 255) { in sata_read() 533 sread = blkcnt; in sata_read() 542 blkcnt -= sread; in sata_read() 550 ulong sata_write (int device, ulong block, lbaint_t blkcnt, const void *buff) in sata_write() argument 571 while (blkcnt-- > 0) { in sata_write()
|
/external/u-boot/common/ |
D | usb_storage.c | 117 lbaint_t blkcnt, void *buffer); 119 lbaint_t blkcnt, const void *buffer); 122 lbaint_t blkcnt, void *buffer); 124 lbaint_t blkcnt, const void *buffer); 1127 lbaint_t blkcnt, void *buffer) in usb_stor_read() argument 1130 lbaint_t blkcnt, void *buffer) in usb_stor_read() 1144 if (blkcnt == 0) in usb_stor_read() 1165 blks = blkcnt; in usb_stor_read() 1188 blkcnt -= blks; in usb_stor_read() 1202 if (blkcnt >= ss->max_xfer_blk) in usb_stor_read() [all …]
|
/external/u-boot/drivers/scsi/ |
D | scsi.c | 145 static ulong scsi_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, in scsi_read() argument 149 lbaint_t blkcnt, void *buffer) in scsi_read() 168 blks = blkcnt; in scsi_read() 203 blkcnt -= blks; in scsi_read() 210 return blkcnt; in scsi_read() 221 static ulong scsi_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, in scsi_write() argument 225 lbaint_t blkcnt, const void *buffer) in scsi_write() 244 blks = blkcnt; in scsi_write() 267 blkcnt -= blks; in scsi_write() 274 return blkcnt; in scsi_write()
|
/external/u-boot/cmd/ |
D | usb_mass_storage.c | 19 ulong start, lbaint_t blkcnt, void *buf) in ums_read_sector() argument 24 return blk_dread(block_dev, blkstart, blkcnt, buf); in ums_read_sector() 28 ulong start, lbaint_t blkcnt, const void *buf) in ums_write_sector() argument 33 return blk_dwrite(block_dev, blkstart, blkcnt, buf); in ums_write_sector()
|