ide_disk.cc (11522:348411ec525a) ide_disk.cc (11980:56d16946ed95)
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 643 unchanged lines hidden (view full) ---

652 case WDCC_SETMULTI:
653 case WDCC_IDLE:
654 devState = Command_Execution;
655 action = ACT_CMD_COMPLETE;
656 break;
657
658 // Supported PIO data-in commands
659 case WDCC_IDENTIFY:
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 643 unchanged lines hidden (view full) ---

652 case WDCC_SETMULTI:
653 case WDCC_IDLE:
654 devState = Command_Execution;
655 action = ACT_CMD_COMPLETE;
656 break;
657
658 // Supported PIO data-in commands
659 case WDCC_IDENTIFY:
660 case ATAPI_IDENTIFY_DEVICE:
660 cmdBytes = cmdBytesLeft = sizeof(struct ataparams);
661 devState = Prepare_Data_In;
662 action = ACT_DATA_READY;
663 break;
664
665 case WDCC_READMULTI:
666 case WDCC_READ:
667 if (!(cmdReg.drive & DRIVE_LBA_BIT))

--- 179 unchanged lines hidden (view full) ---

847 }
848 } else if (action == ACT_DATA_READY) {
849 // clear the BSY bit
850 status &= ~STATUS_BSY_BIT;
851 // set the DRQ bit
852 status |= STATUS_DRQ_BIT;
853
854 // copy the data into the data buffer
661 cmdBytes = cmdBytesLeft = sizeof(struct ataparams);
662 devState = Prepare_Data_In;
663 action = ACT_DATA_READY;
664 break;
665
666 case WDCC_READMULTI:
667 case WDCC_READ:
668 if (!(cmdReg.drive & DRIVE_LBA_BIT))

--- 179 unchanged lines hidden (view full) ---

848 }
849 } else if (action == ACT_DATA_READY) {
850 // clear the BSY bit
851 status &= ~STATUS_BSY_BIT;
852 // set the DRQ bit
853 status |= STATUS_DRQ_BIT;
854
855 // copy the data into the data buffer
855 if (cmdReg.command == WDCC_IDENTIFY) {
856 if (cmdReg.command == WDCC_IDENTIFY ||
857 cmdReg.command == ATAPI_IDENTIFY_DEVICE) {
856 // Reset the drqBytes for this block
857 drqBytesLeft = sizeof(struct ataparams);
858
859 memcpy((void *)dataBuffer, (void *)&driveID,
860 sizeof(struct ataparams));
861 } else {
862 // Reset the drqBytes for this block
863 drqBytesLeft = SectorSize;

--- 342 unchanged lines hidden ---
858 // Reset the drqBytes for this block
859 drqBytesLeft = sizeof(struct ataparams);
860
861 memcpy((void *)dataBuffer, (void *)&driveID,
862 sizeof(struct ataparams));
863 } else {
864 // Reset the drqBytes for this block
865 drqBytesLeft = SectorSize;

--- 342 unchanged lines hidden ---