MdeModulePkg: Skip to manage usb debug port in EDKII EHCI driver if it's used by usb debug port driver
Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13226 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
The EHCI register operation routines.
|
||||
|
||||
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -53,6 +53,42 @@ EhcReadCapRegister (
|
||||
return Data;
|
||||
}
|
||||
|
||||
/**
|
||||
Read EHCI debug port register.
|
||||
|
||||
@param Ehc The EHCI device.
|
||||
@param Offset Debug port register offset.
|
||||
|
||||
@return The register content read.
|
||||
@retval If err, return 0xffff.
|
||||
|
||||
**/
|
||||
UINT32
|
||||
EhcReadDbgRegister (
|
||||
IN USB2_HC_DEV *Ehc,
|
||||
IN UINT32 Offset
|
||||
)
|
||||
{
|
||||
UINT32 Data;
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = Ehc->PciIo->Mem.Read (
|
||||
Ehc->PciIo,
|
||||
EfiPciIoWidthUint32,
|
||||
Ehc->DebugPortBarNum,
|
||||
(UINT64) (Ehc->DebugPortOffset + Offset),
|
||||
1,
|
||||
&Data
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "EhcReadDbgRegister: Pci Io read error - %r at %d\n", Status, Offset));
|
||||
Data = 0xFFFF;
|
||||
}
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Read EHCI Operation register.
|
||||
|
Reference in New Issue
Block a user