/** @file\r
Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
- All rights reserved. This program and the accompanying materials \r
- are licensed and made available under the terms and conditions of the BSD License \r
- which accompanies this distribution. The full text of the license may be found at \r
- http://opensource.org/licenses/bsd-license.php \r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
@par Revision Reference:\r
This module is modified from DXE\IDE module for Ide Contriller Init support\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- \r
+\r
//\r
// Close protocol, don't use device path protocol in the .Support() function\r
//\r
// ***********************************************************************************\r
//\r
/**\r
- Start this driver on Controller by detecting all disks and installing \r
+ Start this driver on Controller by detecting all disks and installing\r
BlockIo protocol on them.\r
\r
@param This Protocol instance pointer.\r
if ((EFI_ERROR (Status)) && (Status != EFI_ALREADY_STARTED)) {\r
return Status;\r
}\r
- \r
+\r
//\r
// Now open the IDE_CONTROLLER_INIT protocol. Step7.1\r
//\r
if (!(ConfigurationOptions & (1 << (IdeChannel * 2 + IdeDevice)))) {\r
continue;\r
}\r
- \r
+\r
//\r
// The device has been scanned in another Start(), No need to scan it again\r
// for perf optimization.\r
if (IdeBusDriverPrivateData->HaveScannedDevice[IdeChannel * 2 + IdeDevice]) {\r
continue;\r
}\r
- \r
+\r
//\r
// create child handle for the detected device.\r
//\r
if ((IdeBlkIoDevicePtr->Type == IdeHardDisk) || (IdeBlkIoDevicePtr->Type == Ide48bitAddressingHardDisk)) {\r
Status = SetDriveParameters (IdeBlkIoDevicePtr, &DriveParameters);\r
}\r
- \r
+\r
//\r
// Record PIO mode used in private data\r
//\r
(EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_ENABLE),\r
IdeBlkIoDevicePtr->DevicePath\r
);\r
- \r
+\r
//\r
// Create event to clear pending IDE interrupt\r
//\r
Status = gBS->CreateEvent (\r
- EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES,\r
- EFI_TPL_NOTIFY,\r
+ EVT_SIGNAL_EXIT_BOOT_SERVICES,\r
+ TPL_NOTIFY,\r
ClearInterrupt,\r
IdeBlkIoDevicePtr,\r
&IdeBlkIoDevicePtr->ExitBootServiceEvent\r
// end of 2nd outer loop ==========\r
//\r
}\r
- \r
+\r
//\r
// All configurations done! Notify IdeController to do post initialization\r
// work such as saving IDE controller PCI settings for S3 resume\r
// ***********************************************************************************\r
//\r
/**\r
- Stop this driver on Controller Handle. \r
+ Stop this driver on Controller Handle.\r
\r
@param This Protocol instance pointer.\r
@param DeviceHandle Handle of device to stop driver on\r
);\r
return Status;\r
}\r
- \r
+\r
//\r
// Release allocated resources\r
//\r
EFI_STATUS Status;\r
EFI_TPL OldTpl;\r
\r
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);\r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);\r
//\r
Status = EFI_DEVICE_ERROR;\r
goto Done;\r
}\r
- \r
+\r
//\r
// for ATAPI device, using ATAPI reset method\r
//\r
EFI_STATUS Status;\r
EFI_TPL OldTpl;\r
\r
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);\r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);\r
\r
Status = EFI_DEVICE_ERROR;\r
goto Done;\r
}\r
- \r
+\r
//\r
// for ATAPI device, using ATAPI read block's mechanism\r
//\r
EFI_STATUS Status;\r
EFI_TPL OldTpl;\r
\r
- OldTpl = gBS->RaiseTPL (EFI_TPL_CALLBACK);\r
- \r
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
+\r
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (This);\r
//\r
// Requery IDE IO resources in case of the switch of native and legacy modes\r
// for ATA device, using ATA write block's mechanism\r
//\r
if (IdeBlkIoDevice->Type == IdeHardDisk ||\r
- IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) { \r
+ IdeBlkIoDevice->Type == Ide48bitAddressingHardDisk) {\r
\r
Status = AtaBlkIoWriteBlocks (\r
IdeBlkIoDevice,\r
Status = EFI_DEVICE_ERROR;\r
goto Done;\r
}\r
- \r
+\r
//\r
// for ATAPI device, using ATAPI write block's mechanism\r
//\r
BufferSize,\r
Buffer\r
);\r
- \r
+\r
Done:\r
gBS->RestoreTPL (OldTpl);\r
return Status;\r