mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-09 17:12:58 +00:00
2005-03-04 Joel Sherrill <joel@OARcorp.com>
* shared/pci/pcibios.c, shared/pci/pcibios.h: Make PCI initialize function part of the unified PCI API as pci_initialize().
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2005-03-04 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* shared/pci/pcibios.c, shared/pci/pcibios.h: Make PCI initialize
|
||||||
|
function part of the unified PCI API as pci_initialize().
|
||||||
|
|
||||||
2005-01-19 Joel Sherrill <joel@OARcorp.com>
|
2005-01-19 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
* pc386/console/vgainit.c, pc386/wd8003/wd8003.c, shared/comm/uart.c:
|
* pc386/console/vgainit.c, pc386/wd8003/wd8003.c, shared/comm/uart.c:
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ static int pcib_convert_err(int err);
|
|||||||
* error code
|
* error code
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
pcib_init(void)
|
pci_initialize(void)
|
||||||
{
|
{
|
||||||
unsigned char *ucp;
|
unsigned char *ucp;
|
||||||
unsigned char sum;
|
unsigned char sum;
|
||||||
@@ -212,21 +212,10 @@ pcib_find_by_class(int classCode, int idx, int *sig)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define PCI_MULTI_FUNCTION 0x80
|
#define PCI_MULTI_FUNCTION 0x80
|
||||||
#define PCI_MAX_DEVICES 16
|
|
||||||
#define PCI_MAX_FUNCTIONS 8
|
|
||||||
|
|
||||||
#define PCI_VENDOR_ID 0x00 /* 16 bits */
|
|
||||||
#define PCI_DEVICE_ID 0x02 /* 16 bits */
|
|
||||||
#define PCI_CLASS_REVISION 0x08
|
|
||||||
#define PCI_HEADER_TYPE 0x0e
|
|
||||||
#define PCI_SUBORDINATE_BUS 0x1a
|
|
||||||
|
|
||||||
#define PCI_CLASS_BRIDGE_PCI 0x0604
|
|
||||||
|
|
||||||
static unsigned8 ucBusCount = 0xff;
|
static unsigned8 ucBusCount = 0xff;
|
||||||
|
|
||||||
|
unsigned char
|
||||||
int
|
|
||||||
BusCountPCI()
|
BusCountPCI()
|
||||||
{
|
{
|
||||||
if( ucBusCount == 0xff )
|
if( ucBusCount == 0xff )
|
||||||
|
|||||||
@@ -8,14 +8,7 @@
|
|||||||
#ifndef _PCIB_H
|
#ifndef _PCIB_H
|
||||||
#define _PCIB_H
|
#define _PCIB_H
|
||||||
|
|
||||||
/* Error codes */
|
#include <rtems/pci.h>
|
||||||
#define PCIB_ERR_SUCCESS (0)
|
|
||||||
#define PCIB_ERR_UNINITIALIZED (-1) /* PCI BIOS is not initilized */
|
|
||||||
#define PCIB_ERR_NOTPRESENT (-2) /* PCI BIOS not present */
|
|
||||||
#define PCIB_ERR_NOFUNC (-3) /* Function not supported */
|
|
||||||
#define PCIB_ERR_BADVENDOR (-4) /* Bad Vendor ID */
|
|
||||||
#define PCIB_ERR_DEVNOTFOUND (-5) /* Device not found */
|
|
||||||
#define PCIB_ERR_BADREG (-6) /* Bad register number */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make device signature from bus number, device numebr and function
|
* Make device signature from bus number, device numebr and function
|
||||||
@@ -34,7 +27,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int pcib_init(void);
|
|
||||||
int pcib_find_by_devid(int vendorId, int devId, int idx, int *sig);
|
int pcib_find_by_devid(int vendorId, int devId, int idx, int *sig);
|
||||||
int pcib_find_by_class(int classCode, int idx, int *sig);
|
int pcib_find_by_class(int classCode, int idx, int *sig);
|
||||||
int pcib_special_cycle(int busNo, int data);
|
int pcib_special_cycle(int busNo, int data);
|
||||||
|
|||||||
Reference in New Issue
Block a user