package/boot/uboot-oxnas/src/drivers/block/plxsata_ide.c
/**
 * Expect SATA command to always finish, perhaps with error
 * @returns An int which is zero on error
 */
Expect SATA command to always finish, perhaps with error
@returns An int which is zero on error
Expect SATA command to always finish perhaps with error @returns An int which is zero on error
static inline int wait_sata_command_not_busy(int device)
{
	int status = 0;
	int loops = MAX_NOT_BUSY_LOOPS;
	do {
		if (!(*(sata_regs_base[device] + SATA_COMMAND_OFF)
			& (1 << SATA_CMD_BUSY_BIT))) {
			status = 1;
			break;
		}
		udelay(100);
	} while (--loops);
	if (!loops) {
		printf("wait_sata_command_not_busy() Timed out of wait for SATA command to finish\n");
	}
	return status;
}
static inline int wait_sata_command_not_busy ( int device ) { int status = 0 ; int loops = MAX_NOT_BUSY_LOOPS ; do { if ( ! ( * ( sata_regs_base [ device ] + SATA_COMMAND_OFF ) & ( 1 << SATA_CMD_BUSY_BIT ) ) ) { status = 1 ; break ; } udelay ( 100 ) ; } while ( -- loops ) ; if ( ! loops ) { printf ( " \n " ) ; } return status ; }
Expect SATA command to always finish, perhaps with error
 @returns An int which is zero on error
Expect SATA command to always finish perhaps with error @returns An int which is zero on error
/* Wait for data to be available */