Re: [PATCH] iommu: exynos: add support for dt based instantiation for iommu devices

2012-11-29 Thread Rahul Sharma
Thanks Mr. Joerg,

I want to request you to abandon the above patches submitted by me.
The exynos-iommu drivers
patches, submitted by Mr. Kyongho Cho, also contains DT changes along
with other things.

It is been already applied to arm/exynos branch.

regards,
Rahul Sharma.


On Sun, Nov 18, 2012 at 3:07 AM, Joerg Roedel j...@8bytes.org wrote:
 On Mon, Nov 05, 2012 at 03:18:15PM +0530, Rahul Sharma wrote:
  drivers/iommu/exynos-iommu.c |   28 +---
  2 files changed, 26 insertions(+), 4 deletions(-)

 I added the following build-fix to the arm/exynos branch too:

 From e706d84c9fecd7855191eab2f9e2e0234a0f8e05 Mon Sep 17 00:00:00 2001
 From: Joerg Roedel j...@8bytes.org
 Date: Sat, 17 Nov 2012 22:29:32 +0100
 Subject: [PATCH] iommu/exynos: Fix build error in exynos_sysmmu_probe

 Fix the following build error:

   CC  drivers/iommu/exynos-iommu.o
 /data/repos/linux/drivers/iommu/exynos-iommu.c: In function 
 'exynos_sysmmu_probe':
 /data/repos/linux/drivers/iommu/exynos-iommu.c:647:43: error: dereferencing 
 pointer to incomplete type
 make[3]: *** [drivers/iommu/exynos-iommu.o] Error 1

 Signed-off-by: Joerg Roedel j...@8bytes.org
 ---
  drivers/iommu/exynos-iommu.c |1 +
  1 file changed, 1 insertion(+)

 diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
 index 9079f71..da1975d 100644
 --- a/drivers/iommu/exynos-iommu.c
 +++ b/drivers/iommu/exynos-iommu.c
 @@ -26,6 +26,7 @@
  #include linux/memblock.h
  #include linux/export.h
  #include linux/of_platform.h
 +#include linux/of.h

  #include asm/cacheflush.h
  #include asm/pgtable.h
 --
 1.7.9.5


___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


[PATCH] iommu: exynos: add support for dt based instantiation for iommu devices

2012-11-08 Thread KyongHo Cho
Hi.

Thank you for your work for exynos-iommu.
Actually I am preparing a design change of exynos-iommu driver including DT
support.
If you are OK, I want to discuss with you about it.

The current exynos-iommu driver needs to be upgraded to make it transparent
to the client drivers.

Thank you.

Cho KyongHo.

On Mon, Nov 5, 2012 at 6:48 PM, Rahul Sharma rahul.sha...@samsung.com
wrote:
 This patch adds supports DT based intantiation of sysmmu devices.
 It also removes dependency on CONFIG_EXYNOS_DEV_SYSMMU which is
 primarily meant for nont-dt platforms.

 This patch is based on arm/exynos branch at
 http://git.kernel.org/?p=linux/kernel/git/joro/iommu.git

 This patch is having dependency on  linux-samsung-soc patchset named
 add dt based support for iommu for hdmi

 Signed-off-by: Rahul Sharma rahul.sha...@samsung.com
 ---
  drivers/iommu/Kconfig|2 +-
  drivers/iommu/exynos-iommu.c |   28 +---
  2 files changed, 26 insertions(+), 4 deletions(-)

 diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
 index 9f69b56..52dc41f 100644
 --- a/drivers/iommu/Kconfig
 +++ b/drivers/iommu/Kconfig
 @@ -168,7 +168,7 @@ config TEGRA_IOMMU_SMMU

  config EXYNOS_IOMMU
 bool Exynos IOMMU Support
 -   depends on ARCH_EXYNOS  EXYNOS_DEV_SYSMMU
 +   depends on ARCH_EXYNOS
 select IOMMU_API
 help
   Support for the IOMMU(System MMU) of Samsung Exynos application
 diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
 index 7fe44f8..9079f71 100644
 --- a/drivers/iommu/exynos-iommu.c
 +++ b/drivers/iommu/exynos-iommu.c
 @@ -25,6 +25,7 @@
  #include linux/list.h
  #include linux/memblock.h
  #include linux/export.h
 +#include linux/of_platform.h

  #include asm/cacheflush.h
  #include asm/pgtable.h
 @@ -576,6 +577,7 @@ static int exynos_sysmmu_probe(struct platform_device
*pdev)
 int i, ret;
 struct device *dev;
 struct sysmmu_drvdata *data;
 +   struct sysmmu_platform_data *platdata;

 dev = pdev-dev;

 @@ -634,9 +636,21 @@ static int exynos_sysmmu_probe(struct
platform_device *pdev)
 }
 }

 +   if(dev-of_node) {
 +   platdata = devm_kzalloc(dev, sizeof(*platdata),
GFP_KERNEL);
 +   if (!platdata) {
 +   dev_dbg(dev, memory allocation for pdata
failed\n);
 +   goto err_irq;
 +   }
 +
 +   platdata-clockname = SYSMMU_CLOCK_NAME;
 +   platdata-dbgname = (char *)dev-of_node-name;
 +   dev-platform_data = platdata;
 +   }
 +
 if (dev_get_platdata(dev)) {
 char *deli, *beg;
 -   struct sysmmu_platform_data *platdata =
dev_get_platdata(dev);
 +   platdata = dev_get_platdata(dev);

 beg = platdata-clockname;

 @@ -670,8 +684,7 @@ static int exynos_sysmmu_probe(struct platform_device
*pdev)

 __set_fault_handler(data, default_fault_handler);

 -   if (dev-parent)
 -   pm_runtime_enable(dev);
 +   pm_runtime_enable(dev);

 dev_dbg(dev, (%s) Initialized\n, data-dbgname);
 return 0;
 @@ -693,11 +706,20 @@ err_alloc:
 return ret;
  }

 +static struct of_device_id iommu_match_types[] = {
 +   {
 +   .compatible = samsung,exynos5-sysmmu,
 +   }, {
 +   /* end node */
 +   }
 +};
 +
  static struct platform_driver exynos_sysmmu_driver = {
 .probe  = exynos_sysmmu_probe,
 .driver = {
 .owner  = THIS_MODULE,
 .name   = exynos-sysmmu,
 +   .of_match_table = iommu_match_types,
 }
  };

 --
 1.7.0.4

 ___
 iommu mailing list
 iommu@lists.linux-foundation.org
 https://lists.linuxfoundation.org/mailman/listinfo/iommu
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH] iommu: exynos: add support for dt based instantiation for iommu devices

2012-11-06 Thread Rahul Sharma
This patch adds supports DT based intantiation of sysmmu devices.
It also removes dependency on CONFIG_EXYNOS_DEV_SYSMMU which is
primarily meant for nont-dt platforms.

This patch is based on arm/exynos branch at
http://git.kernel.org/?p=linux/kernel/git/joro/iommu.git

This patch is having dependency on  linux-samsung-soc patchset named
add dt based support for iommu for hdmi

Signed-off-by: Rahul Sharma rahul.sha...@samsung.com
---
 drivers/iommu/Kconfig|2 +-
 drivers/iommu/exynos-iommu.c |   28 +---
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 9f69b56..52dc41f 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -168,7 +168,7 @@ config TEGRA_IOMMU_SMMU
 
 config EXYNOS_IOMMU
bool Exynos IOMMU Support
-   depends on ARCH_EXYNOS  EXYNOS_DEV_SYSMMU
+   depends on ARCH_EXYNOS
select IOMMU_API
help
  Support for the IOMMU(System MMU) of Samsung Exynos application
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 7fe44f8..9079f71 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -25,6 +25,7 @@
 #include linux/list.h
 #include linux/memblock.h
 #include linux/export.h
+#include linux/of_platform.h
 
 #include asm/cacheflush.h
 #include asm/pgtable.h
@@ -576,6 +577,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
int i, ret;
struct device *dev;
struct sysmmu_drvdata *data;
+   struct sysmmu_platform_data *platdata;
 
dev = pdev-dev;
 
@@ -634,9 +636,21 @@ static int exynos_sysmmu_probe(struct platform_device 
*pdev)
}
}
 
+   if(dev-of_node) {
+   platdata = devm_kzalloc(dev, sizeof(*platdata), GFP_KERNEL);
+   if (!platdata) {
+   dev_dbg(dev, memory allocation for pdata failed\n);
+   goto err_irq;
+   }
+
+   platdata-clockname = SYSMMU_CLOCK_NAME;
+   platdata-dbgname = (char *)dev-of_node-name;
+   dev-platform_data = platdata;
+   }
+
if (dev_get_platdata(dev)) {
char *deli, *beg;
-   struct sysmmu_platform_data *platdata = dev_get_platdata(dev);
+   platdata = dev_get_platdata(dev);
 
beg = platdata-clockname;
 
@@ -670,8 +684,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
 
__set_fault_handler(data, default_fault_handler);
 
-   if (dev-parent)
-   pm_runtime_enable(dev);
+   pm_runtime_enable(dev);
 
dev_dbg(dev, (%s) Initialized\n, data-dbgname);
return 0;
@@ -693,11 +706,20 @@ err_alloc:
return ret;
 }
 
+static struct of_device_id iommu_match_types[] = {
+   {
+   .compatible = samsung,exynos5-sysmmu,
+   }, {
+   /* end node */
+   }
+};
+
 static struct platform_driver exynos_sysmmu_driver = {
.probe  = exynos_sysmmu_probe,
.driver = {
.owner  = THIS_MODULE,
.name   = exynos-sysmmu,
+   .of_match_table = iommu_match_types,
}
 };
 
-- 
1.7.0.4

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


[PATCH] iommu: exynos: add support for dt based instantiation for iommu devices

2012-11-06 Thread Rahul Sharma
This patch adds supports DT based intantiation of sysmmu devices.
It also removes dependency on CONFIG_EXYNOS_DEV_SYSMMU which is
primarily meant for nont-dt platforms.

This patch is based on arm/exynos branch at
http://git.kernel.org/?p=linux/kernel/git/joro/iommu.git

This patch is having dependency on  linux-samsung-soc patchset posted at
http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/13556

Signed-off-by: Rahul Sharma rahul.sha...@samsung.com
---
 drivers/iommu/Kconfig|2 +-
 drivers/iommu/exynos-iommu.c |   28 +---
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 9f69b56..52dc41f 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -168,7 +168,7 @@ config TEGRA_IOMMU_SMMU
 
 config EXYNOS_IOMMU
bool Exynos IOMMU Support
-   depends on ARCH_EXYNOS  EXYNOS_DEV_SYSMMU
+   depends on ARCH_EXYNOS
select IOMMU_API
help
  Support for the IOMMU(System MMU) of Samsung Exynos application
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 7fe44f8..64a7392 100644
--- a/drivers/iommu/exynos-iommu.c
+++ b/drivers/iommu/exynos-iommu.c
@@ -25,6 +25,7 @@
 #include linux/list.h
 #include linux/memblock.h
 #include linux/export.h
+#include linux/of_platform.h
 
 #include asm/cacheflush.h
 #include asm/pgtable.h
@@ -576,6 +577,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
int i, ret;
struct device *dev;
struct sysmmu_drvdata *data;
+   struct sysmmu_platform_data *platdata;
 
dev = pdev-dev;
 
@@ -634,9 +636,21 @@ static int exynos_sysmmu_probe(struct platform_device 
*pdev)
}
}
 
+   if (dev-of_node) {
+   platdata = devm_kzalloc(dev, sizeof(*platdata), GFP_KERNEL);
+   if (!platdata) {
+   dev_dbg(dev, memory allocation for pdata failed\n);
+   goto err_irq;
+   }
+
+   platdata-clockname = SYSMMU_CLOCK_NAME;
+   platdata-dbgname = (char *)dev-of_node-name;
+   dev-platform_data = platdata;
+   }
+
if (dev_get_platdata(dev)) {
char *deli, *beg;
-   struct sysmmu_platform_data *platdata = dev_get_platdata(dev);
+   platdata = dev_get_platdata(dev);
 
beg = platdata-clockname;
 
@@ -670,8 +684,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev)
 
__set_fault_handler(data, default_fault_handler);
 
-   if (dev-parent)
-   pm_runtime_enable(dev);
+   pm_runtime_enable(dev);
 
dev_dbg(dev, (%s) Initialized\n, data-dbgname);
return 0;
@@ -693,11 +706,20 @@ err_alloc:
return ret;
 }
 
+static struct of_device_id iommu_match_types[] = {
+   {
+   .compatible = samsung,exynos5-sysmmu,
+   }, {
+   /* end node */
+   }
+};
+
 static struct platform_driver exynos_sysmmu_driver = {
.probe  = exynos_sysmmu_probe,
.driver = {
.owner  = THIS_MODULE,
.name   = exynos-sysmmu,
+   .of_match_table = iommu_match_types,
}
 };
 
-- 
1.7.0.4

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu