aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorCho KyongHo <pullip.cho@samsung.com>2014-05-12 02:14:53 -0400
committerJoerg Roedel <jroedel@suse.de>2014-05-13 13:12:54 -0400
commite5cf63c3025c2cb7e1db78658827f6ab2a7a039f (patch)
tree8b5b21711024a25a3f9732e9d89d7bc7b9f49593 /drivers/iommu
parentf4723ec1723c0925c4191f5f33192ec09c6164f8 (diff)
iommu/exynos: Remove dbgname from drvdata of a System MMU
This patch removes dbgname member from sysmmu_drvdata structure. Kernel message for debugging already has the name of a single System MMU node. It also removes some compilation warnings. Signed-off-by: Cho KyongHo <pullip.cho@samsung.com> Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/exynos-iommu.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index ef771a22c09d..be7a7b9c2d59 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -170,7 +170,6 @@ struct sysmmu_drvdata {
170 struct list_head node; /* entry of exynos_iommu_domain.clients */ 170 struct list_head node; /* entry of exynos_iommu_domain.clients */
171 struct device *sysmmu; /* System MMU's device descriptor */ 171 struct device *sysmmu; /* System MMU's device descriptor */
172 struct device *dev; /* Owner of system MMU */ 172 struct device *dev; /* Owner of system MMU */
173 char *dbgname;
174 void __iomem *sfrbase; 173 void __iomem *sfrbase;
175 struct clk *clk; 174 struct clk *clk;
176 int activations; 175 int activations;
@@ -321,8 +320,8 @@ static irqreturn_t exynos_sysmmu_irq(int irq, void *dev_id)
321 if (!ret && (itype != SYSMMU_FAULT_UNKNOWN)) 320 if (!ret && (itype != SYSMMU_FAULT_UNKNOWN))
322 __raw_writel(1 << itype, data->sfrbase + REG_INT_CLEAR); 321 __raw_writel(1 << itype, data->sfrbase + REG_INT_CLEAR);
323 else 322 else
324 dev_dbg(data->sysmmu, "(%s) %s is not handled.\n", 323 dev_dbg(data->sysmmu, "%s is not handled.\n",
325 data->dbgname, sysmmu_fault_name[itype]); 324 sysmmu_fault_name[itype]);
326 325
327 if (itype != SYSMMU_FAULT_UNKNOWN) 326 if (itype != SYSMMU_FAULT_UNKNOWN)
328 sysmmu_unblock(data->sfrbase); 327 sysmmu_unblock(data->sfrbase);
@@ -354,10 +353,10 @@ finish:
354 write_unlock_irqrestore(&data->lock, flags); 353 write_unlock_irqrestore(&data->lock, flags);
355 354
356 if (disabled) 355 if (disabled)
357 dev_dbg(data->sysmmu, "(%s) Disabled\n", data->dbgname); 356 dev_dbg(data->sysmmu, "Disabled\n");
358 else 357 else
359 dev_dbg(data->sysmmu, "(%s) %d times left to be disabled\n", 358 dev_dbg(data->sysmmu, "%d times left to be disabled\n",
360 data->dbgname, data->activations); 359 data->activations);
361 360
362 return disabled; 361 return disabled;
363} 362}
@@ -384,7 +383,7 @@ static int __exynos_sysmmu_enable(struct sysmmu_drvdata *data,
384 ret = 1; 383 ret = 1;
385 } 384 }
386 385
387 dev_dbg(data->sysmmu, "(%s) Already enabled\n", data->dbgname); 386 dev_dbg(data->sysmmu, "Already enabled\n");
388 goto finish; 387 goto finish;
389 } 388 }
390 389
@@ -399,7 +398,7 @@ static int __exynos_sysmmu_enable(struct sysmmu_drvdata *data,
399 398
400 data->domain = domain; 399 data->domain = domain;
401 400
402 dev_dbg(data->sysmmu, "(%s) Enabled\n", data->dbgname); 401 dev_dbg(data->sysmmu, "Enabled\n");
403finish: 402finish:
404 write_unlock_irqrestore(&data->lock, flags); 403 write_unlock_irqrestore(&data->lock, flags);
405 404
@@ -415,16 +414,15 @@ int exynos_sysmmu_enable(struct device *dev, unsigned long pgtable)
415 414
416 ret = pm_runtime_get_sync(data->sysmmu); 415 ret = pm_runtime_get_sync(data->sysmmu);
417 if (ret < 0) { 416 if (ret < 0) {
418 dev_dbg(data->sysmmu, "(%s) Failed to enable\n", data->dbgname); 417 dev_dbg(data->sysmmu, "Failed to enable\n");
419 return ret; 418 return ret;
420 } 419 }
421 420
422 ret = __exynos_sysmmu_enable(data, pgtable, NULL); 421 ret = __exynos_sysmmu_enable(data, pgtable, NULL);
423 if (WARN_ON(ret < 0)) { 422 if (WARN_ON(ret < 0)) {
424 pm_runtime_put(data->sysmmu); 423 pm_runtime_put(data->sysmmu);
425 dev_err(data->sysmmu, 424 dev_err(data->sysmmu, "Already enabled with page table %#x\n",
426 "(%s) Already enabled with page table %#x\n", 425 data->pgtable);
427 data->dbgname, data->pgtable);
428 } else { 426 } else {
429 data->dev = dev; 427 data->dev = dev;
430 } 428 }
@@ -474,9 +472,7 @@ static void sysmmu_tlb_invalidate_entry(struct device *dev, unsigned long iova,
474 sysmmu_unblock(data->sfrbase); 472 sysmmu_unblock(data->sfrbase);
475 } 473 }
476 } else { 474 } else {
477 dev_dbg(data->sysmmu, 475 dev_dbg(data->sysmmu, "Disabled. Skipping invalidating TLB.\n");
478 "(%s) Disabled. Skipping invalidating TLB.\n",
479 data->dbgname);
480 } 476 }
481 477
482 read_unlock_irqrestore(&data->lock, flags); 478 read_unlock_irqrestore(&data->lock, flags);
@@ -495,9 +491,7 @@ void exynos_sysmmu_tlb_invalidate(struct device *dev)
495 sysmmu_unblock(data->sfrbase); 491 sysmmu_unblock(data->sfrbase);
496 } 492 }
497 } else { 493 } else {
498 dev_dbg(data->sysmmu, 494 dev_dbg(data->sysmmu, "Disabled. Skipping invalidating TLB.\n");
499 "(%s) Disabled. Skipping invalidating TLB.\n",
500 data->dbgname);
501 } 495 }
502 496
503 read_unlock_irqrestore(&data->lock, flags); 497 read_unlock_irqrestore(&data->lock, flags);
@@ -560,7 +554,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
560 554
561 pm_runtime_enable(dev); 555 pm_runtime_enable(dev);
562 556
563 dev_dbg(dev, "(%s) Initialized\n", data->dbgname); 557 dev_dbg(dev, "Initialized\n");
564 return 0; 558 return 0;
565err_irq: 559err_irq:
566 free_irq(platform_get_irq(pdev, 0), data); 560 free_irq(platform_get_irq(pdev, 0), data);