diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-01 21:44:02 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-03 10:09:29 +0100 |
commit | 200ae6b4eef9f6041016887f71fc01c5daee6f69 (patch) | |
tree | a49e7783e248f9d9488785e05f0e0ee365ec2353 /include/linux/ioport.h | |
parent | 70f7691d4110c4384e058ae3e64003ca9ad963a6 (diff) | |
download | barebox-200ae6b4eef9f6041016887f71fc01c5daee6f69.tar.gz barebox-200ae6b4eef9f6041016887f71fc01c5daee6f69.tar.xz |
add resource management functions
It is time to track our memory usage. Add a simple resource
management.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux/ioport.h')
-rw-r--r-- | include/linux/ioport.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 51431158d3..c837b53491 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -20,6 +20,9 @@ struct resource { resource_size_t size; const char *name; unsigned long flags; + struct resource *parent; + struct list_head children; + struct list_head sibling; }; /* @@ -111,5 +114,16 @@ static inline unsigned long resource_type(const struct resource *res) return res->flags & IORESOURCE_TYPE_BITS; } +struct resource *request_iomem_region(const char *name, + resource_size_t start, resource_size_t size); + +struct resource *request_region(struct resource *parent, + const char *name, resource_size_t start, + resource_size_t size); + +int release_region(struct resource *res); + +extern struct resource iomem_resource; + #endif /* __ASSEMBLY__ */ #endif /* _LINUX_IOPORT_H */ |