Lines Matching full:resource
21 struct resource { struct
27 struct resource *parent, *sibling, *child; argument
33 * PCI devices expose these flags to userspace in the "resource" sysfs file,
38 #define IORESOURCE_TYPE_BITS 0x00001f00 /* Resource type */
57 #define IORESOURCE_MUXED 0x00400000 /* Resource is software muxed */
59 #define IORESOURCE_EXT_TYPE_BITS 0x01000000 /* Resource extended types */
64 #define IORESOURCE_SYSRAM_MERGEABLE 0x04000000 /* Resource can be merged. */
66 #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
71 #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
73 /* I/O resource extended types */
124 #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */
128 * I/O Resource Descriptors
131 * for searching a specific resource range in the iomem table. Assign
132 * a new descriptor when a resource range supports the search interfaces.
133 * Otherwise, resource.desc must be set to IORES_DESC_NONE (0).
158 (struct resource) { \
192 extern struct resource ioport_resource;
193 extern struct resource iomem_resource;
195 extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);
196 extern int request_resource(struct resource *root, struct resource *new);
197 extern int release_resource(struct resource *new);
198 void release_child_resources(struct resource *new);
199 extern void reserve_region_with_split(struct resource *root,
202 extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new);
203 extern int insert_resource(struct resource *parent, struct resource *new);
204 extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);
205 extern int remove_resource(struct resource *old);
206 extern void arch_remove_reservations(struct resource *avail);
207 extern int allocate_resource(struct resource *root, struct resource *new,
211 const struct resource *,
215 struct resource *lookup_resource(struct resource *root, resource_size_t start);
216 int adjust_resource(struct resource *res, resource_size_t start,
218 resource_size_t resource_alignment(struct resource *res);
219 static inline resource_size_t resource_size(const struct resource *res) in resource_size()
223 static inline unsigned long resource_type(const struct resource *res) in resource_type()
227 static inline unsigned long resource_ext_type(const struct resource *res) in resource_ext_type()
232 static inline bool resource_contains(const struct resource *r1, const struct resource *r2) in resource_contains()
242 static inline bool resource_overlaps(const struct resource *r1, const struct resource *r2) in resource_overlaps()
247 static inline bool resource_intersection(const struct resource *r1, const struct resource *r2, in resource_intersection()
248 struct resource *r) in resource_intersection()
257 static inline bool resource_union(const struct resource *r1, const struct resource *r2, in resource_union()
258 struct resource *r) in resource_union()
278 extern struct resource * __request_region(struct resource *,
287 extern void __release_region(struct resource *, resource_size_t,
293 extern void merge_system_ram_resource(struct resource *res);
299 extern int devm_request_resource(struct device *dev, struct resource *root,
300 struct resource *new);
301 extern void devm_release_resource(struct device *dev, struct resource *new);
308 extern struct resource * __devm_request_region(struct device *dev,
309 struct resource *parent, resource_size_t start,
317 extern void __devm_release_region(struct device *dev, struct resource *parent,
321 extern bool resource_is_exclusive(struct resource *resource, u64 addr,
329 int (*func)(struct resource *, void *));
332 int (*func)(struct resource *, void *));
335 int (*func)(struct resource *, void *));
338 void *arg, int (*func)(struct resource *, void *));
340 struct resource *devm_request_free_mem_region(struct device *dev,
341 struct resource *base, unsigned long size);
342 struct resource *request_free_mem_region(struct resource *base,
344 struct resource *alloc_free_mem_region(struct resource *base,
347 static inline void irqresource_disabled(struct resource *res, u32 irq) in irqresource_disabled()