AM64x MCU+ SDK  08.05.00
pcie/pcie.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
50 #ifndef PCIE_H_
51 #define PCIE_H_
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 #include <stdint.h>
58 
59 /* ========================================================================== */
60 /* Macros */
61 /* ========================================================================== */
62 
66 #define PCIE_MAX_PERIPHS (4U)
67 
72 #define PCIE_MAX_MSI_IRQ (32U)
73 
78 #define PCIE_MAX_MSIX_IRQ (2048U)
79 
80 /* ========================================================================== */
81 /* Structures and Enums */
82 /* ========================================================================== */
83 
87 typedef enum
88 {
93 
97 typedef enum
98 {
99  PCIE_GEN1 = 1,
100  PCIE_GEN2 = 2,
101  PCIE_GEN3 = 3,
102 } Pcie_Gen;
103 
107 typedef void *Pcie_Handle;
108 
113 typedef struct
114 {
116  void *cfgBase;
118  void *dataBase;
120  uint32_t dataReserved;
122  void *devParams;
124 
128 typedef enum
129 {
133 
137 typedef enum
138 {
143 
147 typedef enum
148 {
152 
158 typedef enum Pcie_AtuRegionDir
159 {
163 
168 typedef enum Pcie_TlpType
169 {
175 
180 {
184 
188 typedef struct
189 {
191  uint32_t regionIndex;
195  uint32_t lowerBaseAddr;
197  uint32_t upperBaseAddr;
201  uint32_t lowerTargetAddr;
203  uint32_t upperTargetAddr;
204 } Pcie_ObAtuCfg;
205 
209 typedef struct
210 {
212  uint32_t regionIndex;
216  uint32_t lowerBaseAddr;
218  uint32_t upperBaseAddr;
222  uint32_t lowerTargetAddr;
224  uint32_t upperTargetAddr;
226  uint32_t barAperture;
228  uint32_t barCfg;
229 } Pcie_IbAtuCfg;
230 
234 typedef void (*Pcie_MsiIsr)(void *arg, uint32_t msiData);
235 
239 typedef void (*Pcie_MsixIsr)(void *arg, uint32_t msixData);
240 
245 typedef struct {
249  void *arg;
256  uint32_t intNum;
258 
263 typedef struct {
267  void *arg;
274  uint32_t intNum;
276 
280 typedef struct {
284  void *isrArgs[PCIE_MAX_MSI_IRQ];
286 
290 typedef struct {
294  void *isrArgs[PCIE_MAX_MSIX_IRQ];
296 
300 typedef struct {
301  /* Address to write to for MSIx interrupt */
302  uintptr_t addr;
303  /* Data to write to for MSIx interrupt */
304  uint32_t data;
305  /* Indentifies if a function is restricted from sending MSIx */
306  uint32_t vector_ctrl;
308 
309 typedef struct
310 {
312 } Pcie_MsixTbl;
313 
322 typedef struct
323 {
325  uint32_t deviceNum;
331  uint32_t numLanes;
335  uint32_t obAtuNum;
339  uint32_t ibAtuNum;
343  uint32_t msiRingNum;
345  uint32_t msiIntNum;
351  uint8_t *msiRingMem;
355  uint32_t msixRingNum;
357  uint32_t msixIntNum;
365  uint8_t *msixRingMem;
366 } Pcie_Attrs;
367 
371 typedef struct
372 {
378  uint32_t cfgDone;
379 } Pcie_Object;
380 
388 typedef struct
389 {
393 
400 typedef struct
401 {
404 } Pcie_InitCfg;
405 
406 
413 typedef struct
414 {
417 } Pcie_Config;
418 
427 typedef enum
428 {
432 
436 typedef enum
437 {
475 
485 typedef struct Pcie_BarCfg_s {
491  uint32_t base;
499  uint8_t idx;
501  uint8_t barxc;
503  uint8_t barxa;
504 } Pcie_BarCfg;
505 
510 typedef struct Pcie_IbTransCfg_s {
512  uint8_t ibBar;
514  uint32_t ibStartAddrLo;
516  uint32_t ibStartAddrHi;
518  uint32_t ibOffsetAddr;
520  uint8_t region;
522 
529 typedef struct Pcie_AtuRegionParams_s
530 {
539  uint32_t enableRegion;
545  uint32_t barNumber;
550  uint32_t lowerBaseAddr;
555  uint32_t upperBaseAddr;
565  uint32_t lowerTargetAddr;
570  uint32_t upperTargetAddr;
576 
578 extern Pcie_Config gPcieConfig[];
580 extern uint32_t gPcieConfigNum;
581 
582 /* ========================================================================== */
583 /* Function Declarations */
584 /* ========================================================================== */
585 
589 void Pcie_init(void);
590 
602 
610 void Pcie_close(Pcie_Handle handle);
611 
620 
630 
641 int32_t Pcie_getMemSpaceReserved (Pcie_Handle handle, uint32_t *resSize);
642 
653 int32_t Pcie_getMemSpaceRange (Pcie_Handle handle, void **base, uint32_t *size);
654 
663 int32_t Pcie_cfgBar (Pcie_Handle handle, const Pcie_BarCfg *barCfg);
664 
676  uint32_t atuRegionIndex, const Pcie_AtuRegionParams *atuRegionParams);
677 
688 int32_t Pcie_getVendorId(Pcie_Handle handle, Pcie_Location location,
689  uint32_t *vendorId, uint32_t *deviceId);
690 
698 int32_t Pcie_waitLinkUp(Pcie_Handle handle);
699 
710 
719 int32_t Pcie_LtssmCtrl (Pcie_Handle handle, uint8_t enable);
720 
728 int32_t Pcie_setLanes (Pcie_Handle handle);
729 
738 int32_t Pcie_cfgEP (Pcie_Handle handle);
739 
748 int32_t Pcie_cfgRC (Pcie_Handle handle);
749 
750 #ifdef __cplusplus
751 }
752 #endif
753 
754 #endif /* PCIE_H_ */
755 
Pcie_IbAtuCfg::lowerBaseAddr
uint32_t lowerBaseAddr
Definition: pcie/pcie.h:216
Pcie_RegisterMsixIsrParams
Pcie_RegisterMsixIsrParams specifies the parameters to register an ISR for MSIX.
Definition: pcie/pcie.h:263
Pcie_Config::attrs
Pcie_Attrs * attrs
Definition: pcie/pcie.h:416
Pcie_RegisterMsixIsrParams::isr
Pcie_MsixIsr isr
Definition: pcie/pcie.h:265
PCIE_EP_MODE
@ PCIE_EP_MODE
Definition: pcie/pcie.h:89
PCIE_LTSSM_CFG_LINKWD_ACEPT
@ PCIE_LTSSM_CFG_LINKWD_ACEPT
Definition: pcie/pcie.h:446
Pcie_ObAtuCfg::upperBaseAddr
uint32_t upperBaseAddr
Definition: pcie/pcie.h:197
PCIE_LTSSM_CFG_COMPLETE
@ PCIE_LTSSM_CFG_COMPLETE
Definition: pcie/pcie.h:449
PCIE_LTSSM_LPBK_ENTRY
@ PCIE_LTSSM_LPBK_ENTRY
Definition: pcie/pcie.h:464
Pcie_DeviceCfgBaseAddr::cfgBase
void * cfgBase
Definition: pcie/pcie.h:116
gPcieConfig
Pcie_Config gPcieConfig[]
Externally defined driver configuration array.
Pcie_IbAtuCfg::lowerTargetAddr
uint32_t lowerTargetAddr
Definition: pcie/pcie.h:222
Pcie_BarCfg::barxc
uint8_t barxc
Definition: pcie/pcie.h:501
Pcie_Attrs
PCIe atributes.
Definition: pcie/pcie.h:323
PCIE_BAR_RSVD
@ PCIE_BAR_RSVD
Definition: pcie/pcie.h:140
Pcie_IbAtuCfg
Pcie_IbAtuCfg specifies the Inbound ATU configurations for PCIe.
Definition: pcie/pcie.h:210
Pcie_IbAtuCfg::barCfg
uint32_t barCfg
Definition: pcie/pcie.h:228
size
uint16_t size
Definition: tisci_boardcfg.h:1
Pcie_AtuRegionParams::barNumber
uint32_t barNumber
Definition: pcie/pcie.h:545
PCIE_LTSSM_RCVRY_EQ3
@ PCIE_LTSSM_RCVRY_EQ3
Definition: pcie/pcie.h:473
PCIE_LTSSM_RCVRY_IDLE
@ PCIE_LTSSM_RCVRY_IDLE
Definition: pcie/pcie.h:454
Pcie_AtuRegionParams::matchMode
Pcie_AtuRegionMatchMode matchMode
Definition: pcie/pcie.h:541
Pcie_AtuRegionParams::lowerTargetAddr
uint32_t lowerTargetAddr
Definition: pcie/pcie.h:565
PCIE_TLP_TYPE_MEM
@ PCIE_TLP_TYPE_MEM
Definition: pcie/pcie.h:170
Pcie_close
void Pcie_close(Pcie_Handle handle)
Function to close PCIe peripheral specified by PCIe handle.
Pcie_IbTransCfg::ibOffsetAddr
uint32_t ibOffsetAddr
Definition: pcie/pcie.h:518
Pcie_MsixTblEntry
PCIe MSIx table entry.
Definition: pcie/pcie.h:300
Pcie_ObAtuCfg::upperTargetAddr
uint32_t upperTargetAddr
Definition: pcie/pcie.h:203
Pcie_Attrs::operationMode
Pcie_Mode operationMode
Definition: pcie/pcie.h:327
Pcie_LtssmCtrl
int32_t Pcie_LtssmCtrl(Pcie_Handle handle, uint8_t enable)
Enable/disable PCIe link training.
PCIE_TLP_TYPE_CFG
@ PCIE_TLP_TYPE_CFG
Definition: pcie/pcie.h:172
Pcie_RegisterMsiIsrParams::intNum
uint32_t intNum
Definition: pcie/pcie.h:256
PCIE_LTSSM_RCVRY_SPEED
@ PCIE_LTSSM_RCVRY_SPEED
Definition: pcie/pcie.h:452
PCIE_LTSSM_LPBK_EXIT_TIMEOUT
@ PCIE_LTSSM_LPBK_EXIT_TIMEOUT
Definition: pcie/pcie.h:467
index
uint16_t index
Definition: tisci_rm_proxy.h:3
Pcie_DeviceCfgBaseAddr
The Pcie_DeviceCfg is used to specify device level configuration of the driver instance.
Definition: pcie/pcie.h:114
PCIE_LTSSM_HOT_RESET_ENTRY
@ PCIE_LTSSM_HOT_RESET_ENTRY
Definition: pcie/pcie.h:468
Pcie_DeviceCfg
PCIe device configuration.
Definition: pcie/pcie.h:389
Pcie_BarType
Pcie_BarType
These are the possible values for Type BAR configuration.
Definition: pcie/pcie.h:138
Pcie_MsixTbl
Definition: pcie/pcie.h:310
Pcie_IbAtuCfg::upperBaseAddr
uint32_t upperBaseAddr
Definition: pcie/pcie.h:218
Pcie_IbTransCfg
Inbound traslation configuration info The Pcie_IbTransCfg is used to configure the Inbound Translatio...
Definition: pcie/pcie.h:510
PCIE_LTSSM_L1_IDLE
@ PCIE_LTSSM_L1_IDLE
Definition: pcie/pcie.h:458
PCIE_LTSSM_RCVRY_LOCK
@ PCIE_LTSSM_RCVRY_LOCK
Definition: pcie/pcie.h:451
PCIE_ATU_REGION_DIR_OUTBOUND
@ PCIE_ATU_REGION_DIR_OUTBOUND
Definition: pcie/pcie.h:160
Pcie_BarCfg::barxa
uint8_t barxa
Definition: pcie/pcie.h:503
Pcie_Attrs::epMsixTbl
Pcie_MsixTbl * epMsixTbl
Definition: pcie/pcie.h:361
Pcie_Attrs::msiRingNum
uint32_t msiRingNum
Definition: pcie/pcie.h:343
Pcie_Attrs::obAtu
Pcie_ObAtuCfg * obAtu
Definition: pcie/pcie.h:333
Pcie_IbAtuCfg::regionIndex
uint32_t regionIndex
Definition: pcie/pcie.h:212
Pcie_BarCfg::memSpace
Pcie_BarMem memSpace
Definition: pcie/pcie.h:497
PCIE_ATU_REGION_MATCH_MODE_BAR
@ PCIE_ATU_REGION_MATCH_MODE_BAR
Definition: pcie/pcie.h:182
PCIE_LTSSM_LPBK_EXIT
@ PCIE_LTSSM_LPBK_EXIT
Definition: pcie/pcie.h:466
Pcie_IbAtuCfg::upperTargetAddr
uint32_t upperTargetAddr
Definition: pcie/pcie.h:224
Pcie_AtuRegionDir
Pcie_AtuRegionDir
Enum to select PCIe ATU(Address translation unit) region direction(Inbound or Outbound)....
Definition: pcie/pcie.h:159
Pcie_setLanes
int32_t Pcie_setLanes(Pcie_Handle handle)
Set number of PCIe lanes as configured.
Pcie_TlpType
Pcie_TlpType
This enum is used to select PCIe TLP(Transaction layer packet) type while configuring inbound or outb...
Definition: pcie/pcie.h:169
Pcie_AtuRegionParams::lowerBaseAddr
uint32_t lowerBaseAddr
Definition: pcie/pcie.h:550
Pcie_BarPref
Pcie_BarPref
These are the possible values for Prefetch BAR configuration.
Definition: pcie/pcie.h:129
PCIE_TLP_TYPE_IO
@ PCIE_TLP_TYPE_IO
Definition: pcie/pcie.h:171
Pcie_cfgEP
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
@ PCIE_LTSSM_DETECT_WAIT
Definition: pcie/pcie.h:444
Pcie_Location
Pcie_Location
Enumeration for PCIe access type remote/local.
Definition: pcie/pcie.h:428
Pcie_RegisterMsiIsrParams::isr
Pcie_MsiIsr isr
Definition: pcie/pcie.h:247
PCIE_LTSSM_DISABLED_IDLE
@ PCIE_LTSSM_DISABLED_IDLE
Definition: pcie/pcie.h:462
PCIE_LTSSM_POLL_CONFIG
@ PCIE_LTSSM_POLL_CONFIG
Definition: pcie/pcie.h:442
Pcie_MsixIsr
void(* Pcie_MsixIsr)(void *arg, uint32_t msixData)
Function pointer for the PCIe MSIx ISR.
Definition: pcie/pcie.h:239
PCIE_GEN3
@ PCIE_GEN3
Definition: pcie/pcie.h:101
PCIE_MAX_MSI_IRQ
#define PCIE_MAX_MSI_IRQ
Maximum PCIe MSI interrupts supported.
Definition: pcie/pcie.h:72
PCIE_LEGACY_EP_MODE
@ PCIE_LEGACY_EP_MODE
Definition: pcie/pcie.h:90
Pcie_IbAtuCfg::regionWindowSize
uint32_t regionWindowSize
Definition: pcie/pcie.h:220
Pcie_handleGetBases
Pcie_DeviceCfgBaseAddr * Pcie_handleGetBases(Pcie_Handle handle)
Get the device base address info for the PCIe peripheral.
PCIE_LTSSM_CFG_IDLE
@ PCIE_LTSSM_CFG_IDLE
Definition: pcie/pcie.h:450
Pcie_Object::bases
Pcie_DeviceCfgBaseAddr * bases
Definition: pcie/pcie.h:376
Pcie_Attrs::msiGlobalEventNum
uint32_t msiGlobalEventNum
Definition: pcie/pcie.h:341
Pcie_RegisterMsixIsrParams::arg
void * arg
Definition: pcie/pcie.h:267
Pcie_BarCfg
PCIe BAR configuration info.
Definition: pcie/pcie.h:485
Pcie_Attrs::msixRingNum
uint32_t msixRingNum
Definition: pcie/pcie.h:355
Pcie_IbTransCfg::ibStartAddrHi
uint32_t ibStartAddrHi
Definition: pcie/pcie.h:516
Pcie_setInterfaceMode
int32_t Pcie_setInterfaceMode(Pcie_Handle handle, Pcie_Mode mode)
Set interfac mode (RC/EP)
PCIE_BAR_MEM_IO
@ PCIE_BAR_MEM_IO
Definition: pcie/pcie.h:150
Pcie_LtssmState
Pcie_LtssmState
Enumeration for possible values for encoding LTSSM state.
Definition: pcie/pcie.h:437
PCIE_BAR_TYPE64
@ PCIE_BAR_TYPE64
Definition: pcie/pcie.h:141
Pcie_AtuRegionParams::regionWindowSize
uint32_t regionWindowSize
Definition: pcie/pcie.h:560
Pcie_AtuRegionParams::tlpType
Pcie_TlpType tlpType
Definition: pcie/pcie.h:535
Pcie_BarCfg::type
Pcie_BarType type
Definition: pcie/pcie.h:495
PCIE_LTSSM_LPBK_ACTIVE
@ PCIE_LTSSM_LPBK_ACTIVE
Definition: pcie/pcie.h:465
Pcie_IbTransCfg::ibStartAddrLo
uint32_t ibStartAddrLo
Definition: pcie/pcie.h:514
Pcie_open
Pcie_Handle Pcie_open(uint32_t index)
This function opens a given PCIe peripheral.
PCIE_LTSSM_PRE_DETECT_QUIET
@ PCIE_LTSSM_PRE_DETECT_QUIET
Definition: pcie/pcie.h:443
PCIE_BAR_MEM_MEM
@ PCIE_BAR_MEM_MEM
Definition: pcie/pcie.h:149
PCIE_BAR_NON_PREF
@ PCIE_BAR_NON_PREF
Definition: pcie/pcie.h:130
Pcie_Mode
Pcie_Mode
These are the possible values for PCIe mode.
Definition: pcie/pcie.h:88
PCIE_LTSSM_L2_IDLE
@ PCIE_LTSSM_L2_IDLE
Definition: pcie/pcie.h:459
Pcie_MsixTblEntry::vector_ctrl
uint32_t vector_ctrl
Definition: pcie/pcie.h:306
PCIE_LTSSM_RCVRY_RCVRCFG
@ PCIE_LTSSM_RCVRY_RCVRCFG
Definition: pcie/pcie.h:453
PCIE_LTSSM_DISABLED_ENTRY
@ PCIE_LTSSM_DISABLED_ENTRY
Definition: pcie/pcie.h:461
Pcie_MsiIsrCtrl
PCIe MSI Isr control structure.
Definition: pcie/pcie.h:280
Pcie_RegisterMsixIsrParams::intNum
uint32_t intNum
Definition: pcie/pcie.h:274
Pcie_Attrs::msixIntNum
uint32_t msixIntNum
Definition: pcie/pcie.h:357
Pcie_DeviceCfgBaseAddr::devParams
void * devParams
Definition: pcie/pcie.h:122
Pcie_Attrs::msiRingMem
uint8_t * msiRingMem
Definition: pcie/pcie.h:351
PCIE_GEN2
@ PCIE_GEN2
Definition: pcie/pcie.h:100
PCIE_RC_MODE
@ PCIE_RC_MODE
Definition: pcie/pcie.h:91
Pcie_DeviceCfgBaseAddr::dataReserved
uint32_t dataReserved
Definition: pcie/pcie.h:120
Pcie_InitCfg
PCIe configuration for initalization.
Definition: pcie/pcie.h:401
Pcie_Gen
Pcie_Gen
Enumeration for PCIE generations.
Definition: pcie/pcie.h:98
Pcie_Attrs::msixGlobalEventNum
uint32_t msixGlobalEventNum
Definition: pcie/pcie.h:353
Pcie_AtuRegionParams
This Structure defines the ATU region parameters.
Definition: pcie/pcie.h:530
Pcie_AtuRegionParams::upperTargetAddr
uint32_t upperTargetAddr
Definition: pcie/pcie.h:570
Pcie_getMemSpaceReserved
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
Pcie_ObAtuCfg specifies the Outbound ATU configurations for PCIe.
Definition: pcie/pcie.h:189
Pcie_Attrs::msixIrqEnableFlag
uint32_t msixIrqEnableFlag
Definition: pcie/pcie.h:359
PCIE_LOCATION_REMOTE
@ PCIE_LOCATION_REMOTE
Definition: pcie/pcie.h:430
Pcie_Attrs::obAtuNum
uint32_t obAtuNum
Definition: pcie/pcie.h:335
Pcie_atuRegionConfig
int32_t Pcie_atuRegionConfig(Pcie_Handle handle, Pcie_Location location, uint32_t atuRegionIndex, const Pcie_AtuRegionParams *atuRegionParams)
Configure address translation registers.
Pcie_Attrs::deviceNum
uint32_t deviceNum
Definition: pcie/pcie.h:325
PCIE_LTSSM_DETECT_QUIET
@ PCIE_LTSSM_DETECT_QUIET
Definition: pcie/pcie.h:438
Pcie_RegisterMsiIsrParams::arg
void * arg
Definition: pcie/pcie.h:249
Pcie_AtuRegionParams::regionDir
Pcie_AtuRegionDir regionDir
Definition: pcie/pcie.h:531
PCIE_MAX_PERIPHS
#define PCIE_MAX_PERIPHS
Maximum PCIe devices supported by the driver.
Definition: pcie/pcie.h:66
Pcie_DeviceCfgBaseAddr::dataBase
void * dataBase
Definition: pcie/pcie.h:118
Pcie_ObAtuCfg::lowerTargetAddr
uint32_t lowerTargetAddr
Definition: pcie/pcie.h:201
Pcie_cfgRC
int32_t Pcie_cfgRC(Pcie_Handle handle)
Configure Pcie for RC (Root Complex) operation. PCIe mode setting is NOT done here (Pcie_setInterface...
Pcie_cfgBar
int32_t Pcie_cfgBar(Pcie_Handle handle, const Pcie_BarCfg *barCfg)
Configure a BAR Register (32 bits)
Pcie_ObAtuCfg::tlpType
Pcie_TlpType tlpType
Definition: pcie/pcie.h:193
PCIE_LTSSM_DISABLED
@ PCIE_LTSSM_DISABLED
Definition: pcie/pcie.h:463
PCIE_GEN1
@ PCIE_GEN1
Definition: pcie/pcie.h:99
Pcie_Attrs::gen
Pcie_Gen gen
Definition: pcie/pcie.h:329
Pcie_BarCfg::base
uint32_t base
Definition: pcie/pcie.h:491
Pcie_waitLinkUp
int32_t Pcie_waitLinkUp(Pcie_Handle handle)
Wait for PCIe link training to complete.
PCIE_LTSSM_CFG_LINKWD_START
@ PCIE_LTSSM_CFG_LINKWD_START
Definition: pcie/pcie.h:445
PCIE_LTSSM_CFG_LANENUM_WAIT
@ PCIE_LTSSM_CFG_LANENUM_WAIT
Definition: pcie/pcie.h:447
mode
char mode[32]
Definition: tisci_pm_core.h:1
PCIE_ATU_REGION_DIR_INBOUND
@ PCIE_ATU_REGION_DIR_INBOUND
Definition: pcie/pcie.h:161
Pcie_MsiIsr
void(* Pcie_MsiIsr)(void *arg, uint32_t msiData)
Function pointer for the PCIe MSI ISR.
Definition: pcie/pcie.h:234
Pcie_ObAtuCfg::regionIndex
uint32_t regionIndex
Definition: pcie/pcie.h:191
Pcie_Attrs::msixRingMem
uint8_t * msixRingMem
Definition: pcie/pcie.h:365
Pcie_RegisterMsiIsrParams
Pcie_RegisterMsiIsrParams specifies the parameters to register an ISR for MSI.
Definition: pcie/pcie.h:245
Pcie_ObAtuCfg::regionWindowSize
uint32_t regionWindowSize
Definition: pcie/pcie.h:199
PCIE_LTSSM_L0
@ PCIE_LTSSM_L0
Definition: pcie/pcie.h:455
Pcie_MsixTblEntry::addr
uintptr_t addr
Definition: pcie/pcie.h:302
PCIE_LTSSM_POLL_COMPLIANCE
@ PCIE_LTSSM_POLL_COMPLIANCE
Definition: pcie/pcie.h:441
Pcie_BarCfg::location
Pcie_Location location
Definition: pcie/pcie.h:487
Pcie_ObAtuCfg::lowerBaseAddr
uint32_t lowerBaseAddr
Definition: pcie/pcie.h:195
Pcie_BarCfg::idx
uint8_t idx
Definition: pcie/pcie.h:499
gPcieConfigNum
uint32_t gPcieConfigNum
Externally defined driver configuration array size.
Pcie_checkLinkParams
int32_t Pcie_checkLinkParams(Pcie_Handle handle)
Verify if the link parameters is established as configured.
Pcie_Attrs::numLanes
uint32_t numLanes
Definition: pcie/pcie.h:331
Pcie_IbTransCfg::region
uint8_t region
Definition: pcie/pcie.h:520
Pcie_Attrs::ibAtuNum
uint32_t ibAtuNum
Definition: pcie/pcie.h:339
PCIE_LOCATION_LOCAL
@ PCIE_LOCATION_LOCAL
Definition: pcie/pcie.h:429
Pcie_Handle
void * Pcie_Handle
Driver handle returned by Pcie_open() call.
Definition: pcie/pcie.h:107
Pcie_Attrs::msiIrqEnableFlag
uint32_t msiIrqEnableFlag
Definition: pcie/pcie.h:347
Pcie_Config::object
Pcie_Object * object
Definition: pcie/pcie.h:415
Pcie_MsixIsrCtrl
ISR and arguement list for MSIx.
Definition: pcie/pcie.h:290
Pcie_Attrs::msiIsrCtrl
Pcie_MsiIsrCtrl * msiIsrCtrl
Definition: pcie/pcie.h:349
PCIE_LTSSM_L2_WAKE
@ PCIE_LTSSM_L2_WAKE
Definition: pcie/pcie.h:460
Pcie_IbAtuCfg::barAperture
uint32_t barAperture
Definition: pcie/pcie.h:226
Pcie_Config
PCIE global configuration array.
Definition: pcie/pcie.h:414
PCIE_MAX_MSIX_IRQ
#define PCIE_MAX_MSIX_IRQ
Maxmium number of MSIx interrupts supported.
Definition: pcie/pcie.h:78
PCIE_BAR_PREF
@ PCIE_BAR_PREF
Definition: pcie/pcie.h:131
Pcie_IbAtuCfg::tlpType
Pcie_TlpType tlpType
Definition: pcie/pcie.h:214
PCIE_LTSSM_L0S
@ PCIE_LTSSM_L0S
Definition: pcie/pcie.h:456
Pcie_Object
PCIe driver object.
Definition: pcie/pcie.h:372
Pcie_Attrs::msixIsrCtrl
Pcie_MsixIsrCtrl * msixIsrCtrl
Definition: pcie/pcie.h:363
Pcie_BarCfg::mode
Pcie_Mode mode
Definition: pcie/pcie.h:489
Pcie_Attrs::msiIntNum
uint32_t msiIntNum
Definition: pcie/pcie.h:345
Pcie_InitCfg::dev
Pcie_DeviceCfg dev
Definition: pcie/pcie.h:403
PCIE_BAR_TYPE32
@ PCIE_BAR_TYPE32
Definition: pcie/pcie.h:139
Pcie_IbTransCfg::ibBar
uint8_t ibBar
Definition: pcie/pcie.h:512
PCIE_LTSSM_CFG_LANENUM_ACEPT
@ PCIE_LTSSM_CFG_LANENUM_ACEPT
Definition: pcie/pcie.h:448
PCIE_LTSSM_RCVRY_EQ0
@ PCIE_LTSSM_RCVRY_EQ0
Definition: pcie/pcie.h:470
Pcie_AtuRegionMatchMode
Pcie_AtuRegionMatchMode
Enum to select address or BAR match mode.
Definition: pcie/pcie.h:180
Pcie_getMemSpaceRange
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...
Pcie_BarMem
Pcie_BarMem
These are the possible values for Memory BAR configuration.
Definition: pcie/pcie.h:148
Pcie_Object::handle
Pcie_Handle handle
Definition: pcie/pcie.h:374
PCIE_ATU_REGION_MATCH_MODE_ADDR
@ PCIE_ATU_REGION_MATCH_MODE_ADDR
Definition: pcie/pcie.h:181
PCIE_LTSSM_RCVRY_EQ1
@ PCIE_LTSSM_RCVRY_EQ1
Definition: pcie/pcie.h:471
Pcie_init
void Pcie_init(void)
This function initializes the PCIe module.
Pcie_AtuRegionParams::upperBaseAddr
uint32_t upperBaseAddr
Definition: pcie/pcie.h:555
Pcie_AtuRegionParams::enableRegion
uint32_t enableRegion
Definition: pcie/pcie.h:539
Pcie_BarCfg::prefetch
Pcie_BarPref prefetch
Definition: pcie/pcie.h:493
PCIE_LTSSM_L123_SEND_EIDLE
@ PCIE_LTSSM_L123_SEND_EIDLE
Definition: pcie/pcie.h:457
Pcie_Attrs::ibAtu
Pcie_IbAtuCfg * ibAtu
Definition: pcie/pcie.h:337
PCIE_LTSSM_RCVRY_EQ2
@ PCIE_LTSSM_RCVRY_EQ2
Definition: pcie/pcie.h:472
Pcie_getVendorId
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
@ PCIE_LTSSM_HOT_RESET
Definition: pcie/pcie.h:469
PCIE_LTSSM_POLL_ACTIVE
@ PCIE_LTSSM_POLL_ACTIVE
Definition: pcie/pcie.h:440
Pcie_MsixTblEntry::data
uint32_t data
Definition: pcie/pcie.h:304
Pcie_Object::cfgDone
uint32_t cfgDone
Definition: pcie/pcie.h:378
enable
@ enable
Definition: iPtcpDrv.h:69
PCIE_LTSSM_DETECT_ACT
@ PCIE_LTSSM_DETECT_ACT
Definition: pcie/pcie.h:439