mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
lib: devres: provide devm_ioremap_resource_wc()
Provide a variant of devm_ioremap_resource() for write-combined ioremap. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20191022084318.22256-4-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6e92482275
commit
b873af620e
@ -316,6 +316,7 @@ IOMAP
|
||||
devm_ioremap_nocache()
|
||||
devm_ioremap_wc()
|
||||
devm_ioremap_resource() : checks resource, requests memory region, ioremaps
|
||||
devm_ioremap_resource_wc()
|
||||
devm_platform_ioremap_resource() : calls devm_ioremap_resource() for platform device
|
||||
devm_iounmap()
|
||||
pcim_iomap()
|
||||
|
@ -962,6 +962,8 @@ extern void devm_free_pages(struct device *dev, unsigned long addr);
|
||||
|
||||
void __iomem *devm_ioremap_resource(struct device *dev,
|
||||
const struct resource *res);
|
||||
void __iomem *devm_ioremap_resource_wc(struct device *dev,
|
||||
const struct resource *res);
|
||||
|
||||
void __iomem *devm_of_iomap(struct device *dev,
|
||||
struct device_node *node, int index,
|
||||
|
15
lib/devres.c
15
lib/devres.c
@ -169,6 +169,21 @@ void __iomem *devm_ioremap_resource(struct device *dev,
|
||||
}
|
||||
EXPORT_SYMBOL(devm_ioremap_resource);
|
||||
|
||||
/**
|
||||
* devm_ioremap_resource_wc() - write-combined variant of
|
||||
* devm_ioremap_resource()
|
||||
* @dev: generic device to handle the resource for
|
||||
* @res: resource to be handled
|
||||
*
|
||||
* Returns a pointer to the remapped memory or an ERR_PTR() encoded error code
|
||||
* on failure. Usage example:
|
||||
*/
|
||||
void __iomem *devm_ioremap_resource_wc(struct device *dev,
|
||||
const struct resource *res)
|
||||
{
|
||||
return __devm_ioremap_resource(dev, res, DEVM_IOREMAP_WC);
|
||||
}
|
||||
|
||||
/*
|
||||
* devm_of_iomap - Requests a resource and maps the memory mapped IO
|
||||
* for a given device_node managed by a given device
|
||||
|
Loading…
Reference in New Issue
Block a user