From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] PPC: Drop mv6446x_eth_initialize() from net/eth.c
Date: Sat, 3 Mar 2012 09:39:32 +0100 [thread overview]
Message-ID: <1330763972-28106-2-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1330763972-28106-1-git-send-email-marex@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 <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
board/Marvell/db64460/db64460.c | 6 +++++-
board/Marvell/db64460/eth.h | 2 ++
board/prodrive/p3mx/eth.h | 1 +
board/prodrive/p3mx/p3mx.c | 5 +++++
net/eth.c | 5 -----
5 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/board/Marvell/db64460/db64460.c b/board/Marvell/db64460/db64460.c
index a7836ed..d4f58b3 100644
--- a/board/Marvell/db64460/db64460.c
+++ b/board/Marvell/db64460/db64460.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 = mv6446x_eth_initialize(bis);
+ return ret;
}
diff --git a/board/Marvell/db64460/eth.h b/board/Marvell/db64460/eth.h
index 6c3b2e0..59cfd6f 100644
--- a/board/Marvell/db64460/eth.h
+++ b/board/Marvell/db64460/eth.h
@@ -38,4 +38,6 @@ int db64460_eth0_transmit(unsigned int s, volatile char *p);
void db64460_eth0_disable(void);
bool network_start(bd_t *bis);
+int mv6446x_eth_initialize(bd_t *);
+
#endif /* __EVB64460_ETH_H__ */
diff --git a/board/prodrive/p3mx/eth.h b/board/prodrive/p3mx/eth.h
index aab32d2..44ffba8 100644
--- a/board/prodrive/p3mx/eth.h
+++ b/board/prodrive/p3mx/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 mv6446x_eth_initialize(bd_t *);
#endif /* __EVB64360_ETH_H__ */
diff --git a/board/prodrive/p3mx/p3mx.c b/board/prodrive/p3mx/p3mx.c
index 09e4f82..389affc 100644
--- a/board/prodrive/p3mx/p3mx.c
+++ b/board/prodrive/p3mx/p3mx.c
@@ -851,3 +851,8 @@ void my_remap_gt_regs_bootm (u32 cur_loc, u32 new_loc)
!= temp);
}
+
+int board_eth_init(bd_t *bis)
+{
+ return mv6446x_eth_initialize(bis);
+}
diff --git a/net/eth.c b/net/eth.c
index 225b03f..801cc5f 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -81,8 +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 mv6446x_eth_initialize(bd_t *);
-
#ifdef CONFIG_API
extern void (*push_packet)(volatile void *, int);
@@ -251,9 +249,6 @@ int eth_initialize(bd_t *bis)
} else
printf("Net Initialization Skipped\n");
-#if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
- mv6446x_eth_initialize(bis);
-#endif
if (!eth_devices) {
puts ("No ethernet found.\n");
show_boot_progress (-64);
--
1.7.9
next prev parent reply other threads:[~2012-03-03 8:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-03 8:39 [U-Boot] [PATCH 1/2] PPC: Drop mv6436x_eth_initialize() from net/eth.c Marek Vasut
2012-03-03 8:39 ` Marek Vasut [this message]
2012-03-06 20:13 ` [U-Boot] [PATCH 2/2] PPC: Drop mv6446x_eth_initialize() " Wolfgang Denk
2012-03-06 20:13 ` [U-Boot] [PATCH 1/2] PPC: Drop mv6436x_eth_initialize() " Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330763972-28106-2-git-send-email-marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox