Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\devres.c Create Date:2022-07-28 06:49:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__devm_ioremap_resource

Proto:static void __iomem *__devm_ioremap_resource(struct device *dev, const struct resource *res, enum devm_ioremap_type type)

Type:void

Parameter:

TypeParameterName
struct device *dev
const struct resource *res
enum devm_ioremap_typetype
141  __iomem * dest_ptr
143  BUG_ON(!dev)
145  If Not res || resource_type(res) != IORESOURCE_MEM Then
146  dev_err(dev, "invalid resource\n")
147  Return IOMEM_ERR_PTR( - EINVAL)
150  size = resource_size(res)
152  If Not devm_request_mem_region(dev, start, size, dev_name(dev)) Then
153  dev_err(dev, "can't request region for resource %pR\n", res)
154  Return IOMEM_ERR_PTR( - EBUSY)
157  dest_ptr = __devm_ioremap(dev, start, size, type)
158  If Not dest_ptr Then
159  dev_err(dev, "ioremap failed for resource %pR\n", res)
160  devm_release_mem_region(dev, start, size)
161  dest_ptr = IOMEM_ERR_PTR( - ENOMEM)
164  Return dest_ptr
Caller
NameDescribe
devm_ioremap_resourcedevm_ioremap_resource() - check, request region, and ioremap resource*@dev: generic device to handle the resource for*@res: resource to be handled* Checks that a resource is a valid memory region, requests the memory* region and ioremaps it
devm_ioremap_resource_wcdevm_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