From patchwork Sat Feb 9 20:44:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 2121021 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id E8FFF3FCA4 for ; Sat, 9 Feb 2013 20:45:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932571Ab3BIUpE (ORCPT ); Sat, 9 Feb 2013 15:45:04 -0500 Received: from bhuna.collabora.co.uk ([93.93.135.160]:40091 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932548Ab3BIUpC (ORCPT ); Sat, 9 Feb 2013 15:45:02 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: javier) with ESMTPSA id 612FC16984C7 From: Javier Martinez Canillas To: Tony Lindgren Cc: =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Russell King , Linus Walleij , Greg Kroah-Hartman , Enric Balletbo i Serra , Ezequiel Garcia , devicetree-discuss@lists.ozlabs.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Javier Martinez Canillas Subject: [PATCH RFC 5/7] ARM: OMAP: gpmc: add support for gpmc-smsc911x child nodes Date: Sat, 9 Feb 2013 21:44:29 +0100 Message-Id: <1360442671-15216-6-git-send-email-javier.martinez@collabora.co.uk> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1360442671-15216-1-git-send-email-javier.martinez@collabora.co.uk> References: <1360442671-15216-1-git-send-email-javier.martinez@collabora.co.uk> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Besides being used to interface with external memory devices, the General-Purpose Memory Controller can be used to connect Pseudo-SRAM devices to the OMAP processor that use the GPMC as a data bus. One of these devices is the smsc911x LAN chip. This patch allows an smsc911x LAN pheripheral to be defined as an GPMC child node an call its corresponding setup function. Signed-off-by: Javier Martinez Canillas --- arch/arm/mach-omap2/gpmc.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index f55b504..fd22c62 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -40,6 +40,7 @@ #include "gpmc.h" #include "gpmc-nand.h" #include "gpmc-onenand.h" +#include "gpmc-smsc911x.h" #define DEVICE_NAME "omap-gpmc" @@ -1320,6 +1321,14 @@ static int gpmc_probe_dt(struct platform_device *pdev) return ret; } } + + for_each_node_by_name(child, "gpmc_smsc911x") { + ret = gpmc_smsc911x_init_dt(child); + if (ret < 0) { + of_node_put(child); + return ret; + } + } return 0; } #else