Import 2.3.11pre1
[davej-history.git] / include / linux / ioport.h
blob597b3ebce50540e39a6331925d26c3802266d24a
1 /*
2 * ioport.h Definitions of routines for detecting, reserving and
3 * allocating system resources.
5 * Authors: Linus Torvalds
6 */
8 #ifndef _LINUX_IOPORT_H
9 #define _LINUX_IOPORT_H
12 * Resources are tree-like, allowing
13 * nesting etc..
15 struct resource {
16 const char *name;
17 unsigned long start, end;
18 unsigned long flags;
19 struct resource *parent, *sibling, *child;
22 extern struct resource pci_io_resource;
23 extern struct resource pci_mem_resource;
25 extern void reserve_setup(char *str, int *ints);
26 extern int get_resource_list(struct resource *, char *buf, int size);
28 extern int request_resource(struct resource *root, struct resource *new);
29 extern int release_resource(struct resource *new);
31 /* Convenience shorthand with allocation */
32 #define request_region(start,n,name) __request_region(&pci_io_resource, (start), (n), (name))
33 extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name);
35 /* Compatibility cruft */
36 #define check_region(start,n) __check_region(&pci_io_resource, (start), (n))
37 #define release_region(start,n) __release_region(&pci_io_resource, (start), (n))
38 extern int __check_region(struct resource *, unsigned long, unsigned long);
39 extern void __release_region(struct resource *, unsigned long, unsigned long);
41 #define get_ioport_list(buf) get_resource_list(&pci_io_resource, buf, PAGE_SIZE)
42 #define get_mem_list(buf) get_resource_list(&pci_mem_resource, buf, PAGE_SIZE)
44 #define HAVE_AUTOIRQ
45 extern void autoirq_setup(int waittime);
46 extern int autoirq_report(int waittime);
48 #endif /* _LINUX_IOPORT_H */