OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i386/] [shared/] [pci/] [pcibios.h] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 * This software is Copyright (C) 1998 by T.sqware - all rights limited
3
 * It is provided in to the public domain "as is", can be freely modified
4
 * as far as this copyight notice is kept unchanged, but does not imply
5
 * an endorsement by T.sqware of the product in which it is included.
6
 */
7
 
8
#ifndef _PCIB_H
9
#define _PCIB_H
10
 
11
/* Error codes */
12
#define PCIB_ERR_SUCCESS       (0)
13
#define PCIB_ERR_UNINITIALIZED (-1)  /* PCI BIOS is not initilized */
14
#define PCIB_ERR_NOTPRESENT    (-2)  /* PCI BIOS not present */
15
#define PCIB_ERR_NOFUNC        (-3)  /* Function not supported */
16
#define PCIB_ERR_BADVENDOR     (-4)  /* Bad Vendor ID */
17
#define PCIB_ERR_DEVNOTFOUND   (-5)  /* Device not found */
18
#define PCIB_ERR_BADREG        (-6)  /* Bad register number */   
19
 
20
/*
21
 * Make device signature from bus number, device numebr and function
22
 * number
23
 */
24
#define PCIB_DEVSIG_MAKE(b,d,f) ((b<<8)|(d<<3)|(f))
25
 
26
/*
27
 * Extract valrous part from device signature
28
 */
29
#define PCIB_DEVSIG_BUS(x) (((x)>>8) &0xff)
30
#define PCIB_DEVSIG_DEV(x) (((x)>>3) & 0x1f)
31
#define PCIB_DEVSIG_FUNC(x) ((x) & 0x7)
32
 
33
int pcib_init(void);
34
int pcib_find_by_devid(int vendorId, int devId, int idx, int *sig);
35
int pcib_find_by_class(int classCode, int idx, int *sig);
36
int pcib_special_cycle(int busNo, int data);
37
int pcib_conf_read8(int sig, int off, unsigned char *data);
38
int pcib_conf_read16(int sig, int off, unsigned short *data);
39
int pcib_conf_read32(int sig, int off, unsigned int *data);
40
int pcib_conf_write8(int sig, int off, unsigned int data);
41
int pcib_conf_write16(int sig, int off, unsigned int data);
42
int pcib_conf_write32(int sig, int off, unsigned int data);
43
 
44
 
45
#endif /* _PCIB_H */
46
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.