source: rtems/c/src/lib/libbsp/i386/shared/pci/pcibios.h @ 8149a2de

4.104.114.84.95
Last change on this file since 8149a2de was 8149a2de, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/30/07 at 08:42:57

Reflect changes to rtems/pci.h.
Convert to using stdint fixed-size types.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
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#include <rtems/pci.h>
12
13/*
14 * Make device signature from bus number, device numebr and function
15 * number
16 */
17#define PCIB_DEVSIG_MAKE(b,d,f) ((b<<8)|(d<<3)|(f))
18
19/*
20 * Extract valrous part from device signature
21 */
22#define PCIB_DEVSIG_BUS(x) (((x)>>8) &0xff)
23#define PCIB_DEVSIG_DEV(x) (((x)>>3) & 0x1f)
24#define PCIB_DEVSIG_FUNC(x) ((x) & 0x7)
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30int pcib_find_by_class(int classCode, int idx, int *sig);
31int pcib_special_cycle(int busNo, int data);
32int pcib_conf_read8(int sig, int off, uint8_t *data);
33int pcib_conf_read16(int sig, int off, uint16_t *data);
34int pcib_conf_read32(int sig, int off, uint32_t *data);
35int pcib_conf_write8(int sig, int off, uint8_t data);
36int pcib_conf_write16(int sig, int off, uint16_t data);
37int pcib_conf_write32(int sig, int off, uint32_t data);
38
39int
40pci_find_device( unsigned short vendorid, unsigned short deviceid,
41                   int instance, int *pbus, int *pdev, int *pfun );
42
43#ifdef __cplusplus
44}
45#endif
46
47#endif /* _PCIB_H */
Note: See TracBrowser for help on using the repository browser.