|
AM243x MCU+ SDK
10.00.00
|
|
Go to the documentation of this file.
66 #define PCIE_MAX_PERIPHS (4U)
72 #define PCIE_MAX_MSI_IRQ (32U)
78 #define PCIE_MAX_MSIX_IRQ (2048U)
84 #define PCIE_MAX_NUM_IBATU (6U)
563 typedef struct Pcie_BarCfg_s {
588 typedef struct Pcie_IbTransCfg_s {
607 typedef struct Pcie_AtuRegionParams_s
768 uint32_t *vendorId, uint32_t *deviceId);
@ PCIE_INT_PIND
Definition: pcie/pcie.h:153
uint32_t lowerBaseAddr
Definition: pcie/pcie.h:268
uint32_t msiMmc
Definition: pcie/pcie.h:423
Pcie_RegisterMsixIsrParams specifies the parameters to register an ISR for MSIX.
Definition: pcie/pcie.h:315
Pcie_Attrs * attrs
Definition: pcie/pcie.h:494
Pcie_MsixIsr isr
Definition: pcie/pcie.h:317
@ PCIE_EP_MODE
Definition: pcie/pcie.h:95
@ PCIE_LTSSM_CFG_LINKWD_ACEPT
Definition: pcie/pcie.h:524
uint32_t upperBaseAddr
Definition: pcie/pcie.h:249
@ PCIE_LTSSM_CFG_COMPLETE
Definition: pcie/pcie.h:527
@ PCIE_LTSSM_LPBK_ENTRY
Definition: pcie/pcie.h:542
void * cfgBase
Definition: pcie/pcie.h:168
Pcie_Config gPcieConfig[]
Externally defined driver configuration array.
uint32_t lowerTargetAddr
Definition: pcie/pcie.h:274
uint8_t barxc
Definition: pcie/pcie.h:579
PCIe atributes.
Definition: pcie/pcie.h:375
@ PCIE_BAR_RSVD
Definition: pcie/pcie.h:192
Pcie_IbAtuCfg specifies the Inbound ATU configurations for PCIe.
Definition: pcie/pcie.h:262
uint32_t barCfg
Definition: pcie/pcie.h:280
uint16_t size
Definition: tisci_boardcfg.h:1
uint32_t barNumber
Definition: pcie/pcie.h:623
@ PCIE_LTSSM_RCVRY_EQ3
Definition: pcie/pcie.h:551
@ PCIE_LTSSM_RCVRY_IDLE
Definition: pcie/pcie.h:532
Pcie_AtuRegionMatchMode matchMode
Definition: pcie/pcie.h:619
uint32_t lowerTargetAddr
Definition: pcie/pcie.h:643
@ PCIE_TLP_TYPE_MEM
Definition: pcie/pcie.h:222
void Pcie_close(Pcie_Handle handle)
Function to close PCIe peripheral specified by PCIe handle.
uint32_t ibOffsetAddr
Definition: pcie/pcie.h:596
Pcie_PwrState
Enumeration for PCIE Power State.
Definition: pcie/pcie.h:138
PCIe MSIx table entry.
Definition: pcie/pcie.h:352
uint32_t upperTargetAddr
Definition: pcie/pcie.h:255
int32_t Pcie_setPwrStateIrq(Pcie_Handle handle, int enable)
Enable power management state interrupt in PCIE Controller.
Pcie_Mode operationMode
Definition: pcie/pcie.h:379
int32_t Pcie_getPwrState(Pcie_Handle handle, Pcie_PwrState *pwrState)
Get current PCIe Power State.
int32_t Pcie_LtssmCtrl(Pcie_Handle handle, uint8_t enable)
Enable/disable PCIe link training.
@ PCIE_TLP_TYPE_CFG
Definition: pcie/pcie.h:224
@ PCIE_REFCLK_MODE_EXT_NOSSC
Definition: pcie/pcie.h:120
uint32_t intNum
Definition: pcie/pcie.h:308
@ PCIE_LTSSM_RCVRY_SPEED
Definition: pcie/pcie.h:530
@ PCIE_LTSSM_LPBK_EXIT_TIMEOUT
Definition: pcie/pcie.h:545
int32_t Pcie_ackLnkDwnStateIrq(Pcie_Handle handle)
Acknowledge link down status interrupt.
uint16_t index
Definition: tisci_rm_proxy.h:3
@ PCIE_REFCLK_MODE_INT_SSC_OUTEN
Definition: pcie/pcie.h:119
The Pcie_DeviceCfg is used to specify device level configuration of the driver instance.
Definition: pcie/pcie.h:166
@ PCIE_LTSSM_HOT_RESET_ENTRY
Definition: pcie/pcie.h:546
PCIe device configuration.
Definition: pcie/pcie.h:467
Pcie_BarType
These are the possible values for Type BAR configuration.
Definition: pcie/pcie.h:190
int32_t Pcie_getLinkParams(Pcie_Handle handle, Pcie_Gen *gen, uint32_t *numLanes)
Get current PCIe Link Parameter.
Pcie_IntPin
Enumeration for PCIE Legacy Interrupt Pin.
Definition: pcie/pcie.h:148
Definition: pcie/pcie.h:362
uint32_t upperBaseAddr
Definition: pcie/pcie.h:270
Inbound traslation configuration info The Pcie_IbTransCfg is used to configure the Inbound Translatio...
Definition: pcie/pcie.h:588
Pcie_SRIS_Mode
Enumeration for PCIe SRIS mode.
Definition: pcie/pcie.h:129
@ PCIE_LTSSM_L1_IDLE
Definition: pcie/pcie.h:536
@ PCIE_LTSSM_RCVRY_LOCK
Definition: pcie/pcie.h:529
@ PCIE_ATU_REGION_DIR_OUTBOUND
Definition: pcie/pcie.h:212
uint8_t barxa
Definition: pcie/pcie.h:581
Pcie_MsixTbl * epMsixTbl
Definition: pcie/pcie.h:439
uint32_t msiRingNum
Definition: pcie/pcie.h:417
Pcie_ObAtuCfg * obAtu
Definition: pcie/pcie.h:405
uint32_t regionIndex
Definition: pcie/pcie.h:264
uint16_t subSystemId
Definition: pcie/pcie.h:387
Pcie_BarMem memSpace
Definition: pcie/pcie.h:575
@ PCIE_ATU_REGION_MATCH_MODE_BAR
Definition: pcie/pcie.h:234
@ PCIE_LTSSM_LPBK_EXIT
Definition: pcie/pcie.h:544
uint32_t upperTargetAddr
Definition: pcie/pcie.h:276
int32_t Pcie_setInterfaceMode(Pcie_Handle handle, Pcie_Mode mode, Pcie_Gen gen)
Set interfac mode (RC/EP)
Pcie_AtuRegionDir
Enum to select PCIe ATU(Address translation unit) region direction(Inbound or Outbound)....
Definition: pcie/pcie.h:211
uint16_t vendorId
Definition: pcie/pcie.h:381
int32_t Pcie_setLanes(Pcie_Handle handle)
Set number of PCIe lanes as configured.
@ PCIE_PWR_STATE_D0
Definition: pcie/pcie.h:139
Pcie_TlpType
This enum is used to select PCIe TLP(Transaction layer packet) type while configuring inbound or outb...
Definition: pcie/pcie.h:221
uint32_t lowerBaseAddr
Definition: pcie/pcie.h:628
Pcie_BarPref
These are the possible values for Prefetch BAR configuration.
Definition: pcie/pcie.h:181
@ PCIE_TLP_TYPE_IO
Definition: pcie/pcie.h:223
int32_t Pcie_cfgEP(Pcie_Handle handle)
Configure Pcie for EP (End Point) operation. PCIe mode setting is NOT done here (Pcie_setInterfaceMod...
@ PCIE_LTSSM_DETECT_WAIT
Definition: pcie/pcie.h:522
int32_t Pcie_setCfgEn(Pcie_Handle handle, int enable)
Set CONFIG_ENABLE to signal RC that the local EP configuration is completed.
Pcie_Location
Enumeration for PCIe access type remote/local.
Definition: pcie/pcie.h:506
Pcie_MsiIsr isr
Definition: pcie/pcie.h:299
@ PCIE_LTSSM_DISABLED_IDLE
Definition: pcie/pcie.h:540
@ PCIE_LTSSM_POLL_CONFIG
Definition: pcie/pcie.h:520
uint32_t msiMme
Definition: pcie/pcie.h:425
void(* Pcie_MsixIsr)(void *arg, uint32_t msixData)
Function pointer for the PCIe MSIx ISR.
Definition: pcie/pcie.h:291
@ PCIE_GEN3
Definition: pcie/pcie.h:107
#define PCIE_MAX_MSI_IRQ
Maximum PCIe MSI interrupts supported.
Definition: pcie/pcie.h:72
@ PCIE_LEGACY_EP_MODE
Definition: pcie/pcie.h:96
uint32_t regionWindowSize
Definition: pcie/pcie.h:272
uint8_t classCode
Definition: pcie/pcie.h:389
Pcie_DeviceCfgBaseAddr * Pcie_handleGetBases(Pcie_Handle handle)
Get the device base address info for the PCIe peripheral.
@ PCIE_LTSSM_CFG_IDLE
Definition: pcie/pcie.h:528
Pcie_DeviceCfgBaseAddr * bases
Definition: pcie/pcie.h:454
uint32_t msiGlobalEventNum
Definition: pcie/pcie.h:415
void * arg
Definition: pcie/pcie.h:319
PCIe BAR configuration info.
Definition: pcie/pcie.h:563
uint32_t msixRingNum
Definition: pcie/pcie.h:433
uint32_t ibStartAddrHi
Definition: pcie/pcie.h:594
@ PCIE_BAR_MEM_IO
Definition: pcie/pcie.h:202
Pcie_LtssmState
Enumeration for possible values for encoding LTSSM state.
Definition: pcie/pcie.h:515
@ PCIE_BAR_TYPE64
Definition: pcie/pcie.h:193
Pcie_TlpType tlpType
Definition: pcie/pcie.h:613
Pcie_BarType type
Definition: pcie/pcie.h:573
int32_t Pcie_setHotResetIrq(Pcie_Handle handle, int enable)
Enable hot reset interrupt in PCIE Controller.
@ PCIE_LTSSM_LPBK_ACTIVE
Definition: pcie/pcie.h:543
@ PCIE_REFCLK_MODE_INT_NOSSC_OUTDIS
Definition: pcie/pcie.h:116
uint32_t ibStartAddrLo
Definition: pcie/pcie.h:592
uint8_t subClassCode
Definition: pcie/pcie.h:391
@ PCIE_INT_PINA
Definition: pcie/pcie.h:150
Pcie_Handle Pcie_open(uint32_t index)
This function opens a given PCIe peripheral.
@ PCIE_LTSSM_PRE_DETECT_QUIET
Definition: pcie/pcie.h:521
@ PCIE_BAR_MEM_MEM
Definition: pcie/pcie.h:201
@ PCIE_REFCLK_MODE_EXT_SSC
Definition: pcie/pcie.h:121
@ PCIE_BAR_NON_PREF
Definition: pcie/pcie.h:182
Pcie_Mode
These are the possible values for PCIe mode.
Definition: pcie/pcie.h:94
@ PCIE_LTSSM_L2_IDLE
Definition: pcie/pcie.h:537
uint32_t vector_ctrl
Definition: pcie/pcie.h:358
@ PCIE_PWR_STATE_D1
Definition: pcie/pcie.h:140
@ PCIE_LTSSM_RCVRY_RCVRCFG
Definition: pcie/pcie.h:531
@ PCIE_LTSSM_DISABLED_ENTRY
Definition: pcie/pcie.h:539
PCIe MSI Isr control structure.
Definition: pcie/pcie.h:332
uint32_t intNum
Definition: pcie/pcie.h:326
uint32_t msixIntNum
Definition: pcie/pcie.h:435
int32_t Pcie_setDwnStrIrq(Pcie_Handle handle, int enable)
Enable downstream interrupt in PCIE Controller.
void * devParams
Definition: pcie/pcie.h:174
uint8_t * msiRingMem
Definition: pcie/pcie.h:429
@ PCIE_REFCLK_MODE_INT_NOSSC_OUTEN
Definition: pcie/pcie.h:118
@ PCIE_GEN2
Definition: pcie/pcie.h:106
@ PCIE_RC_MODE
Definition: pcie/pcie.h:97
uint32_t dataReserved
Definition: pcie/pcie.h:172
PCIe configuration for initalization.
Definition: pcie/pcie.h:479
Pcie_Gen
Enumeration for PCIE generations.
Definition: pcie/pcie.h:104
@ PCIE_INT_PINB
Definition: pcie/pcie.h:151
uint32_t msixGlobalEventNum
Definition: pcie/pcie.h:431
This Structure defines the ATU region parameters.
Definition: pcie/pcie.h:608
uint32_t upperTargetAddr
Definition: pcie/pcie.h:648
int32_t Pcie_getMemSpaceReserved(Pcie_Handle handle, uint32_t *resSize)
Pcie_getMemSpaceReserved returns amount of reserved space between beginning of hardware's data area a...
Pcie_ObAtuCfg specifies the Outbound ATU configurations for PCIe.
Definition: pcie/pcie.h:241
uint32_t msixIrqEnableFlag
Definition: pcie/pcie.h:437
@ PCIE_LOCATION_REMOTE
Definition: pcie/pcie.h:508
uint32_t obAtuNum
Definition: pcie/pcie.h:407
int32_t Pcie_atuRegionConfig(Pcie_Handle handle, Pcie_Location location, uint32_t atuRegionIndex, const Pcie_AtuRegionParams *atuRegionParams)
Configure address translation registers.
uint32_t deviceNum
Definition: pcie/pcie.h:377
@ PCIE_LTSSM_DETECT_QUIET
Definition: pcie/pcie.h:516
void * arg
Definition: pcie/pcie.h:301
Pcie_AtuRegionDir regionDir
Definition: pcie/pcie.h:609
#define PCIE_MAX_PERIPHS
Maximum PCIe devices supported by the driver.
Definition: pcie/pcie.h:66
void * dataBase
Definition: pcie/pcie.h:170
Pcie_IntPin intPin
Definition: pcie/pcie.h:413
@ PCIE_INT_PINNONE
Definition: pcie/pcie.h:149
uint32_t lowerTargetAddr
Definition: pcie/pcie.h:253
int32_t Pcie_cfgRC(Pcie_Handle handle)
Configure Pcie for RC (Root Complex) operation. PCIe mode setting is NOT done here (Pcie_setInterface...
int32_t Pcie_cfgBar(Pcie_Handle handle, const Pcie_BarCfg *barCfg)
Configure a BAR Register (32 bits)
Pcie_TlpType tlpType
Definition: pcie/pcie.h:245
@ PCIE_LTSSM_DISABLED
Definition: pcie/pcie.h:541
@ PCIE_GEN1
Definition: pcie/pcie.h:105
Pcie_Gen gen
Definition: pcie/pcie.h:397
uint32_t base
Definition: pcie/pcie.h:569
int32_t Pcie_waitLinkUp(Pcie_Handle handle)
Wait for PCIe link training to complete.
uint8_t progIntrface
Definition: pcie/pcie.h:393
@ PCIE_REFCLK_SRIS_DISABLED
Definition: pcie/pcie.h:130
@ PCIE_LTSSM_CFG_LINKWD_START
Definition: pcie/pcie.h:523
@ PCIE_LTSSM_CFG_LANENUM_WAIT
Definition: pcie/pcie.h:525
char mode[32]
Definition: tisci_pm_core.h:1
@ PCIE_ATU_REGION_DIR_INBOUND
Definition: pcie/pcie.h:213
void(* Pcie_MsiIsr)(void *arg, uint32_t msiData)
Function pointer for the PCIe MSI ISR.
Definition: pcie/pcie.h:286
uint32_t regionIndex
Definition: pcie/pcie.h:243
uint8_t * msixRingMem
Definition: pcie/pcie.h:443
Pcie_RegisterMsiIsrParams specifies the parameters to register an ISR for MSI.
Definition: pcie/pcie.h:297
Pcie_SRIS_Mode sris_mode
Definition: pcie/pcie.h:403
uint32_t regionWindowSize
Definition: pcie/pcie.h:251
@ PCIE_LTSSM_L0
Definition: pcie/pcie.h:533
uintptr_t addr
Definition: pcie/pcie.h:354
@ PCIE_LTSSM_POLL_COMPLIANCE
Definition: pcie/pcie.h:519
Pcie_Location location
Definition: pcie/pcie.h:565
uint32_t lowerBaseAddr
Definition: pcie/pcie.h:247
uint8_t idx
Definition: pcie/pcie.h:577
uint32_t gPcieConfigNum
Externally defined driver configuration array size.
int32_t Pcie_checkLinkParams(Pcie_Handle handle)
Verify if the link parameters is established as configured.
uint32_t numLanes
Definition: pcie/pcie.h:399
uint8_t region
Definition: pcie/pcie.h:598
uint32_t ibAtuNum
Definition: pcie/pcie.h:411
@ PCIE_LOCATION_LOCAL
Definition: pcie/pcie.h:507
Pcie_RefClk_Mode
Enumeration for PCIe Reference Clock mode.
Definition: pcie/pcie.h:115
void * Pcie_Handle
Driver handle returned by Pcie_open() call.
Definition: pcie/pcie.h:159
uint32_t msiIrqEnableFlag
Definition: pcie/pcie.h:421
Pcie_Object * object
Definition: pcie/pcie.h:493
ISR and arguement list for MSIx.
Definition: pcie/pcie.h:342
Pcie_MsiIsrCtrl * msiIsrCtrl
Definition: pcie/pcie.h:427
int32_t Pcie_ackPwrStateIrq(Pcie_Handle handle)
Acknowledge power management state interrupt.
@ PCIE_LTSSM_L2_WAKE
Definition: pcie/pcie.h:538
uint32_t barAperture
Definition: pcie/pcie.h:278
PCIE global configuration array.
Definition: pcie/pcie.h:492
#define PCIE_MAX_MSIX_IRQ
Maxmium number of MSIx interrupts supported.
Definition: pcie/pcie.h:78
@ PCIE_BAR_PREF
Definition: pcie/pcie.h:183
Pcie_TlpType tlpType
Definition: pcie/pcie.h:266
@ PCIE_LTSSM_L0S
Definition: pcie/pcie.h:534
int32_t Pcie_isLinkUp(Pcie_Handle handle)
Check if PCIe link training completed.
PCIe driver object.
Definition: pcie/pcie.h:450
@ PCIE_REFCLK_SRIS_ENABLED
Definition: pcie/pcie.h:131
Pcie_MsixIsrCtrl * msixIsrCtrl
Definition: pcie/pcie.h:441
Pcie_Mode mode
Definition: pcie/pcie.h:567
uint32_t msiIntNum
Definition: pcie/pcie.h:419
Pcie_DeviceCfg dev
Definition: pcie/pcie.h:481
@ PCIE_BAR_TYPE32
Definition: pcie/pcie.h:191
uint8_t ibBar
Definition: pcie/pcie.h:590
@ PCIE_PWR_STATE_D3hot
Definition: pcie/pcie.h:141
@ PCIE_LTSSM_CFG_LANENUM_ACEPT
Definition: pcie/pcie.h:526
uint8_t revId
Definition: pcie/pcie.h:395
@ PCIE_LTSSM_RCVRY_EQ0
Definition: pcie/pcie.h:548
int32_t Pcie_setLnkDwnStateIrq(Pcie_Handle handle, int enable)
Enable link down status interrupt in PCIE Controller.
Pcie_AtuRegionMatchMode
Enum to select address or BAR match mode.
Definition: pcie/pcie.h:232
int32_t Pcie_getMemSpaceRange(Pcie_Handle handle, void **base, uint32_t *size)
Returns the PCIe Internal Address Range for the memory space. This range is used for accessing memory...
int32_t Pcie_setSlotClockCnfg(Pcie_Handle handle, int enable)
Set slot clock configuration bit in Link Status Register.
uint16_t subSysVendorId
Definition: pcie/pcie.h:385
Pcie_BarMem
These are the possible values for Memory BAR configuration.
Definition: pcie/pcie.h:200
Pcie_Handle handle
Definition: pcie/pcie.h:452
@ PCIE_ATU_REGION_MATCH_MODE_ADDR
Definition: pcie/pcie.h:233
@ PCIE_LTSSM_RCVRY_EQ1
Definition: pcie/pcie.h:549
void Pcie_init(void)
This function initializes the PCIe module.
int32_t Pcie_ackDwnStrIrq(Pcie_Handle handle)
Acknowledge downstream interrupt.
uint32_t upperBaseAddr
Definition: pcie/pcie.h:633
Pcie_RefClk_Mode refclk_mode
Definition: pcie/pcie.h:401
uint32_t enableRegion
Definition: pcie/pcie.h:617
Pcie_BarPref prefetch
Definition: pcie/pcie.h:571
@ PCIE_LTSSM_L123_SEND_EIDLE
Definition: pcie/pcie.h:535
Pcie_IbAtuCfg * ibAtu
Definition: pcie/pcie.h:409
@ PCIE_LTSSM_RCVRY_EQ2
Definition: pcie/pcie.h:550
int32_t Pcie_getVendorId(Pcie_Handle handle, Pcie_Location location, uint32_t *vendorId, uint32_t *deviceId)
Get vendor ID and device ID of Pcie Device.
@ PCIE_LTSSM_HOT_RESET
Definition: pcie/pcie.h:547
@ PCIE_LTSSM_POLL_ACTIVE
Definition: pcie/pcie.h:518
uint64_t regionWindowSize
Definition: pcie/pcie.h:638
@ PCIE_INT_PINC
Definition: pcie/pcie.h:152
uint16_t deviceId
Definition: pcie/pcie.h:383
uint32_t data
Definition: pcie/pcie.h:356
@ PCIE_REFCLK_MODE_INT_SSC_OUTDIS
Definition: pcie/pcie.h:117
uint32_t cfgDone
Definition: pcie/pcie.h:456
@ PCIE_LTSSM_DETECT_ACT
Definition: pcie/pcie.h:517