From patchwork Sat Mar 3 08:39:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 144412 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 6B92FB6EEC for ; Sat, 3 Mar 2012 19:39:55 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 29AA328080; Sat, 3 Mar 2012 09:39:49 +0100 (CET) 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 osrDrb2f3VQw; Sat, 3 Mar 2012 09:39:48 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5005728081; Sat, 3 Mar 2012 09:39:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1A9F228081 for ; Sat, 3 Mar 2012 09:39:43 +0100 (CET) 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 LKc2fXzx0KSG for ; Sat, 3 Mar 2012 09:39:42 +0100 (CET) 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 mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by theia.denx.de (Postfix) with ESMTPS id 8984E28080 for ; Sat, 3 Mar 2012 09:39:41 +0100 (CET) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3V0LR05dbhz4Kh25; Sat, 3 Mar 2012 09:39:40 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 3V0LR05ST6z4KK6H; Sat, 3 Mar 2012 09:39:40 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from smtp-auth.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id V264PCEZaEnv; Sat, 3 Mar 2012 09:39:40 +0100 (CET) X-Auth-Info: fUZdMse5VtCVHAhEXAYc8x0S9h9NY/rm145L3xNzps0= Received: from mashiro.lan (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA; Sat, 3 Mar 2012 09:39:38 +0100 (CET) From: Marek Vasut To: u-boot@lists.denx.de Date: Sat, 3 Mar 2012 09:39:31 +0100 Message-Id: <1330763972-28106-1-git-send-email-marex@denx.de> X-Mailer: git-send-email 1.7.9 Cc: Marek Vasut , Reinhard Arlt Subject: [U-Boot] [PATCH 1/2] PPC: Drop mv6436x_eth_initialize() from net/eth.c X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 This function was defined as an extern in net/eth.c, drop that and use standard means of calling it. Signed-off-by: Marek Vasut Cc: Reinhard Arlt --- board/Marvell/db64360/db64360.c | 6 +++++- board/Marvell/db64360/eth.h | 1 + board/esd/cpci750/cpci750.c | 5 +++++ board/esd/cpci750/eth.h | 1 + net/eth.c | 4 ---- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/board/Marvell/db64360/db64360.c b/board/Marvell/db64360/db64360.c index 5183466..6cae686 100644 --- a/board/Marvell/db64360/db64360.c +++ b/board/Marvell/db64360/db64360.c @@ -934,5 +934,9 @@ void board_prebootm_init () int board_eth_init(bd_t *bis) { - return pci_eth_init(bis); + int ret; + ret = pci_eth_init(bis); + if (!ret) + ret = mv6436x_eth_initialize(bis); + return ret; } diff --git a/board/Marvell/db64360/eth.h b/board/Marvell/db64360/eth.h index aab32d2..6fbfdfe 100644 --- a/board/Marvell/db64360/eth.h +++ b/board/Marvell/db64360/eth.h @@ -39,5 +39,6 @@ int db64360_eth0_transmit(unsigned int s, volatile char *p); void db64360_eth0_disable(void); bool network_start(bd_t *bis); +int mv6436x_eth_initialize(bd_t *); #endif /* __EVB64360_ETH_H__ */ diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c index 08311c9..98051fb 100644 --- a/board/esd/cpci750/cpci750.c +++ b/board/esd/cpci750/cpci750.c @@ -1101,3 +1101,8 @@ U_BOOT_CMD( pldver, 1, 1, do_pldver, "Show PLD version", "Show PLD version)"); + +int board_eth_init(bd_t *bis) +{ + return mv6436x_eth_initialize(bis); +} diff --git a/board/esd/cpci750/eth.h b/board/esd/cpci750/eth.h index aab32d2..6fbfdfe 100644 --- a/board/esd/cpci750/eth.h +++ b/board/esd/cpci750/eth.h @@ -39,5 +39,6 @@ int db64360_eth0_transmit(unsigned int s, volatile char *p); void db64360_eth0_disable(void); bool network_start(bd_t *bis); +int mv6436x_eth_initialize(bd_t *); #endif /* __EVB64360_ETH_H__ */ diff --git a/net/eth.c b/net/eth.c index b4b9b43..225b03f 100644 --- a/net/eth.c +++ b/net/eth.c @@ -81,7 +81,6 @@ static int __def_eth_init(bd_t *bis) int cpu_eth_init(bd_t *bis) __attribute__((weak, alias("__def_eth_init"))); int board_eth_init(bd_t *bis) __attribute__((weak, alias("__def_eth_init"))); -extern int mv6436x_eth_initialize(bd_t *); extern int mv6446x_eth_initialize(bd_t *); #ifdef CONFIG_API @@ -252,9 +251,6 @@ int eth_initialize(bd_t *bis) } else printf("Net Initialization Skipped\n"); -#if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750) - mv6436x_eth_initialize(bis); -#endif #if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx) mv6446x_eth_initialize(bis); #endif