/* The user is not allowed to select the slave while a transfer is in progress. */
int XQspiPs_SetSlaveSelect(XQspiPs *InstancePtr)
/* The user is not allowed to select the slave while a transfer is in progress. */
int XQspiPs_SetSlaveSelect(XQspiPs *InstancePtr)
{
	u32 ConfigReg;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	if (InstancePtr->IsBusy) {
		return XST_DEVICE_BUSY;
	}
	ConfigReg = XQspiPs_ReadReg(InstancePtr->Config.BaseAddress,
				      XQSPIPS_CR_OFFSET);
	ConfigReg &= ~XQSPIPS_CR_SSCTRL_MASK;
	XQspiPs_WriteReg(InstancePtr->Config.BaseAddress,
			  XQSPIPS_CR_OFFSET, ConfigReg);
	return XST_SUCCESS;
}