2 * ioport.h Definitions of routines for detecting, reserving and
3 * allocating system resources.
5 * Authors: Linus Torvalds
8 #ifndef _LINUX_IOPORT_H
9 #define _LINUX_IOPORT_H
12 * Resources are tree-like, allowing
17 unsigned long start
, end
;
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)
45 extern void autoirq_setup(int waittime
);
46 extern int autoirq_report(int waittime
);
48 #endif /* _LINUX_IOPORT_H */