From patchwork Fri Oct 14 04:03:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumar Gala X-Patchwork-Id: 119690 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 86AC7B6F80 for ; Fri, 14 Oct 2011 15:03:51 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 58F4A28A66; Fri, 14 Oct 2011 06:03:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ykGrutHbuJ22; Fri, 14 Oct 2011 06:03:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 48C5628A58; Fri, 14 Oct 2011 06:03:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6F73628A58 for ; Fri, 14 Oct 2011 06:03:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KIzFgZQfYJDv for ; Fri, 14 Oct 2011 06:03:40 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by theia.denx.de (Postfix) with ESMTPS id 2A06D28A56 for ; Fri, 14 Oct 2011 06:03:38 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id p9E43ZQt031115 for ; Thu, 13 Oct 2011 23:03:36 -0500 From: Kumar Gala To: u-boot@lists.denx.de Date: Thu, 13 Oct 2011 23:03:35 -0500 Message-Id: <1318565015-2292-1-git-send-email-galak@kernel.crashing.org> X-Mailer: git-send-email 1.5.6.5 Subject: [U-Boot] [PATCH] fm-eth: Don't mark the MAC we use for MDIO as disabled in device tree X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de FM1-DTSEC1's MAC was being marked as disabled if the port was not configured based on the SoC configuration. However we utilize the MAC interface for MDIO and thus should NOT mark it disabled. Signed-off-by: Kumar Gala --- drivers/net/fm/init.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c index 512d7dd..953c359 100644 --- a/drivers/net/fm/init.c +++ b/drivers/net/fm/init.c @@ -183,6 +183,8 @@ static void ft_fixup_port(void *blob, struct fm_eth_info *info, char *prop) { int off, ph; phys_addr_t paddr = CONFIG_SYS_CCSRBAR_PHYS + info->compat_offset; + u64 dtsec1_addr = (u64)CONFIG_SYS_CCSRBAR_PHYS + + CONFIG_SYS_FSL_FM1_DTSEC1_OFFSET; off = fdt_node_offset_by_compat_reg(blob, prop, paddr); @@ -195,9 +197,13 @@ static void ft_fixup_port(void *blob, struct fm_eth_info *info, char *prop) /* board code might have caused offset to change */ off = fdt_node_offset_by_compat_reg(blob, prop, paddr); - /* disable both the mac node and the node that has a handle to it */ - fdt_setprop_string(blob, off, "status", "disabled"); + /* Don't disable FM1-DTSEC1 MAC as its used for MDIO */ + if (paddr != dtsec1_addr) { + /* disable the mac node */ + fdt_setprop_string(blob, off, "status", "disabled"); + } + /* disable the node point to the mac */ ph = fdt_get_phandle(blob, off); do_fixup_by_prop(blob, "fsl,fman-mac", &ph, sizeof(ph), "status", "disabled", strlen("disabled") + 1, 1);