Patchwork [U-Boot,2/6] microblaze: Enable several ethernet driver compilation

login
register
mail settings
Submitter Stephan Linz
Date Jan. 21, 2012, 9:02 p.m.
Message ID <1327179778-25693-2-git-send-email-linz@li-pro.net>
Download mbox | patch
Permalink /patch/137205/
State Changes Requested
Delegated to: Michal Simek
Headers show

Comments

Stephan Linz - Jan. 21, 2012, 9:02 p.m.
NET_MULTI enables to use several ethernet drivers but
microblaze-generic platform config file select only
one driver.

Reported-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 include/configs/microblaze-generic.h |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
Mike Frysinger - Jan. 27, 2012, 3:58 a.m.
On Saturday 21 January 2012 16:02:54 Stephan Linz wrote:
> NET_MULTI enables to use several ethernet drivers but
> microblaze-generic platform config file select only
> one driver.

NET_MULTI no longer exists because the code is always enabled now :)

>  #define	CONFIG_ETHADDR		00:E0:0C:00:00:FD
> +#define	CONFIG_ETH1ADDR		00:E0:0C:00:00:FC

err, i think these need to get dropped.  boards should not be hardcoding mac 
addresses in their configs.
-mike
Stephan Linz - Jan. 28, 2012, 8:55 a.m.
Hi Mike,

Am Donnerstag, den 26.01.2012, 22:58 -0500 schrieb Mike Frysinger: 
> On Saturday 21 January 2012 16:02:54 Stephan Linz wrote:
> > NET_MULTI enables to use several ethernet drivers but
> > microblaze-generic platform config file select only
> > one driver.
> 
> NET_MULTI no longer exists because the code is always enabled now :)

right, that is not defined anywhere -- the comment means that we will
use the multipple network interface support from U-Boot. I can write a
more precise comment ...


> 
> >  #define	CONFIG_ETHADDR		00:E0:0C:00:00:FD
> > +#define	CONFIG_ETH1ADDR		00:E0:0C:00:00:FC
> 
> err, i think these need to get dropped.  boards should not be hardcoding mac 
> addresses in their configs.

OK, I think so too. I can left at least one MAC address as it was in the
original board configuration. I think we need this for a rapid system
startup without a default configuration in ROM. IMHO there are many many
boards that are going this way ...
Mike Frysinger - Jan. 28, 2012, 9:06 p.m.
On Saturday 28 January 2012 03:55:47 Stephan Linz wrote:
> Am Donnerstag, den 26.01.2012, 22:58 -0500 schrieb Mike Frysinger:
> > On Saturday 21 January 2012 16:02:54 Stephan Linz wrote:
> > >  #define	CONFIG_ETHADDR		00:E0:0C:00:00:FD
> > > +#define	CONFIG_ETH1ADDR		00:E0:0C:00:00:FC
> > 
> > err, i think these need to get dropped.  boards should not be hardcoding
> > mac addresses in their configs.
> 
> OK, I think so too. I can left at least one MAC address as it was in the
> original board configuration. I think we need this for a rapid system
> startup without a default configuration in ROM. IMHO there are many many
> boards that are going this way ...

hardcoding mac addrs have been NAK-ed in the past by Wolfgang every time and i 
don't think it's changing
-mike
Wolfgang Denk - Jan. 28, 2012, 11:27 p.m.
Dear Stephan Linz,

In message <1327740947.3638.16.camel@keto> you wrote:
> 
> > >  #define	CONFIG_ETHADDR		00:E0:0C:00:00:FD
> > > +#define	CONFIG_ETH1ADDR		00:E0:0C:00:00:FC
> > 
> > err, i think these need to get dropped.  boards should not be hardcoding mac 
> > addresses in their configs.
> 
> OK, I think so too. I can left at least one MAC address as it was in the
> original board configuration. I think we need this for a rapid system
> startup without a default configuration in ROM. IMHO there are many many
> boards that are going this way ...

Please drop it.  As Mike pointed out, it is not acceptable for
mainline code.

Best regards,

Wolfgang Denk

Patch

diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 03a6f5a..29a86d1 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -65,11 +65,12 @@ 
 
 /* ethernet */
 #undef CONFIG_SYS_ENET
-#ifdef XILINX_EMACLITE_BASEADDR
-# define CONFIG_XILINX_EMACLITE		1
+#if defined(XILINX_EMACLITE_BASEADDR)
+# define CONFIG_XILINX_EMACLITE	1
 # define CONFIG_SYS_ENET
-#elif XILINX_LLTEMAC_BASEADDR
-# define CONFIG_XILINX_LL_TEMAC		1
+#endif
+#if defined(XILINX_LLTEMAC_BASEADDR) || defined(XILINX_LLTEMAC_BASEADDR1)
+# define CONFIG_XILINX_LL_TEMAC	1
 # define CONFIG_SYS_ENET
 #endif
 #if defined(XILINX_AXIEMAC_BASEADDR)
@@ -312,6 +313,7 @@ 
 #define	CONFIG_SERVERIP		192.168.0.5
 #define	CONFIG_GATEWAYIP	192.168.0.1
 #define	CONFIG_ETHADDR		00:E0:0C:00:00:FD
+#define	CONFIG_ETH1ADDR		00:E0:0C:00:00:FC
 
 /* architecture dependent code */
 #define	CONFIG_SYS_USR_EXCEP	/* user exception */