Skip to contentSkip to conversation

Microblaze platform patches

U-Boot New Michal Simek 2 participants 12 messages Aug 31, 2011 – Nov 27, 2011 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

Hi,

here is the second package with platform changes. The first contained microblaze architecture patches.

All my patches with new network drivers/fixes, etc are available in my custodian repo.
git://git.denx.de/u-boot-microblaze.git

Thanks for your review,
Michal

#1 lore raw

PATCH 1/8 microblaze: Do not select NFS for platforms without ethernet

Undefined network functionality for systems without ethernet and disable NFS support.

---
 include/configs/microblaze-generic.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/configs/microblaze-generic.h +2 -0
index 8243f8d..0c7c294 100644
@@ -62,6 +62,7 @@
 /*#define	CONFIG_SYS_RESET_ADDRESS	CONFIG_SYS_TEXT_BASE*/
 
 /* ethernet */
+#undef CONFIG_SYS_ENET
 #ifdef XILINX_EMACLITE_BASEADDR
 # define CONFIG_XILINX_EMACLITE		1
 # define CONFIG_SYS_ENET
@@ -245,6 +246,7 @@
 #ifndef CONFIG_SYS_ENET
 # undef CONFIG_CMD_NET
 # undef CONFIG_NET_MULTI
+# undef CONFIG_CMD_NFS
 #else
 # define CONFIG_CMD_PING
 # define CONFIG_CMD_DHCP
Signature · 1 line
1.5.5.6
#2 lore raw

PATCH 2/8 microblaze: Remove address offset for uart16550

U-Boot BSP handle 0x3 offset for big endian systems. Little endian Microblaze systems don't use any offset.

---
 include/configs/microblaze-generic.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/microblaze-generic.h +1 -1
index 0c7c294..684f2d6 100644
@@ -46,7 +46,7 @@
 # define CONFIG_SYS_NS16550_REG_SIZE	-4
 # define CONFIG_CONS_INDEX		1
 # define CONFIG_SYS_NS16550_COM1 \
-			(XILINX_UART16550_BASEADDR + 0x1000 + 0x3)
+			(XILINX_UART16550_BASEADDR + 0x1000)
 # define CONFIG_SYS_NS16550_CLK	XILINX_UART16550_CLOCK_HZ
 # define CONFIG_BAUDRATE	115200
 
Signature · 1 line
1.5.5.6
#3 lore raw

PATCH 3/8 microblaze: Fix no return statement from microblaze-generic board

Remove compilation warning for systems without network support.

Warning log:
microblaze-generic.c: In function 'board_eth_init':
microblaze-generic.c:82: warning: no return statement in function returning non-void

---
 .../xilinx/microblaze-generic/microblaze-generic.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
board/xilinx/microblaze-generic/microblaze-generic.c +3 -6
index 1a6e568..9b2952f 100644
@@ -71,11 +71,7 @@ int fsl_init2 (void) {
 
 int board_eth_init(bd_t *bis)
 {
-	/*
-	 * This board either has PCI NICs or uses the CPU's TSECs
-	 * pci_eth_init() will return 0 if no NICs found, so in that case
-	 * returning -1 will force cpu_eth_init() to be called.
-	 */
+	int ret = 0;
 #ifdef CONFIG_XILINX_EMACLITE
 	u32 txpp = 0;
 	u32 rxpp = 0;
@@ -85,7 +81,8 @@ int board_eth_init(bd_t *bis)
 # ifdef CONFIG_XILINX_EMACLITE_RX_PING_PONG
 	rxpp = 1;
 # endif
-	return xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR,
+	ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR,
 			txpp, rxpp);
 #endif
+	return ret;
 }
Signature · 1 line
1.5.5.6
#4 lore raw

PATCH 4/8 microblaze: Enable FDT/FIT support

Enable FDT and FIT support.

---
 include/configs/microblaze-generic.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/configs/microblaze-generic.h +5 -0
index 684f2d6..c526006 100644
@@ -329,4 +329,9 @@
 # define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
 #endif
 
+/* Enable flat device tree support */
+#define CONFIG_LMB		1
+#define CONFIG_FIT		1
+#define CONFIG_OF_LIBFDT	1
+
 #endif	/* __CONFIG_H */
Signature · 1 line
1.5.5.6
#5 lore raw

PATCH 5/8 microblaze: Wire up LL_TEMAC driver initialization

Initialize ll_temac driver.

---
 .../xilinx/microblaze-generic/microblaze-generic.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
board/xilinx/microblaze-generic/microblaze-generic.c +16 -0
index 9b2952f..87acc6b 100644
@@ -84,5 +84,21 @@ int board_eth_init(bd_t *bis)
 	ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR,
 			txpp, rxpp);
 #endif
+
+#ifdef CONFIG_XILINX_LL_TEMAC
+# ifdef XILINX_LLTEMAC_FIFO_BASEADDR
+	ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR,
+					0, XILINX_LLTEMAC_FIFO_BASEADDR);
+# elif XILINX_LLTEMAC_SDMA_CTRL_BASEADDR
+#  if XILINX_LLTEMAC_SDMA_USE_DCR == 1
+	ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR,
+					3, XILINX_LLTEMAC_SDMA_CTRL_BASEADDR);
+#  else
+	ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR,
+					1, XILINX_LLTEMAC_SDMA_CTRL_BASEADDR);
+#  endif
+# endif
+#endif
+
 	return ret;
 }
Signature · 1 line
1.5.5.6
#6 lore raw

PATCH 6/8 microblaze: Enable several ethernet driver compilation

NET_MULTI enables to use several ethernet drivers but microblaze-generic platform config file select only one driver.

---
 include/configs/microblaze-generic.h |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
include/configs/microblaze-generic.h +5 -4
index c526006..4c76afd 100644
@@ -63,11 +63,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)
+# define CONFIG_XILINX_LL_TEMAC	1
 # define CONFIG_SYS_ENET
 #endif
 
Signature · 1 line
1.5.5.6
#7 lore raw

PATCH 7/8 microblaze: Wire up axi_ethernet driver initialization

Initialize axi_ethernet driver.

---
 .../xilinx/microblaze-generic/microblaze-generic.c |    6 ++++++
 include/configs/microblaze-generic.h               |    4 ++++
 2 files changed, 10 insertions(+), 0 deletions(-)
board/xilinx/microblaze-generic/microblaze-generic.c +6 -0
index 87acc6b..955cc34 100644
@@ -72,6 +72,12 @@ int fsl_init2 (void) {
 int board_eth_init(bd_t *bis)
 {
 	int ret = 0;
+
+#ifdef CONFIG_XILINX_AXIEMAC
+	ret |= xilinx_axiemac_initialize(bis, XILINX_AXIEMAC_BASEADDR,
+						XILINX_AXIDMA_BASEADDR);
+#endif
+
 #ifdef CONFIG_XILINX_EMACLITE
 	u32 txpp = 0;
 	u32 rxpp = 0;
include/configs/microblaze-generic.h +4 -0
index 4c76afd..f56d0e2 100644
@@ -71,6 +71,10 @@
 # define CONFIG_XILINX_LL_TEMAC	1
 # define CONFIG_SYS_ENET
 #endif
+#if defined(XILINX_AXIEMAC_BASEADDR)
+# define CONFIG_XILINX_AXIEMAC	1
+# define CONFIG_SYS_ENET
+#endif
 
 #undef ET_DEBUG
 
Signature · 1 line
1.5.5.6
#8 lore raw

PATCH 8/8 microblaze: Enable phylib support

---
 include/configs/microblaze-generic.h |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
include/configs/microblaze-generic.h +19 -0
index f56d0e2..d3f0018 100644
@@ -339,4 +339,23 @@
 #define CONFIG_FIT		1
 #define CONFIG_OF_LIBFDT	1
 
+#if defined(CONFIG_XILINX_LL_TEMAC) || defined(CONFIG_XILINX_AXIEMAC)
+# define CONFIG_MII		1
+# define CONFIG_CMD_MII		1
+# define CONFIG_PHY_GIGE	1
+# define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	1
+# define CONFIG_PHYLIB		1
+# define CONFIG_PHY_ATHEROS	1
+# define CONFIG_PHY_BROADCOM	1
+# define CONFIG_PHY_DAVICOM	1
+# define CONFIG_PHY_LXT		1
+# define CONFIG_PHY_MARVELL	1
+# define CONFIG_PHY_MICREL	1
+# define CONFIG_PHY_NATSEMI	1
+# define CONFIG_PHY_REALTEK	1
+# define CONFIG_PHY_VITESSE	1
+#else
+# undef CONFIG_PHYLIB
+#endif
+
 #endif	/* __CONFIG_H */
Signature · 1 line
1.5.5.6
#9 lore raw

PATCH 8/8 microblaze: Enable phylib support

Am Mittwoch, den 31.08.2011, 12:57 +0200 schrieb Michal Simek:

Quoted 1 line
Quoted 32 lines
---
 include/configs/microblaze-generic.h |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
include/configs/microblaze-generic.h +19 -0
index f56d0e2..d3f0018 100644
@@ -339,4 +339,23 @@
 #define CONFIG_FIT		1
 #define CONFIG_OF_LIBFDT	1
 
+#if defined(CONFIG_XILINX_LL_TEMAC) || defined(CONFIG_XILINX_AXIEMAC)
+# define CONFIG_MII		1
+# define CONFIG_CMD_MII		1
+# define CONFIG_PHY_GIGE	1
+# define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	1
+# define CONFIG_PHYLIB		1
+# define CONFIG_PHY_ATHEROS	1
+# define CONFIG_PHY_BROADCOM	1
+# define CONFIG_PHY_DAVICOM	1
+# define CONFIG_PHY_LXT		1
+# define CONFIG_PHY_MARVELL	1
+# define CONFIG_PHY_MICREL	1
+# define CONFIG_PHY_NATSEMI	1
+# define CONFIG_PHY_REALTEK	1
+# define CONFIG_PHY_VITESSE	1
+#else
+# undef CONFIG_PHYLIB
+#endif
+
 #endif	/* __CONFIG_H */
Signature · 8 lines
Viele Gr??e,
Stephan Linz
______________________________________________________________________________
MB-Ref: http://www.li-pro.de/xilinx_mb:mbref:start
OpenDCC: http://www.li-pro.net/opendcc.phtml
PC/M: http://www.li-pro.net/pcm.phtml
Sourceforge: http://sourceforge.net/users/slz
Gitorious: https://gitorious.org/~slz
#10 lore raw

PATCH 6/8 microblaze: Enable several ethernet driver compilation

In reply to Michal Simek

Am Mittwoch, den 31.08.2011, 12:57 +0200 schrieb Michal Simek:

Quoted 5 lines

NET_MULTI enables to use several ethernet drivers but microblaze-generic platform config file select only one driver.

Quoted 25 lines
---
 include/configs/microblaze-generic.h |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
include/configs/microblaze-generic.h +5 -4
index c526006..4c76afd 100644
@@ -63,11 +63,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)
+# define CONFIG_XILINX_LL_TEMAC	1
 # define CONFIG_SYS_ENET
 #endif
 
Signature · 8 lines
Viele Gr??e,
Stephan Linz
______________________________________________________________________________
MB-Ref: http://www.li-pro.de/xilinx_mb:mbref:start
OpenDCC: http://www.li-pro.net/opendcc.phtml
PC/M: http://www.li-pro.net/pcm.phtml
Sourceforge: http://sourceforge.net/users/slz
Gitorious: https://gitorious.org/~slz
#11 lore raw

PATCH 5/8 microblaze: Wire up LL_TEMAC driver initialization

In reply to Michal Simek

Am Mittwoch, den 31.08.2011, 12:57 +0200 schrieb Michal Simek:

Quoted 3 lines

Initialize ll_temac driver.

Quoted 30 lines
---
 .../xilinx/microblaze-generic/microblaze-generic.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
board/xilinx/microblaze-generic/microblaze-generic.c +16 -0
index 9b2952f..87acc6b 100644
@@ -84,5 +84,21 @@ int board_eth_init(bd_t *bis)
 	ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR,
 			txpp, rxpp);
 #endif
+
+#ifdef CONFIG_XILINX_LL_TEMAC
+# ifdef XILINX_LLTEMAC_FIFO_BASEADDR
+	ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR,
+					0, XILINX_LLTEMAC_FIFO_BASEADDR);
+# elif XILINX_LLTEMAC_SDMA_CTRL_BASEADDR
+#  if XILINX_LLTEMAC_SDMA_USE_DCR == 1
+	ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR,
+					3, XILINX_LLTEMAC_SDMA_CTRL_BASEADDR);
+#  else
+	ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR,
+					1, XILINX_LLTEMAC_SDMA_CTRL_BASEADDR);
+#  endif
+# endif
+#endif
+
 	return ret;
 }
Signature · 8 lines
Viele Gr??e,
Stephan Linz
______________________________________________________________________________
MB-Ref: http://www.li-pro.de/xilinx_mb:mbref:start
OpenDCC: http://www.li-pro.net/opendcc.phtml
PC/M: http://www.li-pro.net/pcm.phtml
Sourceforge: http://sourceforge.net/users/slz
Gitorious: https://gitorious.org/~slz