Lines Matching +full:big +full:- +full:endian +full:- +full:desc

2  * (C) Copyright 2000-2011
5 * SPDX-License-Identifier: GPL-2.0+
41 #define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */
66 /* de-assert RESET signal */ in ide_reset()
88 if (delay-- == 0) in ide_wait()
105 end = src + len - 1; in ident_cpy()
144 while (shorts--) { in ide_output_data_shorts()
161 while (shorts--) { in ide_input_data_shorts()
199 if (delay-- == 0) in atapi_wait_mask()
372 if (unitattn-- > 0) { in atapi_issue_autoreq()
381 if (notready-- > 0) { in atapi_issue_autoreq()
413 int device = block_dev->devnum; in atapi_read()
447 blkcnt -= cnt; in atapi_read()
461 device = dev_desc->devnum; in atapi_inquiry()
462 dev_desc->type = DEV_TYPE_UNKNOWN; /* not yet valid */ in atapi_inquiry()
464 dev_desc->block_read = atapi_read; in atapi_inquiry()
479 ident_cpy((unsigned char *)dev_desc->vendor, &iobuf[8], 8); in atapi_inquiry()
480 ident_cpy((unsigned char *)dev_desc->product, &iobuf[16], 16); in atapi_inquiry()
481 ident_cpy((unsigned char *)dev_desc->revision, &iobuf[32], 5); in atapi_inquiry()
483 dev_desc->lun = 0; in atapi_inquiry()
484 dev_desc->lba = 0; in atapi_inquiry()
485 dev_desc->blksz = 0; in atapi_inquiry()
486 dev_desc->log2blksz = LOG2_INVALID(typeof(dev_desc->log2blksz)); in atapi_inquiry()
487 dev_desc->type = iobuf[0] & 0x1f; in atapi_inquiry()
490 dev_desc->removable = 1; in atapi_inquiry()
492 dev_desc->removable = 0; in atapi_inquiry()
525 dev_desc->lba = ((unsigned long) iobuf[0] << 24) + in atapi_inquiry()
528 dev_desc->blksz = ((unsigned long) iobuf[4] << 24) + in atapi_inquiry()
531 dev_desc->log2blksz = LOG2(dev_desc->blksz); in atapi_inquiry()
534 dev_desc->lba48 = 0; in atapi_inquiry()
551 device = dev_desc->devnum; in ide_ident()
557 dev_desc->if_type = IF_TYPE_IDE; in ide_ident()
570 dev_desc->if_type = IF_TYPE_ATAPI; in ide_ident()
576 * Wait for completion - ATAPI devices need more time in ide_ident()
622 } /* see above - ugly to read */ in ide_ident()
630 ident_cpy((unsigned char *)dev_desc->revision, iop.fw_rev, in ide_ident()
631 sizeof(dev_desc->revision)); in ide_ident()
632 ident_cpy((unsigned char *)dev_desc->vendor, iop.model, in ide_ident()
633 sizeof(dev_desc->vendor)); in ide_ident()
634 ident_cpy((unsigned char *)dev_desc->product, iop.serial_no, in ide_ident()
635 sizeof(dev_desc->product)); in ide_ident()
638 * firmware revision, model, and serial number have Big Endian Byte in ide_ident()
639 * order in Word. Convert all three to little endian. in ide_ident()
645 strswab(dev_desc->revision); in ide_ident()
646 strswab(dev_desc->vendor); in ide_ident()
647 strswab(dev_desc->product); in ide_ident()
651 dev_desc->removable = 1; in ide_ident()
653 dev_desc->removable = 0; in ide_ident()
656 if (dev_desc->if_type == IF_TYPE_ATAPI) { in ide_ident()
664 dev_desc->lba = (iop.lba_capacity << 16) | (iop.lba_capacity >> 16); in ide_ident()
667 * do not swap shorts on little endian in ide_ident()
670 * 6.2.1.6: Identfy Drive, Table 39, Word Address 57-58 for details. in ide_ident()
672 dev_desc->lba = iop.lba_capacity; in ide_ident()
677 dev_desc->lba48 = 1; in ide_ident()
678 dev_desc->lba = (unsigned long long) iop.lba48_capacity[0] | in ide_ident()
683 dev_desc->lba48 = 0; in ide_ident()
687 dev_desc->type = DEV_TYPE_HARDDISK; in ide_ident()
688 dev_desc->blksz = ATA_BLOCKSIZE; in ide_ident()
689 dev_desc->log2blksz = LOG2(dev_desc->blksz); in ide_ident()
690 dev_desc->lun = 0; /* just to fill something in... */ in ide_ident()
737 debug("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n", in ide_inb()
846 /* We only need to swap data if we are running on a big endian cpu. */
862 while (words--) { in ide_input_swap_data()
883 while (words--) { in ide_output_data()
912 while (words--) { in ide_input_data()
942 int device = block_dev->devnum; in ide_read()
989 while (blkcnt-- > 0) { in ide_read()
1069 int device = block_dev->devnum; in ide_write()
1086 while (blkcnt-- > 0) { in ide_write()
1160 struct blk_desc *desc = dev_get_uclass_platdata(udev); in ide_blk_probe() local
1163 strncpy(desc->vendor, ide_dev_desc[desc->devnum].vendor, in ide_blk_probe()
1165 desc->vendor[BLK_VEN_SIZE] = '\0'; in ide_blk_probe()
1166 strncpy(desc->product, ide_dev_desc[desc->devnum].product, in ide_blk_probe()
1168 desc->product[BLK_PRD_SIZE] = '\0'; in ide_blk_probe()
1169 strncpy(desc->revision, ide_dev_desc[desc->devnum].revision, in ide_blk_probe()
1171 desc->revision[BLK_REV_SIZE] = '\0'; in ide_blk_probe()
1173 part_init(desc); in ide_blk_probe()
1245 .desc = ide_dev_desc,