Skip to contentSkip to conversation

mgcoge make ether_scc.c work with CONFIG_NET_MULTI

PATCH New Gary Jennejohn 2 participants 2 messages Nov 20, 2008 – Nov 25, 2008

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 mgcoge make ether_scc.c work with CONFIG_NET_MULTI

This change is needed for mgcoge because it uses two ethernet drivers.

Add a check for the presence of the PIGGY board on mgcoge. Without this board networking cannot work and the initialization must be aborted.

Only allocate rtx once to prevent DPRAM exhaustion.

Initialize ether_scc.c and the keymile-specific HDLC driver (to be added soon) in eth.c.

---

v3
-
Rebased to HEAD ac524c0a0b130fd942e1c632719bd7d631cdb057 Remove call to ethernet_present() in sec_init() because it is now handled in board_eth_init()

 cpu/mpc8260/Makefile    |    8 +++++-
 cpu/mpc8260/cpu.c       |    3 ++
 cpu/mpc8260/ether_scc.c |   50 +++++++++++++++++++++++++++++++++++++---------
 include/netdev.h        |    1 +
 4 files changed, 50 insertions(+), 12 deletions(-)
cpu/mpc8260/Makefile +6 -2
index 80d7852..9f0c2dd 100644
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000-2006
+# (C) Copyright 2000-2008
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -27,9 +27,13 @@ LIB	= $(obj)lib$(CPU).a
 
 START	= start.o kgdb.o
 COBJS	= traps.o serial_smc.o serial_scc.o cpu.o cpu_init.o speed.o \
-	  interrupts.o ether_scc.o ether_fcc.o i2c.o commproc.o \
+	  interrupts.o ether_fcc.o i2c.o commproc.o \
 	  bedbug_603e.o pci.o spi.o
 
+COBJS-$(CONFIG_ETHER_ON_SCC) = ether_scc.o
+
+COBJS	+= $(COBJS-y)
+
 SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
 START	:= $(addprefix $(obj),$(START))
cpu/mpc8260/cpu.c +3 -0
index b9e748a..f4beca5 100644
@@ -326,5 +326,8 @@ int cpu_eth_init(bd_t *bis)
 #if defined(CONFIG_ETHER_ON_FCC)
 	fec_initialize(bis);
 #endif
+#if defined(CONFIG_ETHER_ON_SCC)
+	mpc82xx_scc_enet_initialize(bd);
+#endif
 	return 0;
 }
cpu/mpc8260/ether_scc.c +40 -10

105 lines not on this page · raw message

include/netdev.h +1 -0
index 751f0da..a1e79ae 100644
@@ -57,6 +57,7 @@ int mcffec_initialize(bd_t *bis);
 int mpc512x_fec_initialize(bd_t *bis);
 int mpc5xxx_fec_initialize(bd_t *bis);
 int mpc8220_fec_initialize(bd_t *bis);
+int mpc82xx_scc_enet_initialize(bd_t *bis);
 int natsemi_initialize(bd_t *bis);
 int npe_initialize(bd_t *bis);
 int ns8382x_initialize(bd_t *bis);
Signature · 9 lines
1.5.4.3

---
Gary Jennejohn
*********************************************************************
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
*********************************************************************
#1 lore raw

PATCH v3 1/1 mgcoge make ether_scc.c work with CONFIG_NET_MULTI

Hi Gary,

Quoted 5 lines · Gary Jennejohn

This change is needed for mgcoge because it uses two ethernet drivers.

Add a check for the presence of the PIGGY board on mgcoge. Without this board networking cannot work and the initialization must be aborted.

Quoted 8 lines

Only allocate rtx once to prevent DPRAM exhaustion.

Initialize ether_scc.c and the keymile-specific HDLC driver (to be added soon) in eth.c.

---

Added to net/next.

thanks,
Ben