mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 04:45:43 +01:00
Merge tag 'v7.3-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu: "Fix a regression in caam" * tag 'v7.3-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: caam - map job ring registers without claiming region
This commit is contained in:
commit
5ad17a9760
1 file changed
+20
-3
@@ -583,12 +583,29 @@ static int caam_jr_probe(struct platform_device *pdev)
|
||||
struct caam_drv_private_jr *jrpriv;
|
||||
static int total_jobrs;
|
||||
void __iomem *ctrl;
|
||||
struct resource *r;
|
||||
int error;
|
||||
int irq;
|
||||
|
||||
ctrl = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(ctrl))
|
||||
return PTR_ERR(ctrl);
|
||||
/*
|
||||
* The job rings live inside the register window of their parent
|
||||
* fsl,sec-v4.0 node, which caam_probe() already reserves (and maps)
|
||||
* via devm_of_iomap(). A requested region that overlaps that
|
||||
* reservation, e.g. from devm_platform_ioremap_resource(), would
|
||||
* therefore fail with -EBUSY, so map the registers without claiming
|
||||
* the region here.
|
||||
*/
|
||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!r) {
|
||||
dev_err(&pdev->dev, "platform_get_resource() failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ctrl = devm_ioremap(&pdev->dev, r->start, resource_size(r));
|
||||
if (!ctrl) {
|
||||
dev_err(&pdev->dev, "devm_ioremap() failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
|
||||
Reference in new issue
Block a user