![]() |
pciepsu
Xilinx SDK Drivers API Documentation
|
This file contains the software API definition of the Xilinx PSU PCI IP (psu_pcie).
This driver provides "C" function interface to application/upper layer to access the hardware.
Features The driver provides its user with entry points
Driver Initialization & Configuration
The XPciePsu_Config structure is used by the driver to configure itself. This configuration structure is typically created by the tool-chain based on HW build properties.
To support multiple runtime loading and initialization strategies employed by various operating systems, the driver instance can be initialized in the following way:
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 bs 08/21/2018 First release
Functions | |
XPciePsu_Config * | XPciePsu_LookupConfig (u16 DeviceId) |
This function looks for the configuration of PCIe from the configTable based on the unique device ID. More... | |
u32 | XPciePsu_CfgInitialize (XPciePsu *InstancePtr, XPciePsu_Config *CfgPtr, UINTPTR EffectiveBrgAddress) |
This function initializes the config space and PCIe bridge. More... | |
u8 | XPciePsu_EnumerateBus (XPciePsu *InstancePtr) |
This function starts PCIe enumeration. More... | |
u8 | XPciePsu_ReadConfigSpace (XPciePsu *InstancePtr, u8 Bus, u8 Device, u8 Function, u16 Offset, u32 *DataPtr) |
This function read from remote configuration space location. More... | |
u8 | XPciePsu_WriteConfigSpace (XPciePsu *InstancePtr, u8 Bus, u8 Device, u8 Function, u16 Offset, u32 Data) |
This function write to remote configuration space location. More... | |
u32 | XPciePsu_ComposeExternalConfigAddress (u8 Bus, u8 Device, u8 Function, u16 Offset) |
This function Composes configuration space location. More... | |
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... | |
u32 XPciePsu_CfgInitialize | ( | XPciePsu * | InstancePtr, |
XPciePsu_Config * | CfgPtr, | ||
UINTPTR | EffectiveBrgAddress | ||
) |
This function initializes the config space and PCIe bridge.
InstancePtr | pointer to XPciePsu Instance Pointer |
CfgPtr | pointer to XPciePsu_Config instrance Pointer. |
EffectiveBrgAddress | config brigReg address |
Referenced by PcieInitRootComplex().
u32 XPciePsu_ComposeExternalConfigAddress | ( | u8 | Bus, |
u8 | Device, | ||
u8 | Function, | ||
u16 | Offset | ||
) |
This function Composes configuration space location.
Bus | |
Device | |
Function | |
Offset |
References XPCIEPSU_ECAM_BUS_MASK, XPCIEPSU_ECAM_BUS_SHIFT, XPCIEPSU_ECAM_DEV_MASK, XPCIEPSU_ECAM_DEV_SHIFT, XPCIEPSU_ECAM_FUN_MASK, XPCIEPSU_ECAM_FUN_SHIFT, XPCIEPSU_ECAM_MASK, XPCIEPSU_ECAM_REG_MASK, and XPCIEPSU_ECAM_REG_SHIFT.
Referenced by XPciePsu_WriteConfigSpace().
u8 XPciePsu_EnumerateBus | ( | XPciePsu * | InstancePtr | ) |
This function starts PCIe enumeration.
InstancePtr | pointer to XPciePsu Instance Pointer |
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.
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 |
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.
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 |
XPciePsu_Config* XPciePsu_LookupConfig | ( | u16 | DeviceId | ) |
This function looks for the configuration of PCIe from the configTable based on the unique device ID.
The table XPciePsu_ConfigTable[] contains the configuration information for each device in the system.
DeviceId | is the unique device ID of the device being looked up. |
Referenced by PcieInitRootComplex().
u8 XPciePsu_PrintAllCapabilites | ( | XPciePsu * | InstancePtr, |
u8 | Bus, | ||
u8 | Device, | ||
u8 | Function | ||
) |
This function prints all the available capabilities in the Function.
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 |
u8 XPciePsu_ReadConfigSpace | ( | XPciePsu * | InstancePtr, |
u8 | Bus, | ||
u8 | Device, | ||
u8 | Function, | ||
u16 | Offset, | ||
u32 * | DataPtr | ||
) |
This function read from remote configuration space location.
InstancePtr | pointer to XPciePsu Instance Pointer |
Bus | |
Device | |
Function | |
Offset | location of the address to read data from. |
DataPtr | pointer store date available in the offset |
u8 XPciePsu_WriteConfigSpace | ( | XPciePsu * | InstancePtr, |
u8 | Bus, | ||
u8 | Device, | ||
u8 | Function, | ||
u16 | Offset, | ||
u32 | Data | ||
) |
This function write to remote configuration space location.
InstancePtr | pointer to XPciePsu Instance Pointer |
Bus | |
Device | |
Function | |
Offset | location of the address to write data. |
Data | to be written on to the offset |
References XPciePsu_ComposeExternalConfigAddress().