alder_lake_bios/Intel/AlderLake/AlderLakePlatSamplePkg/Features/Usb4Cm/Usb4CmDxe/Usb4DhrPci.h

81 lines
2.9 KiB
C

/** @file
Header file for discrete USB4 host router PCI routines.
@copyright
INTEL CONFIDENTIAL
Copyright 2021 Intel Corporation.
The source code contained or described herein and all documents related to the
source code ("Material") are owned by Intel Corporation or its suppliers or
licensors. Title to the Material remains with Intel Corporation or its suppliers
and licensors. The Material may contain trade secrets and proprietary and
confidential information of Intel Corporation and its suppliers and licensors,
and is protected by worldwide copyright and trade secret laws and treaty
provisions. No part of the Material may be used, copied, reproduced, modified,
published, uploaded, posted, transmitted, distributed, or disclosed in any way
without Intel's prior express written permission.
No license under any patent, copyright, trade secret or other intellectual
property right is granted to or conferred upon you by disclosure or delivery
of the Materials, either expressly, by implication, inducement, estoppel or
otherwise. Any license under such intellectual property rights must be
express and approved by Intel in writing.
Unless otherwise agreed by Intel in writing, you may not remove or alter
this notice or any other notice embedded in Materials by Intel or
Intel's suppliers or licensors in any way.
This file contains a 'Sample Driver' and is licensed as such under the terms
of your license agreement with Intel or your vendor. This file may be modified
by the user, subject to the additional terms of the license agreement.
@par Specification Reference:
**/
#ifndef _USB4_DHR_PCI_H_
#define _USB4_DHR_PCI_H_
#include <Usb4HrInst.h>
/**
Initialize PCI configuration space of discrete USB4 host router.
@param[in] Usb4HrInst - Pointer to USB4 host router instance.
@retval EFI_SUCCESS - PCI initialization success.
@retval EFI_INVALID_PARAMETER - Invalid parameter.
@retval EFI_NOT_FOUND - Device is not present.
@retval EFI_UNSUPPORTED - Can't initialize PCI configuration space of USB4 host router.
**/
EFI_STATUS
Dusb4HrPciInit (
IN USB4_HR_INSTANCE *Usb4HrInst
);
/**
Un-Initialize PCI configuration space of discrete USB4 host router.
@param[in] Usb4HrInst - Pointer to USB4 host router instance.
**/
VOID
Dusb4HrPciUnInit (
IN USB4_HR_INSTANCE *Usb4HrInst
);
/**
Query PCI information of discrete USB4 host router.
This function should be called after PCI enumeration.
@param[in, out] Usb4Hr - Pointer to USB4 host router instance.
@retval EFI_SUCCESS - Query PCI information successfully.
@retval EFI_NOT_FOUND - Discrete USB4 host router is not found.
@retval EFI_UNSUPPORTED - Fail to query PCI information.
@retval EFI_INVALID_PARAMETER - Invalid parameter.
**/
EFI_STATUS
Dusb4HrPciQuery (
IN OUT USB4_HR_INSTANCE *Usb4Hr
);
#endif