Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221003
b: refs/heads/master
c: a86c44d
h: refs/heads/master
i:
  221001: 3bb50b9
  220999: 0bf862d
v: v3
  • Loading branch information
Vasiliy Kulikov authored and Daniel Walker committed Oct 27, 2010
1 parent 0b20d05 commit 4977265
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: efdfb2b118cc11c88adcbcb8036795eb34f419a8
refs/heads/master: a86c44d48a03dcd73972ddadb55a77e6b308fa0b
22 changes: 13 additions & 9 deletions trunk/arch/arm/mach-msm/iommu_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static void msm_iommu_reset(void __iomem *base)

static int msm_iommu_probe(struct platform_device *pdev)
{
struct resource *r;
struct resource *r, *r2;
struct clk *iommu_clk;
struct msm_iommu_drvdata *drvdata;
struct msm_iommu_dev *iommu_dev = pdev->dev.platform_data;
Expand Down Expand Up @@ -183,42 +183,42 @@ static int msm_iommu_probe(struct platform_device *pdev)

len = r->end - r->start + 1;

r = request_mem_region(r->start, len, r->name);
if (!r) {
r2 = request_mem_region(r->start, len, r->name);
if (!r2) {
pr_err("Could not request memory region: "
"start=%p, len=%d\n", (void *) r->start, len);
ret = -EBUSY;
goto fail;
}

regs_base = ioremap(r->start, len);
regs_base = ioremap(r2->start, len);

if (!regs_base) {
pr_err("Could not ioremap: start=%p, len=%d\n",
(void *) r->start, len);
(void *) r2->start, len);
ret = -EBUSY;
goto fail;
goto fail_mem;
}

irq = platform_get_irq_byname(pdev, "secure_irq");
if (irq < 0) {
ret = -ENODEV;
goto fail;
goto fail_io;
}

mb();

if (GET_IDR(regs_base) == 0) {
pr_err("Invalid IDR value detected\n");
ret = -ENODEV;
goto fail;
goto fail_io;
}

ret = request_irq(irq, msm_iommu_fault_handler, 0,
"msm_iommu_secure_irpt_handler", drvdata);
if (ret) {
pr_err("Request IRQ %d failed with ret=%d\n", irq, ret);
goto fail;
goto fail_io;
}

msm_iommu_reset(regs_base);
Expand All @@ -237,6 +237,10 @@ static int msm_iommu_probe(struct platform_device *pdev)

return 0;

fail_io:
iounmap(regs_base);
fail_mem:
release_mem_region(r->start, len);
fail:
kfree(drvdata);
return ret;
Expand Down

0 comments on commit 4977265

Please sign in to comment.