summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-27 02:16:38 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-10-27 02:16:38 +0000
commit8be701c3baf0ad82c38879f281e73d8676f5819e (patch)
tree66ca853807401b0cd3614739ae371944caa4b023
parent46f8260048289f7ce69674527db85b3fc5185681 (diff)
downloadedk2-platforms-8be701c3baf0ad82c38879f281e73d8676f5819e.tar.xz
Update 8259 driver to use IoLib instead of the CPU I/O Protocol
Remove redundant .DXS file. The dependency expression is in the INF file. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6246 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c58
-rw-r--r--IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.dxs28
-rw-r--r--IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.h2
-rw-r--r--IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf4
4 files changed, 3 insertions, 89 deletions
diff --git a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c
index dc1c50ff8a..8a21cd6bf5 100644
--- a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c
+++ b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.c
@@ -15,11 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "8259.h"
//
-// Global for the CPU I/O Protocol that is consumed by this driver
-//
-EFI_CPU_IO_PROTOCOL *mCpuIo;
-
-//
// Global for the Legacy 8259 Protocol that is prodiced by this driver
//
EFI_LEGACY_8259_PROTOCOL m8259 = {
@@ -51,52 +46,6 @@ UINT16 mLegacyModeEdgeLevel = 0x0000;
// Worker Functions
//
VOID
-IoWrite8 (
- IN UINT16 Port,
- IN UINT8 Value
- )
-/**
-
- Routine Description:
- Writes an I/O port using the CPU I/O Protocol
-
- Arguments:
- Register - I/O Port to write
- Value - The 8 bit value to write to Port
-
- Returns:
- None
-
-**/
-{
- mCpuIo->Io.Write (mCpuIo, EfiCpuIoWidthUint8, Port, 1, &Value);
-}
-
-UINT8
-IoRead8 (
- IN UINT16 Port
- )
-/**
-
- Routine Description:
- Writes an I/O port using the CPU I/O Protocol
-
- Arguments:
- Register - I/O Port to write
- Value - The 8 bit value to write to Port
-
- Returns:
- None
-
-**/
-{
- UINT8 Value;
-
- mCpuIo->Io.Read (mCpuIo, EfiCpuIoWidthUint8, Port, 1, &Value);
- return Value;
-}
-
-VOID
Interrupt8259WriteMask (
IN UINT16 Mask,
IN UINT16 EdgeLevel
@@ -621,12 +570,6 @@ Returns:
EFI_8259_IRQ Irq;
//
- // Find the CPU I/O Protocol
- //
- Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (VOID **) &mCpuIo);
- ASSERT_EFI_ERROR (Status);
-
- //
// Clear all pending interrupt
//
for (Irq = Efi8259Irq0; Irq <= Efi8259Irq15; Irq++) {
@@ -652,7 +595,6 @@ Returns:
EFI_NATIVE_INTERFACE,
&m8259
);
-
return Status;
}
diff --git a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.dxs b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.dxs
deleted file mode 100644
index e2c384524f..0000000000
--- a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.dxs
+++ /dev/null
@@ -1,28 +0,0 @@
-/*++
-
-Copyright (c) 2005, Intel Corporation
-All rights reserved. This program and the accompanying materials
-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
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-Module Name:
-
- 8259.dxs
-
-Abstract:
- Dependency expression source file.
-
---*/
-
-#include "EfiDepex.h"
-
-#include EFI_PROTOCOL_DEFINITION (CpuIo)
-
-DEPENDENCY_START
- EFI_CPU_IO_PROTOCOL_GUID
-DEPENDENCY_END
-
diff --git a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.h b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.h
index 18bd37bddd..f77494c946 100644
--- a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.h
+++ b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.h
@@ -23,11 +23,11 @@ Abstract:
#include <FrameworkDxe.h>
-#include <Protocol/CpuIo.h>
#include <Protocol/Legacy8259.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
+#include <Library/IoLib.h>
//
// 8259 Hardware definitions
diff --git a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf
index 9887bbf10b..fbd1277095 100644
--- a/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf
+++ b/IntelFrameworkModulePkg/Universal/Legacy8259Dxe/8259.inf
@@ -37,6 +37,7 @@
UefiBootServicesTableLib
DebugLib
UefiDriverEntryPoint
+ IoLib
[Sources.common]
8259.c
@@ -44,7 +45,6 @@
[Protocols]
gEfiLegacy8259ProtocolGuid
- gEfiCpuIoProtocolGuid
[Depex]
- gEfiCpuIoProtocolGuid \ No newline at end of file
+ TRUE \ No newline at end of file