~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/eisa.h

Version: ~ [ linux-5.3 ] ~ [ linux-5.2.15 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.73 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.144 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.193 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.193 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.73 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _LINUX_EISA_H
  2 #define _LINUX_EISA_H
  3 
  4 #include <linux/ioport.h>
  5 #include <linux/device.h>
  6 #include <linux/mod_devicetable.h>
  7 
  8 #define EISA_MAX_SLOTS 8
  9 
 10 #define EISA_MAX_RESOURCES 4
 11 
 12 /* A few EISA constants/offsets... */
 13 
 14 #define EISA_DMA1_STATUS            8
 15 #define EISA_INT1_CTRL           0x20
 16 #define EISA_INT1_MASK           0x21
 17 #define EISA_INT2_CTRL           0xA0
 18 #define EISA_INT2_MASK           0xA1
 19 #define EISA_DMA2_STATUS         0xD0
 20 #define EISA_DMA2_WRITE_SINGLE   0xD4
 21 #define EISA_EXT_NMI_RESET_CTRL 0x461
 22 #define EISA_INT1_EDGE_LEVEL    0x4D0
 23 #define EISA_INT2_EDGE_LEVEL    0x4D1
 24 #define EISA_VENDOR_ID_OFFSET   0xC80
 25 #define EISA_CONFIG_OFFSET      0xC84
 26 
 27 #define EISA_CONFIG_ENABLED         1
 28 #define EISA_CONFIG_FORCED          2
 29 
 30 /* There is not much we can say about an EISA device, apart from
 31  * signature, slot number, and base address. dma_mask is set by
 32  * default to parent device mask..*/
 33 
 34 struct eisa_device {
 35         struct eisa_device_id id;
 36         int                   slot;
 37         int                   state;
 38         unsigned long         base_addr;
 39         struct resource       res[EISA_MAX_RESOURCES];
 40         u64                   dma_mask;
 41         struct device         dev; /* generic device */
 42 #ifdef CONFIG_EISA_NAMES
 43         char                  pretty_name[50];
 44 #endif
 45 };
 46 
 47 #define to_eisa_device(n) container_of(n, struct eisa_device, dev)
 48 
 49 static inline int eisa_get_region_index (void *addr)
 50 {
 51         unsigned long x = (unsigned long) addr;
 52 
 53         x &= 0xc00;
 54         return (x >> 12);
 55 }
 56 
 57 struct eisa_driver {
 58         const struct eisa_device_id *id_table;
 59         struct device_driver         driver;
 60 };
 61 
 62 #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver)
 63 
 64 /* These external functions are only available when EISA support is enabled. */
 65 #ifdef CONFIG_EISA
 66 
 67 extern struct bus_type eisa_bus_type;
 68 int eisa_driver_register (struct eisa_driver *edrv);
 69 void eisa_driver_unregister (struct eisa_driver *edrv);
 70 
 71 #else /* !CONFIG_EISA */
 72 
 73 static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; }
 74 static inline void eisa_driver_unregister (struct eisa_driver *edrv) { }
 75 
 76 #endif /* !CONFIG_EISA */
 77 
 78 /* Mimics pci.h... */
 79 static inline void *eisa_get_drvdata (struct eisa_device *edev)
 80 {
 81         return dev_get_drvdata(&edev->dev);
 82 }
 83 
 84 static inline void eisa_set_drvdata (struct eisa_device *edev, void *data)
 85 {
 86         dev_set_drvdata(&edev->dev, data);
 87 }
 88 
 89 /* The EISA root device. There's rumours about machines with multiple
 90  * busses (PA-RISC ?), so we try to handle that. */
 91 
 92 struct eisa_root_device {
 93         struct device   *dev;    /* Pointer to bridge device */
 94         struct resource *res;
 95         unsigned long    bus_base_addr;
 96         int              slots;  /* Max slot number */
 97         int              force_probe; /* Probe even when no slot 0 */
 98         u64              dma_mask; /* from bridge device */
 99         int              bus_nr; /* Set by eisa_root_register */
100         struct resource  eisa_root_res; /* ditto */
101 };
102 
103 int eisa_root_register (struct eisa_root_device *root);
104 
105 #ifdef CONFIG_EISA
106 extern int EISA_bus;
107 #else
108 # define EISA_bus 0
109 #endif
110 
111 #endif
112 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp