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
This commit is contained in:
mdkinney 2008-10-27 02:16:38 +00:00
parent 46f8260048
commit 8be701c3ba
4 changed files with 3 additions and 89 deletions

View File

@ -14,11 +14,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
//
@ -50,52 +45,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,
@ -620,12 +569,6 @@ Returns:
EFI_STATUS Status;
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
//
@ -652,7 +595,6 @@ Returns:
EFI_NATIVE_INTERFACE,
&m8259
);
return Status;
}

View File

@ -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

View File

@ -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

View File

@ -37,6 +37,7 @@
UefiBootServicesTableLib
DebugLib
UefiDriverEntryPoint
IoLib
[Sources.common]
8259.c
@ -44,7 +45,6 @@
[Protocols]
gEfiLegacy8259ProtocolGuid
gEfiCpuIoProtocolGuid
[Depex]
gEfiCpuIoProtocolGuid
TRUE