diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-15 18:23:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-15 18:23:42 -0800 |
| commit | 188db2b969962bf592f7e31fbbdbed1ed3e8d74d (patch) | |
| tree | b8b0502d5ccff275f094816599c477a51d32f021 /include/linux | |
| parent | 91f5fe708e8fdd03314354ce13636e7448651838 (diff) | |
| parent | eb420b6f8a42fb681a7e42823ae24c47936c97d9 (diff) | |
Merge http://linux-voyager.bkbits.net/eisa-sysfs-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/eisa.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/include/linux/eisa.h b/include/linux/eisa.h new file mode 100644 index 000000000000..49fc38f5bff8 --- /dev/null +++ b/include/linux/eisa.h @@ -0,0 +1,60 @@ +#ifndef _LINUX_EISA_H +#define _LINUX_EISA_H + +#define EISA_SIG_LEN 8 +#define EISA_MAX_SLOTS 8 + +/* A few EISA constants/offsets... */ + +#define EISA_DMA1_STATUS 8 +#define EISA_INT1_CTRL 0x20 +#define EISA_INT1_MASK 0x21 +#define EISA_INT2_CTRL 0xA0 +#define EISA_INT2_MASK 0xA1 +#define EISA_DMA2_STATUS 0xD0 +#define EISA_DMA2_WRITE_SINGLE 0xD4 +#define EISA_EXT_NMI_RESET_CTRL 0x461 +#define EISA_INT1_EDGE_LEVEL 0x4D0 +#define EISA_INT2_EDGE_LEVEL 0x4D1 +#define EISA_VENDOR_ID_OFFSET 0xC80 + +/* The EISA signature, in ASCII form, null terminated */ +struct eisa_device_id { + char sig[EISA_SIG_LEN]; +}; + +/* There is not much we can say about an EISA device, apart from + * signature, slot number, and base address */ +struct eisa_device { + struct eisa_device_id id; + int slot; + unsigned long base_addr; + struct resource res; + struct device dev; /* generic device */ +}; + +#define to_eisa_device(n) container_of(n, struct eisa_device, dev) + +struct eisa_driver { + const struct eisa_device_id *id_table; + struct device_driver driver; +}; + +#define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver) + +extern struct bus_type eisa_bus_type; +int eisa_driver_register (struct eisa_driver *edrv); +void eisa_driver_unregister (struct eisa_driver *edrv); + +/* Mimics pci.h... */ +static inline void *eisa_get_drvdata (struct eisa_device *edev) +{ + return edev->dev.driver_data; +} + +static inline void eisa_set_drvdata (struct eisa_device *edev, void *data) +{ + edev->dev.driver_data = data; +} + +#endif |
