- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I try to read configuration space of the HIP rootport from NiosII. I looked through linux sources and got some functions for handling the HIP by writing and reading the Root Port TLP Data Registers through CRA interface. The system is in L0 state and data link is started. pcie-altera.c static int tlp_cfg_dword_read(struct altera_pcie *pcie, u8 bus, u32 devfn, int where, u8 byte_en, u32 *value) { u32 headers[TLP_HDR_SIZE]; if (bus == pcie->root_bus_nr) headers[0] = TLP_CFG_DW0(TLP_FMTTYPE_CFGRD0); else headers[0] = TLP_CFG_DW0(TLP_FMTTYPE_CFGRD1); headers[1] = TLP_CFG_DW1(TLP_REQ_ID(pcie->root_bus_nr, RP_DEVFN), TLP_READ_TAG, byte_en); headers[2] = TLP_CFG_DW2(bus, devfn, where); tlp_write_packet(pcie, headers, 0, false); return tlp_read_packet(pcie, value); } I send config read request type 0 for bus 0, dev 0, func 0 (what RootPort is). TLP header is: [0] 0x04000001 [1] 0x00001D0F [2] 0x00000000 The function returns PCIBIOS_DEVICE_NOT_FOUND. Is my TLP correct? Thanks in advance!!! Ilya.Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page