forked from Imagelibrary/rtems
Reflect changes to pci-API.
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet)
|
unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet)
|
||||||
{
|
{
|
||||||
unsigned int pcidata, pcidata1;
|
uint32_t pcidata, pcidata1;
|
||||||
int PciLocal, busNumber=0;
|
int PciLocal, busNumber=0;
|
||||||
|
|
||||||
/* On the mvme5500 board, the GT64260B system controller had the MCP
|
/* On the mvme5500 board, the GT64260B system controller had the MCP
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ unsigned char ucMaxPCIBus=0;
|
|||||||
|
|
||||||
/* Please note that PCI0 and PCI1 does not correlate with the busNum 0 and 1.
|
/* Please note that PCI0 and PCI1 does not correlate with the busNum 0 and 1.
|
||||||
*/
|
*/
|
||||||
static int direct_pci_read_config_byte(unsigned char bus,unsigned char dev,unsigned char func,
|
static int direct_pci_read_config_byte(unsigned char bus,unsigned char dev,
|
||||||
unsigned char offset,unsigned char *val)
|
unsigned char func, unsigned char offset, uint8_t *val)
|
||||||
{
|
{
|
||||||
volatile unsigned char *config_addr, *config_data;
|
volatile unsigned char *config_addr, *config_data;
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ unsigned char offset,unsigned char *val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int direct_pci_read_config_word(unsigned char bus, unsigned char dev,
|
static int direct_pci_read_config_word(unsigned char bus, unsigned char dev,
|
||||||
unsigned char func, unsigned char offset, unsigned short *val)
|
unsigned char func, unsigned char offset, uint16_t *val)
|
||||||
{
|
{
|
||||||
volatile unsigned char *config_addr, *config_data;
|
volatile unsigned char *config_addr, *config_data;
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ unsigned char func, unsigned char offset, unsigned short *val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int direct_pci_read_config_dword(unsigned char bus, unsigned char dev,
|
static int direct_pci_read_config_dword(unsigned char bus, unsigned char dev,
|
||||||
unsigned char func, unsigned char offset, unsigned int *val)
|
unsigned char func, unsigned char offset, uint32_t *val)
|
||||||
{
|
{
|
||||||
volatile unsigned char *config_addr, *config_data;
|
volatile unsigned char *config_addr, *config_data;
|
||||||
|
|
||||||
@@ -152,7 +152,8 @@ unsigned char func, unsigned char offset, unsigned int *val)
|
|||||||
return PCIBIOS_SUCCESSFUL;
|
return PCIBIOS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int direct_pci_write_config_byte(unsigned char bus, unsigned char dev,unsigned char func, unsigned char offset, unsigned char val)
|
static int direct_pci_write_config_byte(unsigned char bus, unsigned char dev,
|
||||||
|
unsigned char func, unsigned char offset, uint8_t val)
|
||||||
{
|
{
|
||||||
volatile unsigned char *config_addr, *config_data;
|
volatile unsigned char *config_addr, *config_data;
|
||||||
|
|
||||||
@@ -177,7 +178,8 @@ static int direct_pci_write_config_byte(unsigned char bus, unsigned char dev,uns
|
|||||||
return PCIBIOS_SUCCESSFUL;
|
return PCIBIOS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int direct_pci_write_config_word(unsigned char bus, unsigned char dev,unsigned char func, unsigned char offset, unsigned short val)
|
static int direct_pci_write_config_word(unsigned char bus, unsigned char dev,
|
||||||
|
unsigned char func, unsigned char offset, uint16_t val)
|
||||||
{
|
{
|
||||||
volatile unsigned char *config_addr, *config_data;
|
volatile unsigned char *config_addr, *config_data;
|
||||||
|
|
||||||
@@ -201,7 +203,8 @@ static int direct_pci_write_config_word(unsigned char bus, unsigned char dev,uns
|
|||||||
return PCIBIOS_SUCCESSFUL;
|
return PCIBIOS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int direct_pci_write_config_dword(unsigned char bus,unsigned char dev,unsigned char func, unsigned char offset, unsigned int val)
|
static int direct_pci_write_config_dword(unsigned char bus, unsigned char dev,
|
||||||
|
unsigned char func, unsigned char offset, uint32_t val)
|
||||||
{
|
{
|
||||||
volatile unsigned char *config_addr, *config_data;
|
volatile unsigned char *config_addr, *config_data;
|
||||||
|
|
||||||
@@ -249,8 +252,8 @@ int pci_initialize()
|
|||||||
{
|
{
|
||||||
int deviceFound;
|
int deviceFound;
|
||||||
unsigned char ucBusNumber, ucSlotNumber, ucFnNumber, ucNumFuncs;
|
unsigned char ucBusNumber, ucSlotNumber, ucFnNumber, ucNumFuncs;
|
||||||
unsigned int ulHeader;
|
uint32_t ulHeader;
|
||||||
unsigned int pcidata, ulClass, ulDeviceID;
|
uint32_t pcidata, ulClass, ulDeviceID;
|
||||||
|
|
||||||
pci_interface();
|
pci_interface();
|
||||||
|
|
||||||
|
|||||||
@@ -80,9 +80,10 @@ int BSP_pciFindDevicePrint(unsigned short vendorid, unsigned short deviceid,
|
|||||||
int pci_find_device( unsigned short vendorid, unsigned short deviceid,
|
int pci_find_device( unsigned short vendorid, unsigned short deviceid,
|
||||||
int instance, int *pbus, int *pdev, int *pfun )
|
int instance, int *pbus, int *pdev, int *pfun )
|
||||||
{
|
{
|
||||||
unsigned int d;
|
uint32_t d;
|
||||||
unsigned short s;
|
uint16_t s;
|
||||||
unsigned char bus,dev,fun,hd;
|
unsigned char bus,dev;
|
||||||
|
uint8_t fun, hd;
|
||||||
|
|
||||||
for (bus=0; bus<BSP_MAX_PCI_BUS; bus++) {
|
for (bus=0; bus<BSP_MAX_PCI_BUS; bus++) {
|
||||||
for (dev=0; dev<PCI_MAX_DEVICES; dev++) {
|
for (dev=0; dev<PCI_MAX_DEVICES; dev++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user