summary refs log tree commit diff
path: root/arch/arm/mach-omap2/gpmc.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>2013-03-14 22:54:11 +0100
committerJon Hunter <jon-hunter@ti.com>2013-04-03 20:13:42 -0500
commit5330dc161cb41e399e85d30e6908f1b93b956d1e (patch)
treed105fe18ce217db7231a332db5e4232b1b32bc6e /arch/arm/mach-omap2/gpmc.c
parent3af91cf7016bdfce9a6a0343ab942302e98e8f3d (diff)
downloadlinux-5330dc161cb41e399e85d30e6908f1b93b956d1e.tar.gz
ARM: OMAP2+: Add GPMC DT support for Ethernet child nodes
Besides being used to interface with external memory devices,
the General-Purpose Memory Controller can be used to connect
Pseudo-SRAM devices such as ethernet controllers to OMAP2+
processors using the TI GPMC as a data bus.

This patch allows an ethernet chip to be defined as an GPMC
child device node.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r--arch/arm/mach-omap2/gpmc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 8a1cafb2750e..ed946df5ad8a 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1544,6 +1544,14 @@ static int gpmc_probe_dt(struct platform_device *pdev)
 		}
 	}
 
+	for_each_node_by_name(child, "ethernet") {
+		ret = gpmc_probe_generic_child(pdev, child);
+		if (ret < 0) {
+			of_node_put(child);
+			return ret;
+		}
+	}
+
 	return 0;
 }
 #else