Rename TimeoutInSeconds to Timeout to avoid confusion.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Mike Maslenkin <mihailm@parallels.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15556 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Jeff Fan 2014-06-04 01:47:24 +00:00 committed by vanjeff
parent b4a6629fd9
commit e9bf5b1dd1
2 changed files with 16 additions and 17 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Include file for ISA Floppy Driver Include file for ISA Floppy Driver
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -917,18 +917,18 @@ DataOutByte (
/** /**
Detect the specified floppy logic drive is busy or not within a period of time. Detect the specified floppy logic drive is busy or not within a period of time.
@param FdcDev Indicate it is drive A or drive B @param FdcDev Indicate it is drive A or drive B
@param TimeoutInSeconds the time period for waiting @param Timeout The time period for waiting
@retval EFI_SUCCESS: The drive and command are not busy @retval EFI_SUCCESS: The drive and command are not busy
@retval EFI_TIMEOUT: The drive or command is still busy after a period time that @retval EFI_TIMEOUT: The drive or command is still busy after a period time that
set by TimeoutInSeconds set by Timeout
**/ **/
EFI_STATUS EFI_STATUS
FddWaitForBSYClear ( FddWaitForBSYClear (
IN FDC_BLK_IO_DEV *FdcDev, IN FDC_BLK_IO_DEV *FdcDev,
IN UINTN TimeoutInSeconds IN UINTN Timeout
); );
/** /**
@ -936,7 +936,7 @@ FddWaitForBSYClear (
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV @param FdcDev Pointer to instance of FDC_BLK_IO_DEV
@param Dio BOOLEAN: Indicate the FDC is waiting to write or read @param Dio BOOLEAN: Indicate the FDC is waiting to write or read
@param TimeoutInSeconds UINTN: The time period for waiting @param Timeout The time period for waiting
@retval EFI_SUCCESS: FDC is ready to write or read @retval EFI_SUCCESS: FDC is ready to write or read
@retval EFI_NOT_READY: FDC is not ready within the specified time period @retval EFI_NOT_READY: FDC is not ready within the specified time period
@ -946,7 +946,7 @@ EFI_STATUS
FddDRQReady ( FddDRQReady (
IN FDC_BLK_IO_DEV *FdcDev, IN FDC_BLK_IO_DEV *FdcDev,
IN BOOLEAN Dio, IN BOOLEAN Dio,
IN UINTN TimeoutInSeconds IN UINTN Timeout
); );
/** /**

View File

@ -1,7 +1,7 @@
/** @file /** @file
Internal floppy disk controller programming functions for the floppy driver. Internal floppy disk controller programming functions for the floppy driver.
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -1083,17 +1083,17 @@ DataOutByte (
Detect the specified floppy logic drive is busy or not within a period of time. Detect the specified floppy logic drive is busy or not within a period of time.
@param FdcDev Indicate it is drive A or drive B @param FdcDev Indicate it is drive A or drive B
@param TimeoutInSeconds the time period for waiting @param Timeout The time period for waiting
@retval EFI_SUCCESS: The drive and command are not busy @retval EFI_SUCCESS: The drive and command are not busy
@retval EFI_TIMEOUT: The drive or command is still busy after a period time that @retval EFI_TIMEOUT: The drive or command is still busy after a period time that
set by TimeoutInSeconds set by Timeout
**/ **/
EFI_STATUS EFI_STATUS
FddWaitForBSYClear ( FddWaitForBSYClear (
IN FDC_BLK_IO_DEV *FdcDev, IN FDC_BLK_IO_DEV *FdcDev,
IN UINTN TimeoutInSeconds IN UINTN Timeout
) )
{ {
UINTN Delay; UINTN Delay;
@ -1112,7 +1112,7 @@ FddWaitForBSYClear (
// //
Mask = (UINT8) ((FdcDev->Disk == FdcDisk0 ? MSR_DAB : MSR_DBB) | MSR_CB); Mask = (UINT8) ((FdcDev->Disk == FdcDisk0 ? MSR_DAB : MSR_DBB) | MSR_CB);
Delay = ((TimeoutInSeconds * STALL_1_MSECOND) / 50) + 1; Delay = ((Timeout * STALL_1_MSECOND) / 50) + 1;
do { do {
StatusRegister = FdcReadPort (FdcDev, FDC_REGISTER_MSR); StatusRegister = FdcReadPort (FdcDev, FDC_REGISTER_MSR);
if ((StatusRegister & Mask) == 0x00) { if ((StatusRegister & Mask) == 0x00) {
@ -1134,12 +1134,11 @@ FddWaitForBSYClear (
} }
/** /**
Determine whether FDC is ready to write or read.
Routine Description: Determine whether FDC is ready to write or read.
@param FdcDev Pointer to instance of FDC_BLK_IO_DEV @param FdcDev Pointer to instance of FDC_BLK_IO_DEV
@param Dio BOOLEAN: Indicate the FDC is waiting to write or read @param Dio BOOLEAN: Indicate the FDC is waiting to write or read
@param TimeoutInSeconds UINTN: The time period for waiting @param Timeout The time period for waiting
@retval EFI_SUCCESS: FDC is ready to write or read @retval EFI_SUCCESS: FDC is ready to write or read
@retval EFI_NOT_READY: FDC is not ready within the specified time period @retval EFI_NOT_READY: FDC is not ready within the specified time period
@ -1149,7 +1148,7 @@ EFI_STATUS
FddDRQReady ( FddDRQReady (
IN FDC_BLK_IO_DEV *FdcDev, IN FDC_BLK_IO_DEV *FdcDev,
IN BOOLEAN Dio, IN BOOLEAN Dio,
IN UINTN TimeoutInSeconds IN UINTN Timeout
) )
{ {
UINTN Delay; UINTN Delay;
@ -1169,7 +1168,7 @@ FddDRQReady (
// //
// in order to compare bit6 // in order to compare bit6
// //
Delay = ((TimeoutInSeconds * STALL_1_MSECOND) / 50) + 1; Delay = ((Timeout * STALL_1_MSECOND) / 50) + 1;
do { do {
StatusRegister = FdcReadPort (FdcDev, FDC_REGISTER_MSR); StatusRegister = FdcReadPort (FdcDev, FDC_REGISTER_MSR);
if ((StatusRegister & MSR_RQM) == MSR_RQM && (StatusRegister & MSR_DIO) == DataInOut) { if ((StatusRegister & MSR_RQM) == MSR_RQM && (StatusRegister & MSR_DIO) == DataInOut) {