Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  *
0004  * pbm.h: PCI bus module pseudo driver software state
0005  *        Adopted from sparc64 by V. Roganov and G. Raiko
0006  *
0007  * Original header:
0008  * pbm.h: U2P PCI bus module pseudo driver software state.
0009  *
0010  * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
0011  *
0012  * To put things into perspective, consider sparc64 with a few PCI controllers.
0013  * Each type would have an own structure, with instances related one to one.
0014  * We have only pcic on sparc, but we want to be compatible with sparc64 pbm.h.
0015  * All three represent different abstractions.
0016  *   pci_bus  - Linux PCI subsystem view of a PCI bus (including bridged buses)
0017  *   pbm      - Arch-specific view of a PCI bus (sparc or sparc64)
0018  *   pcic     - Chip-specific information for PCIC.
0019  */
0020 
0021 #ifndef __SPARC_PBM_H
0022 #define __SPARC_PBM_H
0023 
0024 #include <linux/pci.h>
0025 #include <asm/oplib.h>
0026 #include <asm/prom.h>
0027 
0028 struct linux_pbm_info {
0029     int     prom_node;
0030     char        prom_name[64];
0031     /* struct linux_prom_pci_ranges pbm_ranges[PROMREG_MAX]; */
0032     /* int      num_pbm_ranges; */
0033 
0034     /* Now things for the actual PCI bus probes. */
0035     unsigned int    pci_first_busno;    /* Can it be nonzero? */
0036     struct pci_bus  *pci_bus;       /* Was inline, MJ allocs now */
0037 };
0038 
0039 /* PCI devices which are not bridges have this placed in their pci_dev
0040  * sysdata member.  This makes OBP aware PCI device drivers easier to
0041  * code.
0042  */
0043 struct pcidev_cookie {
0044     struct linux_pbm_info       *pbm;
0045     struct device_node      *prom_node;
0046 };
0047 
0048 #endif /* !(__SPARC_PBM_H) */