From patchwork Thu May 2 18:25:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 2513461 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 3C7CBDF215 for ; Thu, 2 May 2013 18:27:59 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UXyDS-0003RJ-Ou; Thu, 02 May 2013 18:26:52 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UXyD3-0007SF-Sc; Thu, 02 May 2013 18:26:25 +0000 Received: from mail-bk0-x233.google.com ([2a00:1450:4008:c01::233]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UXyCz-0007QF-9H for linux-arm-kernel@lists.infradead.org; Thu, 02 May 2013 18:26:22 +0000 Received: by mail-bk0-f51.google.com with SMTP id ji2so399081bkc.10 for ; Thu, 02 May 2013 11:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=60D0t9N9Jo2ebY5HhrMVspuHfnFow+eaqzj6rHRg6Xw=; b=GZdVi3HVfq3dHkxwc+KPdmrHy5wGtSDD67ebH+az0aDPfUNZu07wKkb2jHjvy4/JPj 8t67YOjRqG1PF+66PMHslZpDNdLRk0e1GLxOYOeDRxdIZtze0/YKB6M+TmpogTkHqIid fTp/MNir7yx7q3PEXYMgjcBUBCyGblP5awYS5M9lPsEKl5PeOYgX1LGhcqUhE41N4upA 9BQa6p0ZLyHFtHMxaJnUcZyowEpdsPbydB6DV18bH/1pD9lPYT14u8vHobOAc4SLRPSG nquUVVwtZGVjlhn6uQItNjyqTA5ilUmVsBa2AgoA74YwOaKWrmrTpefxqOi0MMpNl7gj vlUw== X-Received: by 10.204.166.11 with SMTP id k11mr1484960bky.6.1367519159290; Thu, 02 May 2013 11:25:59 -0700 (PDT) Received: from topkick.lan (dslc-082-083-251-181.pools.arcor-ip.net. [82.83.251.181]) by mx.google.com with ESMTPSA id jz9sm1680401bkb.1.2013.05.02.11.25.57 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 11:25:58 -0700 (PDT) Received: from picnic.unix.mst.uni-hannover.de (phire.mst.uni-hannover.de [130.75.30.51]) by topkick.lan (Postfix) with ESMTPSA id 3476E605BE; Thu, 2 May 2013 20:25:32 +0200 (CEST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH 1/3] ARM: dove: add DT parsing for legacy mv643xx_eth Date: Thu, 2 May 2013 20:25:38 +0200 Message-Id: <1367519140-19716-2-git-send-email-sebastian.hesselbarth@gmail.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1367519140-19716-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1367519140-19716-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130502_142621_526131_638E5688 X-CRM114-Status: GOOD ( 20.09 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sebastian.hesselbarth[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Thomas Petazzoni , Andrew Lunn , Russell King , Jason Cooper , Arnd Bergmann , Jean-Francois Moine , devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Gregory Clement , Rob Landley , Grant Likely , Thomas Gleixner , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org To allow to move to orion irqchip driver, existing legacy devices have to map their irqs. This patch adds a node for mv643xx_eth and some init code to map the corresponding irqs. While the device tree node can stay, the init code will vanish as soon as there is true device tree support for mv643xx_eth. Signed-off-by: Sebastian Hesselbarth --- Cc: Grant Likely Cc: Rob Herring Cc: Rob Landley Cc: Thomas Gleixner Cc: Russell King Cc: Arnd Bergmann Cc: Jason Cooper Cc: Andrew Lunn Cc: Thomas Petazzoni Cc: Gregory Clement Cc: Ezequiel Garcia Cc: Jean-Francois Moine Cc: devicetree-discuss@lists.ozlabs.org Cc: linux-doc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/boot/dts/dove.dtsi | 7 +++++++ arch/arm/mach-dove/board-dt.c | 31 ++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index f7509ca..ea7c5da 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi @@ -197,6 +197,13 @@ status = "disabled"; }; + gbe: ethernet-controller { + compatible = "marvell,mv643xx-eth-block"; + reg = <0x72000 0x4000>; + interrupts = <29>, <30>; + status = "disabled"; + }; + rtc@d8500 { compatible = "marvell,orion-rtc"; reg = <0xd8500 0x20>; diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c index fbde1dd..9df6dd7 100644 --- a/arch/arm/mach-dove/board-dt.c +++ b/arch/arm/mach-dove/board-dt.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -57,6 +58,34 @@ static struct mv643xx_eth_platform_data dove_dt_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, }; +#define DOVE_GE00_PHYS_BASE 0xf1070000 + +static void __init dove_legacy_ge00_init(void) +{ + struct device_node *np = of_find_compatible_node(NULL, NULL, + "marvell,mv643xx-eth-block"); + int irq_sum, irq_err; + + if (!np) + return; + + irq_sum = irq_of_parse_and_map(np, 0); + if (!irq_sum) { + pr_err("%s: missing sum irq\n", np->full_name); + return; + } + + irq_err = irq_of_parse_and_map(np, 1); + if (!irq_err) { + pr_err("%s: missing err irq\n", np->full_name); + return; + } + + /* legacy ge00_init wants phys base */ + orion_ge00_init(&dove_dt_ge00_data, DOVE_GE00_PHYS_BASE, + irq_sum, irq_err, 1600); +} + static void __init dove_dt_init(void) { pr_info("Dove 88AP510 SoC\n"); @@ -70,7 +99,7 @@ static void __init dove_dt_init(void) dove_of_clk_init(); /* Internal devices not ported to DT yet */ - dove_ge00_init(&dove_dt_ge00_data); + dove_legacy_ge00_init(); dove_pcie_init(1, 1); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);