/*++\r
\r
-Copyright (c) 2006, Intel Corporation \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
+Copyright (c) 2006 - 2007, Intel Corporation\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
\r
Module Name:\r
\r
PciCommand.c\r
- \r
+\r
Abstract:\r
\r
PCI Bus Driver\r
PciIo = &PciIoDevice->PciIo;\r
\r
if (Operation != EFI_SET_REGISTER) {\r
- Status = PciIo->Pci.Read (\r
- PciIo,\r
- EfiPciIoWidthUint16,\r
- Offset,\r
- 1,\r
- &OldCommand\r
- );\r
+ Status = PciIoRead (\r
+ PciIo,\r
+ EfiPciIoWidthUint16,\r
+ Offset,\r
+ 1,\r
+ &OldCommand\r
+ );\r
\r
if (Operation == EFI_GET_REGISTER) {\r
*PtrCommand = OldCommand;\r
}\r
\r
if (Operation == EFI_ENABLE_REGISTER) {\r
- OldCommand |= Command;\r
+ OldCommand = (UINT16) (OldCommand | Command);\r
} else if (Operation == EFI_DISABLE_REGISTER) {\r
- OldCommand &= ~(Command);\r
+ OldCommand = (UINT16) (OldCommand & ~(Command));\r
} else {\r
OldCommand = Command;\r
}\r
\r
- return PciIo->Pci.Write (\r
+ return PciIoWrite (\r
PciIo,\r
EfiPciIoWidthUint16,\r
Offset,\r
1,\r
&OldCommand\r
- );\r
+ );\r
}\r
\r
BOOLEAN\r
Arguments:\r
\r
Returns:\r
- \r
+\r
None\r
\r
--*/\r
NextRegBlock - A pointer to the next block.\r
\r
Returns:\r
- \r
+\r
None\r
\r
--*/\r
CapabilityPtr = 0;\r
if (IS_CARDBUS_BRIDGE (&PciIoDevice->Pci)) {\r
\r
- PciIoDevice->PciIo.Pci.Read (\r
- &PciIoDevice->PciIo,\r
- EfiPciIoWidthUint8,\r
- EFI_PCI_CARDBUS_BRIDGE_CAPABILITY_PTR,\r
- 1,\r
- &CapabilityPtr\r
- );\r
+ PciIoRead (\r
+ &PciIoDevice->PciIo,\r
+ EfiPciIoWidthUint8,\r
+ EFI_PCI_CARDBUS_BRIDGE_CAPABILITY_PTR,\r
+ 1,\r
+ &CapabilityPtr\r
+ );\r
} else {\r
\r
- PciIoDevice->PciIo.Pci.Read (\r
- &PciIoDevice->PciIo,\r
- EfiPciIoWidthUint8,\r
- EFI_PCI_CAPABILITY_PTR,\r
- 1,\r
- &CapabilityPtr\r
- );\r
+ PciIoRead (\r
+ &PciIoDevice->PciIo,\r
+ EfiPciIoWidthUint8,\r
+ EFI_PCI_CAPABILITY_PTR,\r
+ 1,\r
+ &CapabilityPtr\r
+ );\r
}\r
}\r
\r
// Mask it to DWORD alignment per PCI spec\r
//\r
CapabilityPtr &= 0xFC;\r
- PciIoDevice->PciIo.Pci.Read (\r
- &PciIoDevice->PciIo,\r
- EfiPciIoWidthUint16,\r
- CapabilityPtr,\r
- 1,\r
- &CapabilityEntry\r
- );\r
+ PciIoRead (\r
+ &PciIoDevice->PciIo,\r
+ EfiPciIoWidthUint16,\r
+ CapabilityPtr,\r
+ 1,\r
+ &CapabilityEntry\r
+ );\r
\r
CapabilityID = (UINT8) CapabilityEntry;\r
\r