public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH 0/1] Moved initialization of GRETH Ethernet driver to CPU directory
@ 2008-07-09  8:14 Ben Warren
  2008-07-09  8:14 ` [U-Boot-Users] [PATCH 1/1] " Ben Warren
  2008-07-09 12:03 ` [U-Boot-Users] [PATCH 0/1] " Daniel Hellstrom
  0 siblings, 2 replies; 4+ messages in thread
From: Ben Warren @ 2008-07-09  8:14 UTC (permalink / raw)
  To: u-boot

Hello,

More cleanup of net/eth.c, this time taking care of LEON2/LEON3 boards.

Lacking a compiler and target, I can't really test this so hopefully somebody can and will report back.

This patch is being staged in the 'testing' branch of the net repo.

regards,
Ben

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH 1/1] Moved initialization of GRETH Ethernet driver to CPU directory
  2008-07-09  8:14 [U-Boot-Users] [PATCH 0/1] Moved initialization of GRETH Ethernet driver to CPU directory Ben Warren
@ 2008-07-09  8:14 ` Ben Warren
  2008-07-09 12:03 ` [U-Boot-Users] [PATCH 0/1] " Daniel Hellstrom
  1 sibling, 0 replies; 4+ messages in thread
From: Ben Warren @ 2008-07-09  8:14 UTC (permalink / raw)
  To: u-boot

Added a cpu_eth_init() function to leon2/leon3 CPU directories and
removed code from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
---
 cpu/leon2/cpu.c     |    9 +++++++++
 cpu/leon3/cpu.c     |    8 ++++++++
 drivers/net/greth.c |    2 +-
 net/eth.c           |    4 ----
 4 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/cpu/leon2/cpu.c b/cpu/leon2/cpu.c
index 1c1e24b..5de1c52 100644
--- a/cpu/leon2/cpu.c
+++ b/cpu/leon2/cpu.c
@@ -56,3 +56,12 @@ int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 }
 
 /* ------------------------------------------------------------------------- */
+
+extern int greth_initialize(bd_t *bis);
+
+#ifdef CONFIG_GRETH
+int cpu_eth_init(bd_t *bis)
+{
+	return greth_initialize(bis);
+}
+#endif
diff --git a/cpu/leon3/cpu.c b/cpu/leon3/cpu.c
index 306a210..1725fdb 100644
--- a/cpu/leon3/cpu.c
+++ b/cpu/leon3/cpu.c
@@ -65,3 +65,11 @@ u64 flash_read64(void *addr)
 }
 
 /* ------------------------------------------------------------------------- */
+extern int greth_initialize(bd_t *bis);
+
+#ifdef CONFIG_GRETH
+int cpu_eth_init(bd_t *bis)
+{
+	return greth_initialize(bis);
+}
+#endif
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 76ece59..90c5338 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -657,5 +657,5 @@ int greth_initialize(bd_t * bis)
 	/* set and remember MAC address */
 	greth_set_hwaddr(greth, addr);
 
-	return 1;
+	return 0;
 }
diff --git a/net/eth.c b/net/eth.c
index 132efce..3c152bf 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -69,7 +69,6 @@ extern int uli526x_initialize(bd_t *);
 extern int npe_initialize(bd_t *);
 extern int uec_initialize(int);
 extern int bfin_EMAC_initialize(bd_t *);
-extern int greth_initialize(bd_t *);
 extern int at91sam9_eth_initialize(bd_t *);
 
 #ifdef CONFIG_API
@@ -267,9 +266,6 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_BF537)
 	bfin_EMAC_initialize(bis);
 #endif
-#if defined(CONFIG_GRETH)
-	greth_initialize(bis);
-#endif
 #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
     defined(CONFIG_AT91SAM9263)
 	at91sam9_eth_initialize(bis);
-- 
1.5.4.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH 0/1] Moved initialization of GRETH Ethernet driver to CPU directory
  2008-07-09  8:14 [U-Boot-Users] [PATCH 0/1] Moved initialization of GRETH Ethernet driver to CPU directory Ben Warren
  2008-07-09  8:14 ` [U-Boot-Users] [PATCH 1/1] " Ben Warren
@ 2008-07-09 12:03 ` Daniel Hellstrom
  2008-07-09 14:55   ` Ben Warren
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Hellstrom @ 2008-07-09 12:03 UTC (permalink / raw)
  To: u-boot

Hello Ben,

I have tried the testing branch of the net repo 
(99b85ffa8ef0b07904be1db335825d4d83424eaa) on a GR-XC3S-1500 LEON3 board 
successfully.

LEON2 U-Boot support is limited to the LEON2 simmulator TSIM, TSIM-LEON2 
does not support the GRETH so at this stage it is not neccessary for 
LEON2 to check CONFIG_GRETH. However, it might be useful later on.

Regards,
Daniel


Ben Warren wrote:

>Hello,
>
>More cleanup of net/eth.c, this time taking care of LEON2/LEON3 boards.
>
>Lacking a compiler and target, I can't really test this so hopefully somebody can and will report back.
>
>This patch is being staged in the 'testing' branch of the net repo.
>
>regards,
>Ben
>
>
>  
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH 0/1] Moved initialization of GRETH Ethernet driver to CPU directory
  2008-07-09 12:03 ` [U-Boot-Users] [PATCH 0/1] " Daniel Hellstrom
@ 2008-07-09 14:55   ` Ben Warren
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Warren @ 2008-07-09 14:55 UTC (permalink / raw)
  To: u-boot

F

On Wed, Jul 9, 2008 at 5:03 AM, Daniel Hellstrom <daniel@gaisler.com> wrote:
> Hello Ben,
>
> I have tried the testing branch of the net repo
> (99b85ffa8ef0b07904be1db335825d4d83424eaa) on a GR-XC3S-1500 LEON3 board
> successfully.
>
> LEON2 U-Boot support is limited to the LEON2 simmulator TSIM, TSIM-LEON2
> does not support the GRETH so at this stage it is not neccessary for LEON2
> to check CONFIG_GRETH. However, it might be useful later on.
>

Thanks a lot for testing this so quickly!

regards,
Ben

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-09 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-09  8:14 [U-Boot-Users] [PATCH 0/1] Moved initialization of GRETH Ethernet driver to CPU directory Ben Warren
2008-07-09  8:14 ` [U-Boot-Users] [PATCH 1/1] " Ben Warren
2008-07-09 12:03 ` [U-Boot-Users] [PATCH 0/1] " Daniel Hellstrom
2008-07-09 14:55   ` Ben Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox