PCI configuration space access.
More...
#include <rtems.h>
#include <bsp.h>
#include <libcpu/io.h>
#include <bsp/pci.h>
#include <rtems/bspIo.h>
#include <stdint.h>
|
|
#define | MV64x60_PCI0_CONFIG_ADDR (BSP_MV64x60_BASE + 0xcf8) |
| |
|
#define | MV64x60_PCI0_CONFIG_DATA (BSP_MV64x60_BASE + 0xcfc) |
| |
|
#define | MV64x60_PCI1_CONFIG_ADDR (BSP_MV64x60_BASE + 0xc78) |
| |
|
#define | MV64x60_PCI1_CONFIG_DATA (BSP_MV64x60_BASE + 0xc7c) |
| |
|
#define | PCI_BUS2HOSE(bus) (bus<BSP_pci_hose1_bus_base?0:1) |
| |
|
#define | pci hoses[hose] |
| |
| #define | HOSE_PREAMBLE |
| |
|
#define | PCI_ERR_BITS 0xf900 |
| |
|
#define | PCI_STATUS_OK(x) (!((x)&PCI_ERR_BITS)) |
| |
|
|
void | detect_host_bridge (void) |
| |
|
void | BSP_pci_initialize (void) |
| |
|
unsigned long | _BSP_clear_hostbridge_errors (int enableMCP, int quiet) |
| |
PCI configuration space access.
This code is heavily inspired by the public specification of STREAM V2 that can be found at:
◆ HOSE_PREAMBLE
Value: uint8_t hose; \
if (bus < BSP_pci_hose1_bus_base) { \
hose = 0; \
} else { \
hose = 1; \
bus -= BSP_pci_hose1_bus_base; \
}
◆ pci_hosed_indirect_functions
Initial value:= {
indirect_pci_read_config_byte,
indirect_pci_read_config_word,
indirect_pci_read_config_dword,
indirect_pci_write_config_byte,
indirect_pci_write_config_word,
indirect_pci_write_config_dword
}