package/boot/uboot-oxnas/src/drivers/block/plxsata_ide.c
/**
 * Possible that ATA status will not become no-error, so must have timeout
 * @returns An int which is zero on error
 */
Possible that ATA status will not become no-error, so must have timeout
@returns An int which is zero on error
Possible that ATA status will not become no - error so must have timeout @returns An int which is zero on error
static inline int wait_no_error(int device)
{
	int status = 0;
	if (*(sata_regs_base[device] + SATA_INT_STATUS_OFF)
		& (1 << SATA_INT_STATUS_ERROR_BIT)) {
		printf("wait_no_error() SATA core flagged error\n");
	} else {
		int loops = MAX_NO_ERROR_LOOPS;
		do {
			if (!(ide_inb(device, ATA_PORT_COMMAND)
				& (1 << ATA_STATUS_ERR_BIT))) {
				status = 1;
				break;
			}
			udelay(10);
		} while (--loops);
		if (!loops) {
			printf("wait_no_error() Timed out of wait for SATA no-error condition\n");
		}
	}
	return status;
}
static inline int wait_no_error ( int device ) { int status = 0 ; if ( * ( sata_regs_base [ device ] + SATA_INT_STATUS_OFF ) & ( 1 << SATA_INT_STATUS_ERROR_BIT ) ) { printf ( " \n " ) ; } else { int loops = MAX_NO_ERROR_LOOPS ; do { if ( ! ( ide_inb ( device , ATA_PORT_COMMAND ) & ( 1 << ATA_STATUS_ERR_BIT ) ) ) { status = 1 ; break ; } udelay ( 10 ) ; } while ( -- loops ) ; if ( ! loops ) { printf ( " \n " ) ; } } return status ; }
Possible that ATA status will not become no-error, so must have timeout
 @returns An int which is zero on error
Possible that ATA status will not become no - error so must have timeout @returns An int which is zero on error
/* Check for ATA core error */ /* Check for ATA device error */