pciio_private.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* $Id$
  2.  *
  3.  * This file is subject to the terms and conditions of the GNU General Public
  4.  * License.  See the file "COPYING" in the main directory of this archive
  5.  * for more details.
  6.  *
  7.  * Copyright (C) 1992 - 1997, 2000-2002 Silicon Graphics, Inc. All rights reserved.
  8.  */
  9. #ifndef _ASM_SN_PCI_PCIIO_PRIVATE_H
  10. #define _ASM_SN_PCI_PCIIO_PRIVATE_H
  11. #include <asm/sn/pci/pciio.h>
  12. /*
  13.  * pciio_private.h -- private definitions for pciio
  14.  * PCI drivers should NOT include this file.
  15.  */
  16. #ident "sys/PCI/pciio_private: $Revision: 1.13 $"
  17. /*
  18.  * All PCI providers set up PIO using this information.
  19.  */
  20. struct pciio_piomap_s {
  21.     unsigned                pp_flags; /* PCIIO_PIOMAP flags */
  22.     devfs_handle_t            pp_dev; /* associated pci card */
  23.     pciio_slot_t            pp_slot; /* which slot the card is in */
  24.     pciio_space_t           pp_space; /* which address space */
  25.     iopaddr_t               pp_pciaddr; /* starting offset of mapping */
  26.     size_t                  pp_mapsz; /* size of this mapping */
  27.     caddr_t                 pp_kvaddr; /* kernel virtual address to use */
  28. };
  29. /*
  30.  * All PCI providers set up DMA using this information.
  31.  */
  32. struct pciio_dmamap_s {
  33.     unsigned                pd_flags; /* PCIIO_DMAMAP flags */
  34.     devfs_handle_t            pd_dev; /* associated pci card */
  35.     pciio_slot_t            pd_slot; /* which slot the card is in */
  36. };
  37. /*
  38.  * All PCI providers set up interrupts using this information.
  39.  */
  40. struct pciio_intr_s {
  41.     unsigned                pi_flags; /* PCIIO_INTR flags */
  42.     devfs_handle_t            pi_dev; /* associated pci card */
  43.     device_desc_t     pi_dev_desc; /* override device descriptor */
  44.     pciio_intr_line_t       pi_lines; /* which interrupt line(s) */
  45.     cpuid_t                 pi_mustruncpu; /* Where we must run. */
  46.     int                     pi_irq;     /* IRQ assigned */
  47.     int                     pi_cpu;     /* cpu assigned */
  48. };
  49. /* PCIIO_INTR (pi_flags) flags */
  50. #define PCIIO_INTR_CONNECTED 1 /* interrupt handler/thread has been connected */
  51. #define PCIIO_INTR_NOTHREAD 2 /* interrupt handler wants to be called at interrupt level */
  52. /*
  53.  * Each PCI Card has one of these.
  54.  */
  55. struct pciio_info_s {
  56.     char                   *c_fingerprint;
  57.     devfs_handle_t            c_vertex; /* back pointer to vertex */
  58.     pciio_bus_t             c_bus; /* which bus the card is in */
  59.     pciio_slot_t            c_slot; /* which slot the card is in */
  60.     pciio_function_t        c_func; /* which func (on multi-func cards) */
  61.     pciio_vendor_id_t       c_vendor; /* PCI card "vendor" code */
  62.     pciio_device_id_t       c_device; /* PCI card "device" code */
  63.     devfs_handle_t            c_master; /* PCI bus provider */
  64.     arbitrary_info_t        c_mfast; /* cached fastinfo from c_master */
  65.     pciio_provider_t       *c_pops; /* cached provider from c_master */
  66.     error_handler_f        *c_efunc; /* error handling function */
  67.     error_handler_arg_t     c_einfo; /* first parameter for efunc */
  68.     struct { /* state of BASE regs */
  69. pciio_space_t w_space;
  70. iopaddr_t w_base;
  71. size_t w_size;
  72.         int                     w_devio_index;  /* DevIO[] register used to
  73.                                                    access this window */
  74.     }     c_window[6];
  75.     unsigned     c_rbase; /* EXPANSION ROM base addr */
  76.     unsigned     c_rsize; /* EXPANSION ROM size (bytes) */
  77.     pciio_piospace_t     c_piospace; /* additional I/O spaces allocated */
  78. };
  79. extern char             pciio_info_fingerprint[];
  80. #endif /* _ASM_SN_PCI_PCIIO_PRIVATE_H */