pciepsu
Vitis Drivers API Documentation
|
Implements all of functions for psu_pci IP driver except interrupts and initialization.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 bs 08/21/2018 First release
Functions | |
u32 | XPciePsu_ReadReg (UINTPTR BaseAddr, u32 RegOffset) |
This function reads a register value from specificied offset. More... | |
void | XPciePsu_WriteReg (UINTPTR BaseAddr, u32 RegOffset, u32 Val) |
This function writes a register value to specificied offset. More... | |
u32 | XPciePsu_ComposeExternalConfigAddress (u8 Bus, u8 Device, u8 Function, u16 Offset) |
This function Composes configuration space location. 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... | |
u8 | XPciePsu_ReadLocalConfigSpace (XPciePsu *InstancePtr, u16 Offset, u32 *DataPtr) |
Read 32-bit value from one of this IP own configuration space. More... | |
u8 | XPciePsu_WriteLocalConfigSpace (XPciePsu *InstancePtr, u16 Offset, u32 Data) |
Write 32-bit value to one of this IP own configuration space. More... | |
u8 | XPciePsu_EnumerateBus (XPciePsu *InstancePtr) |
This function starts PCIe enumeration. More... | |
u32 | XPciePsu_CfgInitialize (XPciePsu *InstancePtr, const XPciePsu_Config *CfgPtr, UINTPTR EffectiveBrgAddress) |
This function initializes the config space and PCIe bridge. More... | |
u32 XPciePsu_CfgInitialize | ( | XPciePsu * | InstancePtr, |
const 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_ReadConfigSpace(), and XPciePsu_WriteConfigSpace().
u8 XPciePsu_EnumerateBus | ( | XPciePsu * | InstancePtr | ) |
This function starts PCIe enumeration.
InstancePtr | pointer to XPciePsu Instance Pointer |
Referenced by main().
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 |
References XPciePsu_ComposeExternalConfigAddress(), and XPciePsu_ReadReg().
Referenced by XPciePsu_HasCapability(), and XPciePsu_PrintAllCapabilites().
u8 XPciePsu_ReadLocalConfigSpace | ( | XPciePsu * | InstancePtr, |
u16 | Offset, | ||
u32 * | DataPtr | ||
) |
Read 32-bit value from one of this IP own configuration space.
Location is identified by its offset from the beginning of the configuration space.
InstancePtr | is the XPciePsu instance to operate on. |
Offset | from beginning of IP own configuration space. |
DataPtr | is a pointer to a variable where the driver will pass back the value read from the specified location. |
References XPciePsu_ReadReg().
Referenced by PcieInitRootComplex().
u32 XPciePsu_ReadReg | ( | UINTPTR | BaseAddr, |
u32 | RegOffset | ||
) |
This function reads a register value from specificied offset.
BaseAddr | BaseAddr of the register |
RegOffset | Offset from the base address to be read |
Referenced by XPciePsu_EP_BridgeInitialize(), XPciePsu_EP_IntrHandler(), XPciePsu_EP_SetupIngress(), XPciePsu_EP_WaitForEnumeration(), XPciePsu_EP_WaitForLinkup(), XPciePsu_ReadConfigSpace(), XPciePsu_ReadLocalConfigSpace(), and XPciePsu_WriteConfigSpace().
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(), XPciePsu_ReadReg(), and XPciePsu_WriteReg().
u8 XPciePsu_WriteLocalConfigSpace | ( | XPciePsu * | InstancePtr, |
u16 | Offset, | ||
u32 | Data | ||
) |
Write 32-bit value to one of this IP own configuration space.
Location is identified by its offset from the begginning of the configuration space.
InstancePtr | is the PCIe component to operate on. |
Offset | from beggininng of IP own configuration space. |
Data | to be written to the specified location. |
References XPciePsu_WriteReg().
Referenced by PcieInitRootComplex().
void XPciePsu_WriteReg | ( | UINTPTR | BaseAddr, |
u32 | RegOffset, | ||
u32 | Val | ||
) |
This function writes a register value to specificied offset.
BaseAddr | Base Address of the register |
RegOffset | Offset from the base address to be written |
Val | Value to be written |
Referenced by XPciePsu_EP_BridgeInitialize(), XPciePsu_EP_IntrHandler(), XPciePsu_EP_SetupIngress(), XPciePsu_WriteConfigSpace(), and XPciePsu_WriteLocalConfigSpace().