summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMarc Zyngier <mzyngier@freesurf.fr>2003-07-04 03:00:12 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-04 03:00:12 -0700
commitddb6ee510226e05aaea1b90a3e4d672a2a0be857 (patch)
treeacc22e70e70e837fbb39f95204b031113ffd52b1 /include/linux
parentee389f0a37e1d6c8ac78fa5749f3377976617802 (diff)
[PATCH] EISA: core changes
- Now reserves I/O ranges according to EISA specs (four 256 bytes regions instead of a single 4KB region). - By default, do not try to probe the bus if the mainboard does not seems to support EISA (allow this behaviour to be changed through a command-line option). - Use parent bridge device dma_mask as default for each discovered device. - Allow devices to be enabled or disabled from the kernel command line (useful for non-x86 platforms where the firmware simply disable devices it doesn't know about...).
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/eisa.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/eisa.h b/include/linux/eisa.h
index d77fdf0f9f01..93e4c5503d46 100644
--- a/include/linux/eisa.h
+++ b/include/linux/eisa.h
@@ -4,6 +4,8 @@
#define EISA_SIG_LEN 8
#define EISA_MAX_SLOTS 8
+#define EISA_MAX_RESOURCES 4
+
/* A few EISA constants/offsets... */
#define EISA_DMA1_STATUS 8
@@ -17,6 +19,10 @@
#define EISA_INT1_EDGE_LEVEL 0x4D0
#define EISA_INT2_EDGE_LEVEL 0x4D1
#define EISA_VENDOR_ID_OFFSET 0xC80
+#define EISA_CONFIG_OFFSET 0xC84
+
+#define EISA_CONFIG_ENABLED 1
+#define EISA_CONFIG_FORCED 2
/* The EISA signature, in ASCII form, null terminated */
struct eisa_device_id {
@@ -26,19 +32,28 @@ struct eisa_device_id {
/* There is not much we can say about an EISA device, apart from
* signature, slot number, and base address. dma_mask is set by
- * default to 32 bits.*/
+ * default to parent device mask..*/
struct eisa_device {
struct eisa_device_id id;
int slot;
+ int state;
unsigned long base_addr;
- struct resource res;
+ struct resource res[EISA_MAX_RESOURCES];
u64 dma_mask;
struct device dev; /* generic device */
};
#define to_eisa_device(n) container_of(n, struct eisa_device, dev)
+static inline int eisa_get_region_index (void *addr)
+{
+ unsigned long x = (unsigned long) addr;
+
+ x &= 0xc00;
+ return (x >> 12);
+}
+
struct eisa_driver {
const struct eisa_device_id *id_table;
struct device_driver driver;
@@ -69,6 +84,8 @@ struct eisa_root_device {
struct resource *res;
unsigned long bus_base_addr;
int slots; /* Max slot number */
+ int force_probe; /* Probe even when no slot 0 */
+ u64 dma_mask; /* from bridge device */
int bus_nr; /* Set by eisa_root_register */
struct resource eisa_root_res; /* ditto */
};