diff options
Diffstat (limited to 'include/linux/ioport.h')
-rw-r--r-- | include/linux/ioport.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 041e95aac2bf..f6bb2ca8e3ba 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -49,6 +49,7 @@ struct resource_list { | |||
49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ | 49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ |
50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ | 50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ |
51 | 51 | ||
52 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ | ||
52 | #define IORESOURCE_DISABLED 0x10000000 | 53 | #define IORESOURCE_DISABLED 0x10000000 |
53 | #define IORESOURCE_UNSET 0x20000000 | 54 | #define IORESOURCE_UNSET 0x20000000 |
54 | #define IORESOURCE_AUTO 0x40000000 | 55 | #define IORESOURCE_AUTO 0x40000000 |
@@ -133,13 +134,16 @@ static inline unsigned long resource_type(struct resource *res) | |||
133 | } | 134 | } |
134 | 135 | ||
135 | /* Convenience shorthand with allocation */ | 136 | /* Convenience shorthand with allocation */ |
136 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) | 137 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), 0) |
137 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) | 138 | #define __request_mem_region(start,n,name, excl) __request_region(&iomem_resource, (start), (n), (name), excl) |
139 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name), 0) | ||
140 | #define request_mem_region_exclusive(start,n,name) \ | ||
141 | __request_region(&iomem_resource, (start), (n), (name), IORESOURCE_EXCLUSIVE) | ||
138 | #define rename_region(region, newname) do { (region)->name = (newname); } while (0) | 142 | #define rename_region(region, newname) do { (region)->name = (newname); } while (0) |
139 | 143 | ||
140 | extern struct resource * __request_region(struct resource *, | 144 | extern struct resource * __request_region(struct resource *, |
141 | resource_size_t start, | 145 | resource_size_t start, |
142 | resource_size_t n, const char *name); | 146 | resource_size_t n, const char *name, int relaxed); |
143 | 147 | ||
144 | /* Compatibility cruft */ | 148 | /* Compatibility cruft */ |
145 | #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) | 149 | #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) |
@@ -175,6 +179,7 @@ extern struct resource * __devm_request_region(struct device *dev, | |||
175 | extern void __devm_release_region(struct device *dev, struct resource *parent, | 179 | extern void __devm_release_region(struct device *dev, struct resource *parent, |
176 | resource_size_t start, resource_size_t n); | 180 | resource_size_t start, resource_size_t n); |
177 | extern int iomem_map_sanity_check(resource_size_t addr, unsigned long size); | 181 | extern int iomem_map_sanity_check(resource_size_t addr, unsigned long size); |
182 | extern int iomem_is_exclusive(u64 addr); | ||
178 | 183 | ||
179 | #endif /* __ASSEMBLY__ */ | 184 | #endif /* __ASSEMBLY__ */ |
180 | #endif /* _LINUX_IOPORT_H */ | 185 | #endif /* _LINUX_IOPORT_H */ |