source: rtems/c/src/lib/libbsp/powerpc/shared/pci/pci.h @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 *
3 *      PCI defines and function prototypes
4 *      Copyright 1994, Drew Eckhardt
5 *      Copyright 1997, 1998 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
6 *
7 *      For more information, please consult the following manuals (look at
8 *      http://www.pcisig.com/ for how to get them):
9 *
10 *      PCI BIOS Specification
11 *      PCI Local Bus Specification
12 *      PCI to PCI Bridge Specification
13 *      PCI System Design Guide
14 */
15
16#ifndef BSP_POWERPC_PCI_H
17#define BSP_POWERPC_PCI_H
18
19#include <rtems/pci.h>
20#include <stdio.h>
21
22struct _pin_routes
23{
24      int pin, int_name[4];
25};
26struct _int_map
27{
28      int bus, slot, opts;
29      struct _pin_routes pin_route[5];
30};
31
32/* If there's a conflict between a name in the routing table and
33 * what's already set on the device, reprogram the device setting
34 * to reflect int_name[0] for the routing table entry
35 */
36#define PCI_FIXUP_OPT_OVERRIDE_NAME     (1<<0)
37
38void FixupPCI( const struct _int_map *, int (*swizzler)(int,int) );
39
40/* FIXME: This probably belongs into rtems/pci.h */
41extern unsigned char pci_bus_count();
42
43/* FIXME: This also is generic and could go into rtems/pci.h */
44
45/* Scan pci config space and run a user callback on each
46 * device present; the user callback may return 0 to
47 * continue the scan or a value > 0 to abort the scan.
48 * Return values < 0 are reserved and must not be used.
49 *
50 * RETURNS: a (opaque) handle pointing to the bus/slot/fn-triple
51 *          just after where the scan was aborted by a callback
52 *          returning 1 (see above) or NULL if all devices were
53 *          scanned.
54 *          The handle may be passed to this routine to resume the
55 *          scan continuing with the device after the one causing the
56 *          abort.
57 *          Pass a NULL 'handle' argument to start scanning from
58 *          the beginning (bus/slot/fn = 0/0/0).
59 */
60typedef void *BSP_PciScanHandle;
61typedef int (*BSP_PciScannerCb)(int bus, int slot, int fun, void *uarg);
62
63BSP_PciScanHandle
64BSP_pciScan(BSP_PciScanHandle handle, BSP_PciScannerCb cb, void *uarg);
65
66/* Dump basic config. space info to a file. The argument may
67 * be NULL in which case 'stdout' is used.
68 * NOTE: the C-library must be functional before you can use
69 *       this routine.
70 */
71void
72BSP_pciConfigDump(FILE *fp);
73
74#endif /* BSP_POWERPC_PCI_H */
Note: See TracBrowser for help on using the repository browser.