pciepsu: xpciepsu_caps.c File Reference

| pciepsu Xilinx SDK Drivers API Documentation

- Overview
- APIs
- File List
- Examples

Functions
xpciepsu_caps.c File Reference

## Overview

Implements all of supportive functions to expose PCIe capabilities.

    MODIFICATION HISTORY:

    Ver   Who  Date     Changes

    1.0     bs      08/21/2018      First release

## Functions
u8 | XPciePsu_HasCapability (XPciePsu *InstancePtr, u8 Bus, u8 Device, u8 Function, u8 CapId)
| This function returns whether capability Id is available or not for the particular Function. More...
u64 | XPciePsu_GetCapability (XPciePsu *InstancePtr, u8 Bus, u8 Device, u8 Function, u8 CapId)
| This function returns offset to the matching capability ID from the Function's Linked list of the capability registers. More...
u8 | XPciePsu_PrintAllCapabilites (XPciePsu *InstancePtr, u8 Bus, u8 Device, u8 Function)
| This function prints all the available capabilities in the Function. More...

## Function Documentation

u64 XPciePsu_GetCapability | ( | XPciePsu * | InstancePtr,
|  | u8 | Bus,
|  | u8 | Device,
|  | u8 | Function,
|  | u8 | CapId
| ) |  |

This function returns offset to the matching capability ID from the Function's Linked list of the capability registers.

Parameters

  InstancePtr | pointer to XPciePsu Instance Pointer
  Bus | is the number of the Bus
  Device | is the number of the Device
  Function | is number of the Function
  cap | id to get capability pointer offset

Returns
  u64 capability pointer if available 0 if not available.

References XPciePsu_ComposeExternalConfigAddress(), and XPciePsu_ReadConfigSpace().

u8 XPciePsu_HasCapability | ( | XPciePsu * | InstancePtr,
|  | u8 | Bus,
|  | u8 | Device,
|  | u8 | Function,
|  | u8 | CapId
| ) |  |

This function returns whether capability Id is available or not for the particular Function.

Parameters

  InstancePtr | pointer to XPciePsu Instance Pointer
  Bus | is the number of the Bus
  Device | is the number of the Device
  Function | is number of the Function
  cap | id to check capability pointer availability

Returns
  u32 0 if capability is not available 1 if capability is available

References XPciePsu_ReadConfigSpace().

u8 XPciePsu_PrintAllCapabilites | ( | XPciePsu * | InstancePtr,
|  | u8 | Bus,
|  | u8 | Device,
|  | u8 | Function
| ) |  |

This function prints all the available capabilities in the Function.

Parameters

  InstancePtr | pointer to XPciePsu Instance Pointer
  Bus | is the number of the Bus
  Device | is the number of the Device
  Function | is number of the Function

Returns
  XST_SUCCESS on success XST_FAILURE on failure.

References XPciePsu_ReadConfigSpace().