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

login
register
mail settings
Submitter Stephan Linz
Date Jan. 29, 2012, 3:54 p.m.
Message ID <00eaabafa2b64a5d5857067588261f35e5581274.1327848193.git.linz@li-pro.net>
Download mbox | patch
Permalink /patch/138447/
State Changes Requested
Delegated to: Michal Simek
Headers show

Comments

Stephan Linz - Jan. 29, 2012, 3:54 p.m.
U-Boot's multipple network supports 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 |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
Michal Simek - Jan. 31, 2012, 9 a.m.
Stephan Linz wrote:
> U-Boot's multipple network supports 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 |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
> index 03a6f5a..09ac870 100644
> --- a/include/configs/microblaze-generic.h
> +++ b/include/configs/microblaze-generic.h
> @@ -65,11 +65,15 @@
>  
>  /* 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) || \
> +    defined(XILINX_LLTEMAC_BASEADDR2) || defined(XILINX_LLTEMAC_BASEADDR3) || \
> +    defined(XILINX_LLTEMAC_BASEADDR4) || defined(XILINX_LLTEMAC_BASEADDR5) || \
> +    defined(XILINX_LLTEMAC_BASEADDR6) || defined(XILINX_LLTEMAC_BASEADDR7)
> +# define CONFIG_XILINX_LL_TEMAC	1

Why to do it in this way? I believe that the first lltemac driver will have XILINX_LLTEMAC_BASEADDR
and then others. But for all configurations if there is lltemac driver then will have anyone just BASEADDR.

Michal
Stephan Linz - Jan. 31, 2012, 7:05 p.m.
Am Dienstag, den 31.01.2012, 10:00 +0100 schrieb Michal Simek: 
> Stephan Linz wrote:
> > U-Boot's multipple network supports 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 |   12 ++++++++----
> >  1 files changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
> > index 03a6f5a..09ac870 100644
> > --- a/include/configs/microblaze-generic.h
> > +++ b/include/configs/microblaze-generic.h
> > @@ -65,11 +65,15 @@
> >  
> >  /* 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) || \
> > +    defined(XILINX_LLTEMAC_BASEADDR2) || defined(XILINX_LLTEMAC_BASEADDR3) || \
> > +    defined(XILINX_LLTEMAC_BASEADDR4) || defined(XILINX_LLTEMAC_BASEADDR5) || \
> > +    defined(XILINX_LLTEMAC_BASEADDR6) || defined(XILINX_LLTEMAC_BASEADDR7)
> > +# define CONFIG_XILINX_LL_TEMAC	1
> 
> Why to do it in this way? I believe that the first lltemac driver will have XILINX_LLTEMAC_BASEADDR
> and then others.

Right, but we need a definitive agreement that it is so (Xilinx BSP
generator). Did we them? If yes I will drop this part and insert your
original condition (test only XILINX_LLTEMAC_BASEADDR).

> But for all configurations if there is lltemac driver then will have anyone just BASEADDR.
yep


br,
Stephan
Michal Simek - Feb. 23, 2012, 11:49 a.m.
Stephan Linz wrote:
> U-Boot's multipple network supports 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 |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
> index 03a6f5a..09ac870 100644
> --- a/include/configs/microblaze-generic.h
> +++ b/include/configs/microblaze-generic.h
> @@ -65,11 +65,15 @@
>  
>  /* 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) || \
> +    defined(XILINX_LLTEMAC_BASEADDR2) || defined(XILINX_LLTEMAC_BASEADDR3) || \
> +    defined(XILINX_LLTEMAC_BASEADDR4) || defined(XILINX_LLTEMAC_BASEADDR5) || \
> +    defined(XILINX_LLTEMAC_BASEADDR6) || defined(XILINX_LLTEMAC_BASEADDR7)
> +# define CONFIG_XILINX_LL_TEMAC	1
>  # define CONFIG_SYS_ENET
>  #endif
>  #if defined(XILINX_AXIEMAC_BASEADDR)

I don't agree with this. The whole reason is to enable ll_temac driver
and I believe that all system with ll_temac will starts with XILINX_LLTEMAC_BASEADDR
and then others.
Which means if XILINX_LLTEMAC_BASEADDR is there just enable the driver.

I just can't see the reason to start with BASEADDR1 or 2 or .... or 7.

Michal

Patch

diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 03a6f5a..09ac870 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -65,11 +65,15 @@ 
 
 /* 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) || \
+    defined(XILINX_LLTEMAC_BASEADDR2) || defined(XILINX_LLTEMAC_BASEADDR3) || \
+    defined(XILINX_LLTEMAC_BASEADDR4) || defined(XILINX_LLTEMAC_BASEADDR5) || \
+    defined(XILINX_LLTEMAC_BASEADDR6) || defined(XILINX_LLTEMAC_BASEADDR7)
+# define CONFIG_XILINX_LL_TEMAC	1
 # define CONFIG_SYS_ENET
 #endif
 #if defined(XILINX_AXIEMAC_BASEADDR)