/external/u-boot/disk/ |
D | part.c | 26 static struct part_driver *part_driver_lookup_type(struct blk_desc *dev_desc) in part_driver_lookup_type() argument 33 if (dev_desc->part_type == PART_TYPE_UNKNOWN) { in part_driver_lookup_type() 37 ret = entry->test(dev_desc); in part_driver_lookup_type() 39 dev_desc->part_type = entry->part_type; in part_driver_lookup_type() 45 if (dev_desc->part_type == entry->part_type) in part_driver_lookup_type() 57 struct blk_desc *dev_desc; in get_dev_hwpart() local 60 dev_desc = blk_get_devnum_by_typename(ifname, dev); in get_dev_hwpart() 61 if (!dev_desc) { in get_dev_hwpart() 66 ret = blk_dselect_hwpart(dev_desc, hwpart); in get_dev_hwpart() 73 return dev_desc; in get_dev_hwpart() [all …]
|
D | part_efi.c | 50 static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba, 52 static gpt_entry *alloc_read_gpt_entries(struct blk_desc *dev_desc, 189 int get_disk_guid(struct blk_desc * dev_desc, char *guid) in get_disk_guid() argument 191 ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz); in get_disk_guid() 196 if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA, in get_disk_guid() 199 if (is_gpt_valid(dev_desc, dev_desc->lba - 1, in get_disk_guid() 216 void part_print_efi(struct blk_desc *dev_desc) in part_print_efi() argument 218 ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz); in part_print_efi() 225 if (is_gpt_valid(dev_desc, GPT_PRIMARY_PARTITION_TABLE_LBA, in part_print_efi() 228 if (is_gpt_valid(dev_desc, (dev_desc->lba - 1), in part_print_efi() [all …]
|
D | part_iso.c | 48 int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num, in part_get_info_iso_verb() argument 60 if ((dev_desc->blksz != CD_SECTSIZE) && (dev_desc->blksz != 512)) in part_get_info_iso_verb() 65 if (iso_dread(dev_desc, PVD_OFFSET, 1, (ulong *)tmpbuf) != 1) in part_get_info_iso_verb() 70 dev_desc->devnum, part_num); in part_get_info_iso_verb() 76 ppr->stand_ident, dev_desc->devnum, part_num); in part_get_info_iso_verb() 85 if (iso_dread(dev_desc, i, 1, (ulong *)tmpbuf) != 1) in part_get_info_iso_verb() 92 dev_desc->devnum, part_num); in part_get_info_iso_verb() 100 pbr->ident_str, dev_desc->devnum, part_num); in part_get_info_iso_verb() 105 if (iso_dread(dev_desc, bootaddr, 1, (ulong *)tmpbuf) != 1) { in part_get_info_iso_verb() 108 bootaddr, dev_desc->devnum, part_num); in part_get_info_iso_verb() [all …]
|
D | part_mac.c | 34 static int part_mac_read_ddb(struct blk_desc *dev_desc, 36 static int part_mac_read_pdb(struct blk_desc *dev_desc, int part, 42 static int part_test_mac(struct blk_desc *dev_desc) in part_test_mac() argument 48 if (part_mac_read_ddb (dev_desc, ddesc)) { in part_test_mac() 58 if ((blk_dread(dev_desc, i, 1, (ulong *)mpart) != 1) || in part_test_mac() 68 static void part_print_mac(struct blk_desc *dev_desc) in part_print_mac() argument 75 if (part_mac_read_ddb (dev_desc, ddesc)) { in part_print_mac() 113 if (blk_dread(dev_desc, i, 1, (ulong *)mpart) != 1) { in part_print_mac() 115 dev_desc->devnum, i); in part_print_mac() 121 dev_desc->devnum, i, MAC_PARTITION_MAGIC, in part_print_mac() [all …]
|
D | part_dos.c | 89 static int part_test_dos(struct blk_desc *dev_desc) in part_test_dos() argument 94 if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1) in part_test_dos() 100 if (dev_desc->sig_type == SIG_TYPE_NONE && in part_test_dos() 102 dev_desc->sig_type = SIG_TYPE_MBR; in part_test_dos() 103 dev_desc->mbr_sig = mbr->unique_mbr_signature; in part_test_dos() 106 ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz); in part_test_dos() 108 if (blk_dread(dev_desc, 0, 1, (ulong *)buffer) != 1) in part_test_dos() 120 static void print_partition_extended(struct blk_desc *dev_desc, in print_partition_extended() argument 125 ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz); in print_partition_extended() 129 if (blk_dread(dev_desc, ext_part_sector, 1, (ulong *)buffer) != 1) { in print_partition_extended() [all …]
|
D | part_amiga.c | 128 struct rigid_disk_block *get_rdisk(struct blk_desc *dev_desc) in get_rdisk() argument 142 ulong res = blk_dread(dev_desc, i, 1, (ulong *)block_buffer); in get_rdisk() 168 struct bootcode_block *get_bootcode(struct blk_desc *dev_desc) in get_bootcode() argument 184 ulong res = blk_dread(dev_desc, i, 1, (ulong *)block_buffer); in get_bootcode() 209 static int part_test_amiga(struct blk_desc *dev_desc) in part_test_amiga() argument 216 rdb = get_rdisk(dev_desc); in part_test_amiga() 219 bootcode = get_bootcode(dev_desc); in part_test_amiga() 238 static struct partition_block *find_partition(struct blk_desc *dev_desc, in find_partition() argument 246 rdb = get_rdisk(dev_desc); in find_partition() 260 ulong res = blk_dread(dev_desc, block, 1, (ulong *)block_buffer); in find_partition() [all …]
|
/external/u-boot/include/ |
D | part.h | 99 int part_get_info(struct blk_desc *dev_desc, int part, disk_partition_t *info); 104 int part_get_info_whole_disk(struct blk_desc *dev_desc, disk_partition_t *info); 106 void part_print(struct blk_desc *dev_desc); 107 void part_init(struct blk_desc *dev_desc); 108 void dev_print(struct blk_desc *dev_desc); 136 struct blk_desc **dev_desc); 172 struct blk_desc **dev_desc, 187 int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name, 201 int part_get_info_by_name(struct blk_desc *dev_desc, 215 void part_set_generic_name(const struct blk_desc *dev_desc, [all …]
|
/external/u-boot/drivers/fastboot/ |
D | fb_mmc.c | 24 struct blk_desc *dev_desc; member 27 static int part_get_info_by_name_or_alias(struct blk_desc *dev_desc, in part_get_info_by_name_or_alias() argument 32 ret = part_get_info_by_name(dev_desc, name, info); in part_get_info_by_name_or_alias() 43 ret = part_get_info_by_name(dev_desc, in part_get_info_by_name_or_alias() 88 struct blk_desc *dev_desc = sparse->dev_desc; in fb_mmc_sparse_write() local 90 return fb_mmc_blk_write(dev_desc, blk, blkcnt, buffer); in fb_mmc_sparse_write() 99 static void write_raw_image(struct blk_desc *dev_desc, disk_partition_t *info, in write_raw_image() argument 118 blks = fb_mmc_blk_write(dev_desc, info->start, blkcnt, buffer); in write_raw_image() 121 pr_err("failed writing to device %d\n", dev_desc->devnum); in write_raw_image() 141 static lbaint_t fb_mmc_get_boot_header(struct blk_desc *dev_desc, in fb_mmc_get_boot_header() argument [all …]
|
/external/u-boot/drivers/scsi/ |
D | scsi.c | 442 static void scsi_init_dev_desc_priv(struct blk_desc *dev_desc) in scsi_init_dev_desc_priv() argument 444 dev_desc->target = 0xff; in scsi_init_dev_desc_priv() 445 dev_desc->lun = 0xff; in scsi_init_dev_desc_priv() 446 dev_desc->log2blksz = in scsi_init_dev_desc_priv() 447 LOG2_INVALID(typeof(dev_desc->log2blksz)); in scsi_init_dev_desc_priv() 448 dev_desc->type = DEV_TYPE_UNKNOWN; in scsi_init_dev_desc_priv() 449 dev_desc->vendor[0] = 0; in scsi_init_dev_desc_priv() 450 dev_desc->product[0] = 0; in scsi_init_dev_desc_priv() 451 dev_desc->revision[0] = 0; in scsi_init_dev_desc_priv() 452 dev_desc->removable = false; in scsi_init_dev_desc_priv() [all …]
|
/external/u-boot/common/ |
D | android_bootloader.c | 21 struct blk_desc *dev_desc, in android_bootloader_message_load() argument 32 if (blk_dread(dev_desc, part_info->start, message_blocks, message) != in android_bootloader_message_load() 42 struct blk_desc *dev_desc, in android_bootloader_message_write() argument 53 if (blk_dwrite(dev_desc, part_info->start, message_blocks, message) != in android_bootloader_message_write() 63 struct blk_desc *dev_desc, in android_bootloader_load_and_clear_mode() argument 81 if (android_bootloader_message_load(dev_desc, misc_part_info, &bcb) < in android_bootloader_load_and_clear_mode() 92 android_bootloader_message_write(dev_desc, misc_part_info, in android_bootloader_load_and_clear_mode() 122 static int android_part_get_info_by_name_suffix(struct blk_desc *dev_desc, in android_part_get_info_by_name_suffix() argument 141 part_num = part_get_info_by_name(dev_desc, part_name, part_info); in android_part_get_info_by_name_suffix() 263 int android_bootloader_boot_flow(struct blk_desc *dev_desc, in android_bootloader_boot_flow() argument [all …]
|
D | android_ab.c | 62 struct blk_desc *dev_desc, in android_boot_control_create_from_disk() argument 88 if (blk_dread(dev_desc, part_info->start + abc_offset, abc_blocks, in android_boot_control_create_from_disk() 109 struct blk_desc *dev_desc, in android_boot_control_store() argument 118 if (blk_dwrite(dev_desc, part_info->start + abc_offset, abc_blocks, in android_boot_control_store() 151 int android_ab_select(struct blk_desc *dev_desc, disk_partition_t *part_info) in android_ab_select() argument 159 abc = android_boot_control_create_from_disk(dev_desc, part_info); in android_ab_select() 259 android_boot_control_store(abc, dev_desc, part_info); in android_ab_select()
|
/external/u-boot/drivers/block/ |
D | ide.c | 453 static void atapi_inquiry(struct blk_desc *dev_desc) in atapi_inquiry() argument 460 device = dev_desc->devnum; in atapi_inquiry() 461 dev_desc->type = DEV_TYPE_UNKNOWN; /* not yet valid */ in atapi_inquiry() 463 dev_desc->block_read = atapi_read; in atapi_inquiry() 478 ident_cpy((unsigned char *)dev_desc->vendor, &iobuf[8], 8); in atapi_inquiry() 479 ident_cpy((unsigned char *)dev_desc->product, &iobuf[16], 16); in atapi_inquiry() 480 ident_cpy((unsigned char *)dev_desc->revision, &iobuf[32], 5); in atapi_inquiry() 482 dev_desc->lun = 0; in atapi_inquiry() 483 dev_desc->lba = 0; in atapi_inquiry() 484 dev_desc->blksz = 0; in atapi_inquiry() [all …]
|
/external/u-boot/cmd/ |
D | android_cmds.c | 26 struct blk_desc **dev_desc, in part_get_info_by_dev_and_name() argument 44 *dev_desc = blk_get_dev(dev_iface, dev_num); in part_get_info_by_dev_and_name() 45 if (!*dev_desc) { in part_get_info_by_dev_and_name() 49 if (part_get_info_by_name(*dev_desc, part_str, part_info) < 0) { in part_get_info_by_dev_and_name() 58 struct blk_desc **dev_desc, in part_get_info_by_dev_and_name_or_num() argument 62 dev_desc, part_info)) in part_get_info_by_dev_and_name_or_num() 68 dev_desc, part_info, 1) < 0) { in part_get_info_by_dev_and_name_or_num()
|
D | fat.c | 71 struct blk_desc *dev_desc; in do_fat_fsinfo() local 79 part = blk_get_device_part_str(argv[1], argv[2], &dev_desc, &info, 1); in do_fat_fsinfo() 83 dev = dev_desc->devnum; in do_fat_fsinfo() 84 if (fat_set_blk_dev(dev_desc, &info) != 0) { in do_fat_fsinfo() 107 struct blk_desc *dev_desc = NULL; in do_fat_fswrite() local 116 part = blk_get_device_part_str(argv[1], argv[2], &dev_desc, &info, 1); in do_fat_fswrite() 120 dev = dev_desc->devnum; in do_fat_fswrite() 122 if (fat_set_blk_dev(dev_desc, &info) != 0) { in do_fat_fswrite()
|
D | reiser.c | 36 struct blk_desc *dev_desc = NULL; in do_reiserls() local 42 part = blk_get_device_part_str(argv[1], argv[2], &dev_desc, &info, 1); in do_reiserls() 50 dev = dev_desc->devnum; in do_reiserls() 53 reiserfs_set_blk_dev(dev_desc, &info); in do_reiserls() 84 struct blk_desc *dev_desc = NULL; in do_reiserload() local 124 part = blk_get_device_part_str(argv[1], argv[2], &dev_desc, &info, 1); in do_reiserload() 128 dev = dev_desc->devnum; in do_reiserload() 134 reiserfs_set_blk_dev(dev_desc, &info); in do_reiserload()
|
D | zfs.c | 41 struct blk_desc *dev_desc; in do_zfs_load() local 82 part = blk_get_device_part_str(argv[1], argv[2], &dev_desc, &info, 1); in do_zfs_load() 86 dev = dev_desc->devnum; in do_zfs_load() 91 zfs_set_blk_dev(dev_desc, &info); in do_zfs_load() 137 struct blk_desc *dev_desc; in do_zfs_ls() local 147 part = blk_get_device_part_str(argv[1], argv[2], &dev_desc, &info, 1); in do_zfs_ls() 151 zfs_set_blk_dev(dev_desc, &info); in do_zfs_ls()
|
D | read.c | 18 struct blk_desc *dev_desc = NULL; in do_read() local 42 dev_desc = blk_get_dev(argv[1], dev); in do_read() 43 if (dev_desc == NULL) { in do_read() 53 if (part_get_info(dev_desc, part, &part_info)) { in do_read() 69 if (blk_dread(dev_desc, offset + blk, cnt, addr) != cnt) { in do_read()
|
D | gpt.c | 306 static int get_gpt_info(struct blk_desc *dev_desc) in get_gpt_info() argument 320 ret = part_get_info(dev_desc, p, &info); in get_gpt_info() 345 static int do_get_gpt_info(struct blk_desc *dev_desc) in do_get_gpt_info() argument 349 ret = get_gpt_info(dev_desc); in do_get_gpt_info() 372 static int set_gpt_info(struct blk_desc *dev_desc, in set_gpt_info() argument 389 (unsigned int)dev_desc->lba, (unsigned int)dev_desc->lba); in set_gpt_info() 517 parts[i].size = lldiv(size_ll, dev_desc->blksz); in set_gpt_info() 528 parts[i].start = lldiv(start_ll, dev_desc->blksz); in set_gpt_info() 617 static int do_disk_guid(struct blk_desc *dev_desc, char * const namestr) in do_disk_guid() argument 622 ret = get_disk_guid(dev_desc, disk_guid); in do_disk_guid() [all …]
|
D | load_android.c | 16 struct blk_desc *dev_desc; in do_load_android() local 38 &dev_desc, &part_info, 1); in do_load_android() 42 if (android_image_load(dev_desc, &part_info, load_address, -1UL) < 0) { in do_load_android() 44 argv[1], dev_desc->devnum, boot_partition, load_address); in do_load_android()
|
D | disk.c | 21 struct blk_desc *dev_desc; in common_diskboot() local 40 &dev_desc, &info, 1); in common_diskboot() 46 dev = dev_desc->devnum; in common_diskboot() 57 if (blk_dread(dev_desc, info.start, 1, (ulong *)addr) != 1) { in common_diskboot() 101 if (blk_dread(dev_desc, info.start + 1, cnt, in common_diskboot()
|
/external/u-boot/env/ |
D | ext4.c | 37 struct blk_desc *dev_desc = NULL; in env_ext4_save() local 48 &dev_desc, &info, 1); in env_ext4_save() 52 dev = dev_desc->devnum; in env_ext4_save() 53 ext4fs_set_blk_dev(dev_desc, &info); in env_ext4_save() 81 struct blk_desc *dev_desc = NULL; in env_ext4_load() local 94 &dev_desc, &info, 1); in env_ext4_load() 98 dev = dev_desc->devnum; in env_ext4_load() 99 ext4fs_set_blk_dev(dev_desc, &info); in env_ext4_load()
|
D | fat.c | 37 struct blk_desc *dev_desc = NULL; in env_fat_save() local 49 &dev_desc, &info, 1); in env_fat_save() 53 dev = dev_desc->devnum; in env_fat_save() 54 if (fat_set_blk_dev(dev_desc, &info) != 0) { in env_fat_save() 84 struct blk_desc *dev_desc = NULL; in env_fat_load() local 96 &dev_desc, &info, 1); in env_fat_load() 100 dev = dev_desc->devnum; in env_fat_load() 101 if (fat_set_blk_dev(dev_desc, &info) != 0) { in env_fat_load()
|
/external/u-boot/fs/ext4/ |
D | dev.c | 42 get_fs()->dev_desc = rbdd; in ext4fs_set_blk_dev() 46 get_fs()->dev_desc->log2blksz; in ext4fs_set_blk_dev() 52 return fs_devread(get_fs()->dev_desc, part_info, sector, byte_offset, in ext4fs_devread() 59 int sect = SUPERBLOCK_START >> fs->dev_desc->log2blksz; in ext4_read_superblock() 60 int off = SUPERBLOCK_START % fs->dev_desc->blksz; in ext4_read_superblock()
|
/external/u-boot/test/dm/ |
D | mmc.c | 29 struct blk_desc *dev_desc; in dm_test_mmc_blk() local 33 ut_assertok(blk_get_device_by_str("mmc", "0", &dev_desc)); in dm_test_mmc_blk() 36 ut_asserteq(512, dev_desc->blksz); in dm_test_mmc_blk() 38 ut_asserteq(2, blk_dread(dev_desc, 0, 2, cmp)); in dm_test_mmc_blk()
|
/external/u-boot/arch/arm/mach-omap2/ |
D | utils.c | 92 struct blk_desc *dev_desc; in omap_mmc_get_part_size() local 96 dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV); in omap_mmc_get_part_size() 97 if (!dev_desc || dev_desc->type == DEV_TYPE_UNKNOWN) { in omap_mmc_get_part_size() 103 res = part_get_info_by_name_type(dev_desc, part, &info, PART_TYPE_EFI); in omap_mmc_get_part_size()
|