source: rtems/cpukit/libpci/pci_cfg.c @ bdd4eb87

5
Last change on this file since bdd4eb87 was e53daed, checked in by Daniel Hellstrom <daniel@…>, on 04/09/15 at 14:09:42

LIBPCI: updated license to rtems.org

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*  PCI Configuration Library
2 *
3 *  COPYRIGHT (c) 2010 Cobham Gaisler AB.
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.org/license/LICENSE.
8 */
9
10#include <pci/cfg.h>
11
12/* Number of buses. This is set from respective library */
13int pci_bus_cnt = 0;
14
15/* PCI Address assigned to BARs which failed to fit into the PCI Window or
16 * is disabled by any other cause.
17 */
18uint32_t pci_invalid_address = 0;
19
20/* PCI System type. Configuration Library setup this */
21enum pci_system_type pci_system_type = PCI_SYSTEM_NONE;
22
23/* PCI Endianness.
24 *
25 * Host driver or BSP must override this be writing here if bus is defined
26 * as non-standard big-endian.
27 */
28int pci_endian = PCI_LITTLE_ENDIAN;
29
30/* Configure PCI devices and bridges, and setup the RAM data structures
31 * describing the PCI devices currently present in the system
32 */
33int pci_config_init(void)
34{
35        if (pci_config_lib_init)
36                return pci_config_lib_init();
37        else
38                return 0;
39}
40
41void pci_config_register(void *config)
42{
43        if (pci_config_lib_register)
44                pci_config_lib_register(config);
45}
46
47/* Return the number of PCI busses available in the system, note that
48 * there are always one bus (bus0) after the PCI library has been
49 * initialized and a driver has been registered.
50 */
51int pci_bus_count(void)
52{
53        return pci_bus_cnt;
54}
Note: See TracBrowser for help on using the repository browser.