public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 3/3] Moved initialization of SKGE Ethernet driver to board code.
Date: Sat, 12 Jul 2008 00:47:53 -0700	[thread overview]
Message-ID: <1215848873-910-4-git-send-email-biggerbadderben@gmail.com> (raw)
In-Reply-To: <1215848873-910-3-git-send-email-biggerbadderben@gmail.com>

The only board using this driver is the SL8245 board.
Removed initialization for the driver from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
---
 board/sl8245/sl8245.c           |   13 +++++++++++++
 drivers/net/sk98lin/uboot_drv.c |    2 +-
 net/eth.c                       |    4 ----
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/board/sl8245/sl8245.c b/board/sl8245/sl8245.c
index 8647887..c853755 100644
--- a/board/sl8245/sl8245.c
+++ b/board/sl8245/sl8245.c
@@ -66,3 +66,16 @@ void pci_init_board(void)
 {
 	pci_mpc824x_init(&hose);
 }
+
+extern int skge_initialize(bd_t *bis);
+
+int board_eth_init(bd_t *bis)
+{
+	int rc = 0;
+
+#if defined(CONFIG_SK98)
+	rc = skge_initialize(bis);
+#endif
+	return rc;
+}
+
diff --git a/drivers/net/sk98lin/uboot_drv.c b/drivers/net/sk98lin/uboot_drv.c
index 8b04842..205e7d2 100644
--- a/drivers/net/sk98lin/uboot_drv.c
+++ b/drivers/net/sk98lin/uboot_drv.c
@@ -70,7 +70,7 @@ int skge_initialize(bd_t * bis)
 		eth_register(dev[i]);
 	}
 
-	return numdev;
+	return ((numdev > 0) && (numdev <= SKGE_MAX_CARDS) ? 0 : -1);
 }
 
 
diff --git a/net/eth.c b/net/eth.c
index eaa58fa..9ab206d 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -63,7 +63,6 @@ extern int ppc_4xx_eth_initialize(bd_t *);
 extern int rtl8139_initialize(bd_t*);
 extern int rtl8169_initialize(bd_t*);
 extern int scc_initialize(bd_t*);
-extern int skge_initialize(bd_t*);
 extern int tsi108_eth_initialize(bd_t*);
 extern int npe_initialize(bd_t *);
 extern int uec_initialize(int);
@@ -200,9 +199,6 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_MPC8220_FEC)
 	mpc8220_fec_initialize(bis);
 #endif
-#if defined(CONFIG_SK98)
-	skge_initialize(bis);
-#endif
 #if defined(CONFIG_UEC_ETH1)
 	uec_initialize(0);
 #endif
-- 
1.5.4.3

      reply	other threads:[~2008-07-12  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-12  7:47 [U-Boot-Users] [PATCH 0/3] More net/eth.c cleanup Ben Warren
2008-07-12  7:47 ` [U-Boot-Users] [PATCH 1/3] Moved initialization of Blackfin EMAC Ethernet controller to board_eth_init() Ben Warren
2008-07-12  7:47   ` [U-Boot-Users] [PATCH 2/3] Moved initialization of ULI526X Ethernet driver to board code Ben Warren
2008-07-12  7:47     ` Ben Warren [this message]

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=1215848873-910-4-git-send-email-biggerbadderben@gmail.com \
    --to=biggerbadderben@gmail.com \
    --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