* [PATCH 1/3] iommu: tegra/gart: use correct gart_device
@ 2012-04-13 13:08 Thierry Reding
[not found] ` <1334322489-837-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2012-04-13 13:08 UTC (permalink / raw)
To: linux-tegra-u79uwXL29TY76Z2rM5mHXA
Cc: Stephen Warren, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Rob Herring, Grant Likely,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Colin Cross,
Olof Johansson, Vandana Salve
From: Vandana Salve <vsalve-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Pass the correct gart device pointer.
Reviewed-by: Vandana Salve <vsalve-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Tested-by: Vandana Salve <vsalve-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Bharat Nihalani <bnihalani-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Hiroshi DOYU <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/iommu/tegra-gart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
index 779306e..f6bc1e6 100644
--- a/drivers/iommu/tegra-gart.c
+++ b/drivers/iommu/tegra-gart.c
@@ -158,7 +158,7 @@ static int gart_iommu_attach_dev(struct iommu_domain *domain,
struct gart_client *client, *c;
int err = 0;
- gart = dev_get_drvdata(dev->parent);
+ gart = gart_handle;
if (!gart)
return -EINVAL;
domain->priv = gart;
--
1.7.10
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] iommu: tegra/gart: Add device tree support
[not found] ` <1334322489-837-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
@ 2012-04-13 13:08 ` Thierry Reding
[not found] ` <1334322489-837-2-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-13 13:08 ` [PATCH 3/3] ARM: dt: tegra20: Add GART device Thierry Reding
2012-04-16 11:59 ` [PATCH 1/3] iommu: tegra/gart: use correct gart_device Joerg Roedel
2 siblings, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2012-04-13 13:08 UTC (permalink / raw)
To: linux-tegra-u79uwXL29TY76Z2rM5mHXA
Cc: Stephen Warren, Olof Johansson, Colin Cross,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Hiroshi Doyu,
Joerg Roedel, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Grant Likely, Rob Herring
This commit adds device tree support for the GART hardware available on
NVIDIA Tegra 20 SoCs.
Signed-off-by: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
---
.../devicetree/bindings/iommu/nvidia,tegra20-gart.txt | 14 ++++++++++++++
drivers/iommu/tegra-gart.c | 11 +++++++++++
2 files changed, 25 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt
diff --git a/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt b/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt
new file mode 100644
index 0000000..2d87b91
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/nvidia,tegra20-gart.txt
@@ -0,0 +1,14 @@
+NVIDIA Tegra 20 GART
+
+Required properties:
+- compatible: "nvidia,tegra20-gart"
+- reg: Two pairs of cells specifying the physical address and size of
+ the memory controller registers and the GART aperture respectively.
+
+Example:
+
+ gart: gart@7000f000 {
+ compatible = "nvidia,tegra20-gart";
+ reg = < 0x7000f000 0x00000100 /* controller registers */
+ 0x58000000 0x02000000 >; /* GART aperture */
+ };
diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
index f6bc1e6..40533bb 100644
--- a/drivers/iommu/tegra-gart.c
+++ b/drivers/iommu/tegra-gart.c
@@ -29,6 +29,7 @@
#include <linux/device.h>
#include <linux/io.h>
#include <linux/iommu.h>
+#include <linux/of.h>
#include <asm/cacheflush.h>
@@ -422,6 +423,14 @@ const struct dev_pm_ops tegra_gart_pm_ops = {
.resume = tegra_gart_resume,
};
+#ifdef CONFIG_OF
+static struct of_device_id tegra_gart_of_match[] __devinitdata = {
+ { .compatible = "nvidia,tegra20-gart", },
+ { },
+};
+MODULE_DEVICE_TABLE(of, tegra_gart_of_match);
+#endif
+
static struct platform_driver tegra_gart_driver = {
.probe = tegra_gart_probe,
.remove = tegra_gart_remove,
@@ -429,6 +438,7 @@ static struct platform_driver tegra_gart_driver = {
.owner = THIS_MODULE,
.name = "tegra-gart",
.pm = &tegra_gart_pm_ops,
+ .of_match_table = of_match_ptr(tegra_gart_of_match),
},
};
@@ -448,4 +458,5 @@ module_exit(tegra_gart_exit);
MODULE_DESCRIPTION("IOMMU API for GART in Tegra20");
MODULE_AUTHOR("Hiroshi DOYU <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>");
+MODULE_ALIAS("platform:tegra-gart");
MODULE_LICENSE("GPL v2");
--
1.7.10
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] ARM: dt: tegra20: Add GART device
[not found] ` <1334322489-837-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-13 13:08 ` [PATCH 2/3] iommu: tegra/gart: Add device tree support Thierry Reding
@ 2012-04-13 13:08 ` Thierry Reding
[not found] ` <1334322489-837-3-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-16 11:59 ` [PATCH 1/3] iommu: tegra/gart: use correct gart_device Joerg Roedel
2 siblings, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2012-04-13 13:08 UTC (permalink / raw)
To: linux-tegra-u79uwXL29TY76Z2rM5mHXA
Cc: Stephen Warren, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Rob Herring, Grant Likely,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Colin Cross,
Olof Johansson
This commit adds the device node required to probe NVIDIA Tegra 20 GART
hardware from the device tree.
Signed-off-by: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
---
arch/arm/boot/dts/tegra20.dtsi | 6 ++++++
arch/arm/mach-tegra/board-dt-tegra20.c | 1 +
2 files changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 55b28fd..cf3ff41 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -212,5 +212,11 @@
interrupts = < 0 97 0x04 >;
phy_type = "utmi";
};
+
+ gart: gart@7000f000 {
+ compatible = "nvidia,tegra20-gart";
+ reg = < 0x7000f000 0x00000100 /* controller registers */
+ 0x58000000 0x02000000 >; /* GART aperture */
+ };
};
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index 57745e6..bffba1b 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -66,6 +66,7 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB3_BASE, "tegra-ehci.2",
&tegra_ehci3_pdata),
OF_DEV_AUXDATA("nvidia,tegra20-pwm", TEGRA_PWFM_BASE, "tegra-pwm", NULL),
+ OF_DEV_AUXDATA("nvidia,tegra20-gart", TEGRA_MC_BASE, "tegra-gart", NULL),
{}
};
--
1.7.10
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] iommu: tegra/gart: Add device tree support
[not found] ` <1334322489-837-2-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
@ 2012-04-13 19:37 ` Stephen Warren
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Warren @ 2012-04-13 19:37 UTC (permalink / raw)
To: Thierry Reding
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson, Colin Cross,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Hiroshi Doyu,
Joerg Roedel, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Grant Likely, Rob Herring
On 04/13/2012 07:08 AM, Thierry Reding wrote:
> This commit adds device tree support for the GART hardware available on
> NVIDIA Tegra 20 SoCs.
>
> Signed-off-by: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
Acked-by: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Here, I note that the GART aperture is included in the regs property,
but I believe that's legitimate on Tegra20 because the CPU can access
the GART aperture at that address.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] ARM: dt: tegra20: Add GART device
[not found] ` <1334322489-837-3-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
@ 2012-04-13 19:39 ` Stephen Warren
[not found] ` <4F8880E6.5070301-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Warren @ 2012-04-13 19:39 UTC (permalink / raw)
To: Thierry Reding
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Rob Herring,
Grant Likely, Olof Johansson,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Colin Cross,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
On 04/13/2012 07:08 AM, Thierry Reding wrote:
> This commit adds the device node required to probe NVIDIA Tegra 20 GART
> hardware from the device tree.
> diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
> + OF_DEV_AUXDATA("nvidia,tegra20-gart", TEGRA_MC_BASE, "tegra-gart", NULL),
That's only needed if lookup tables (e.g. for clocks) require that the
device have a specific name. I don't believe the GART is mentioned in
any such lookup tables, so I think you can drop that change.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] ARM: dt: tegra20: Add GART device
[not found] ` <4F8880E6.5070301-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2012-04-14 8:30 ` Thierry Reding
0 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2012-04-14 8:30 UTC (permalink / raw)
To: Stephen Warren
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Olof Johansson, Colin Cross,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Hiroshi Doyu,
Joerg Roedel, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Grant Likely, Rob Herring
[-- Attachment #1: Type: text/plain, Size: 626 bytes --]
* Stephen Warren wrote:
> On 04/13/2012 07:08 AM, Thierry Reding wrote:
> > This commit adds the device node required to probe NVIDIA Tegra 20 GART
> > hardware from the device tree.
>
> > diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
>
> > + OF_DEV_AUXDATA("nvidia,tegra20-gart", TEGRA_MC_BASE, "tegra-gart", NULL),
>
> That's only needed if lookup tables (e.g. for clocks) require that the
> device have a specific name. I don't believe the GART is mentioned in
> any such lookup tables, so I think you can drop that change.
I'll remove that hunk.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] iommu: tegra/gart: use correct gart_device
[not found] ` <1334322489-837-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-13 13:08 ` [PATCH 2/3] iommu: tegra/gart: Add device tree support Thierry Reding
2012-04-13 13:08 ` [PATCH 3/3] ARM: dt: tegra20: Add GART device Thierry Reding
@ 2012-04-16 11:59 ` Joerg Roedel
[not found] ` <20120416115902.GX2428-5C7GfCeVMHo@public.gmane.org>
2 siblings, 1 reply; 8+ messages in thread
From: Joerg Roedel @ 2012-04-16 11:59 UTC (permalink / raw)
To: Thierry Reding
Cc: Stephen Warren, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Rob Herring, Grant Likely, Olof Johansson,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Colin Cross,
linux-tegra-u79uwXL29TY76Z2rM5mHXA, Vandana Salve
Applied patches 1 and 2. Should I also queue up patch 3 after the
objections have been fixed? The patch doesn't touch drivers/iommu...
Joerg
On Fri, Apr 13, 2012 at 03:08:07PM +0200, Thierry Reding wrote:
> From: Vandana Salve <vsalve-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> Pass the correct gart device pointer.
>
> Reviewed-by: Vandana Salve <vsalve-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Tested-by: Vandana Salve <vsalve-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Bharat Nihalani <bnihalani-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Hiroshi DOYU <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/iommu/tegra-gart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
> index 779306e..f6bc1e6 100644
> --- a/drivers/iommu/tegra-gart.c
> +++ b/drivers/iommu/tegra-gart.c
> @@ -158,7 +158,7 @@ static int gart_iommu_attach_dev(struct iommu_domain *domain,
> struct gart_client *client, *c;
> int err = 0;
>
> - gart = dev_get_drvdata(dev->parent);
> + gart = gart_handle;
> if (!gart)
> return -EINVAL;
> domain->priv = gart;
> --
> 1.7.10
>
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] iommu: tegra/gart: use correct gart_device
[not found] ` <20120416115902.GX2428-5C7GfCeVMHo@public.gmane.org>
@ 2012-04-16 16:07 ` Stephen Warren
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Warren @ 2012-04-16 16:07 UTC (permalink / raw)
To: Joerg Roedel
Cc: Thierry Reding, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
Vandana Salve, Hiroshi DOYU, Olof Johansson, Colin Cross,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Grant Likely,
Rob Herring
On 04/16/2012 05:59 AM, Joerg Roedel wrote:
> Applied patches 1 and 2. Should I also queue up patch 3 after the
> objections have been fixed? The patch doesn't touch drivers/iommu...
I expect I'd take that through the Tegra tree to minimize conflicts.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-04-16 16:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 13:08 [PATCH 1/3] iommu: tegra/gart: use correct gart_device Thierry Reding
[not found] ` <1334322489-837-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-13 13:08 ` [PATCH 2/3] iommu: tegra/gart: Add device tree support Thierry Reding
[not found] ` <1334322489-837-2-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-13 19:37 ` Stephen Warren
2012-04-13 13:08 ` [PATCH 3/3] ARM: dt: tegra20: Add GART device Thierry Reding
[not found] ` <1334322489-837-3-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-13 19:39 ` Stephen Warren
[not found] ` <4F8880E6.5070301-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-14 8:30 ` Thierry Reding
2012-04-16 11:59 ` [PATCH 1/3] iommu: tegra/gart: use correct gart_device Joerg Roedel
[not found] ` <20120416115902.GX2428-5C7GfCeVMHo@public.gmane.org>
2012-04-16 16:07 ` Stephen Warren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.