From patchwork Tue Jul 12 11:26:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 104345 X-Patchwork-Delegate: sr@denx.de 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 30345B6F74 for ; Tue, 12 Jul 2011 21:27:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 231ED2807F; Tue, 12 Jul 2011 13:27:01 +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 7OTt8uDriByP; Tue, 12 Jul 2011 13:27:00 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3A16A28083; Tue, 12 Jul 2011 13:26:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B51DD28083 for ; Tue, 12 Jul 2011 13:26:57 +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 wM3mEFnv9NNQ for ; Tue, 12 Jul 2011 13:26:56 +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 mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.181]) by theia.denx.de (Postfix) with ESMTPS id 804712807F for ; Tue, 12 Jul 2011 13:26:55 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGoheedClaTaNdBkW0QEactrHijJzVWH2B/gVeQ= X-RZG-CLASS-ID: mo05 Received: from kubuntu.fritz.box (pD9FF9661.dip.t-dialin.net [217.255.150.97]) by smtp.strato.de (fruni mo53) (RZmta 26.0) with ESMTPA id 2058edn6CAM45s for ; Tue, 12 Jul 2011 13:26:51 +0200 (MEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Tue, 12 Jul 2011 13:26:47 +0200 Message-Id: <1310470007-6213-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.7.6 Subject: [U-Boot] [PATCH] net/4xx: Install interrupt handler after driver registration 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 Only install der 4xx-EMAC interrupt handlers *after* the core network driver is registered. This problem was noticed on the APM Taishan 440GX board, where the board hung upon bootup after displaying "Net:". Signed-off-by: Stefan Roese --- drivers/net/4xx_enet.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c index b1763b1..f328574 100644 --- a/drivers/net/4xx_enet.c +++ b/drivers/net/4xx_enet.c @@ -2035,6 +2035,13 @@ int ppc_4xx_eth_initialize (bd_t * bis) dev->send = ppc_4xx_eth_send; dev->recv = ppc_4xx_eth_rx; + eth_register(dev); + +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) + miiphy_register(dev->name, + emac4xx_miiphy_read, emac4xx_miiphy_write); +#endif + if (0 == virgin) { /* set the MAL IER ??? names may change with new spec ??? */ #if defined(CONFIG_440SPE) || \ @@ -2072,13 +2079,6 @@ int ppc_4xx_eth_initialize (bd_t * bis) dev); virgin = 1; } - - eth_register (dev); - -#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) - miiphy_register (dev->name, - emac4xx_miiphy_read, emac4xx_miiphy_write); -#endif } /* end for each supported device */ return 0;