Microblaze/Xilinx network driver changes
Subsystems (2)
cover Microblaze/Xilinx network driver changes
Hi,
The patches are based ongit://git.denx.de/u-boot-microblaze.git network-drivers branch.
Thanks for your review.
Thanks,
Michal
Michal Simek (3):
net: emaclite: Use unsigned long for baseaddr
net: emaclite: Move RX/TX ping pong initialization to board
microblaze: Wire up axi_ethernet driver initialization
.../xilinx/microblaze-generic/microblaze-generic.c | 24 +++++++++++++++----- drivers/net/xilinx_emaclite.c | 13 ++++------ include/configs/microblaze-generic.h | 4 +++ include/netdev.h | 3 +- 4 files changed, 29 insertions(+), 15 deletions(-)
Signature · 1 line
1.7.5.4
PATCH v2 1/3 net: emaclite: Use unsigned long for baseaddr
Baseaddr should be unsigned long.
---
v2: Fix merge confict - no function change
--- drivers/net/xilinx_emaclite.c | 4 ++-- include/netdev.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/xilinx_emaclite.c +2 -2
@@ -342,7 +342,7 @@ static int emaclite_recv(struct eth_device *dev) } -int xilinx_emaclite_initialize (bd_t *bis,int base_addr) +int xilinx_emaclite_initialize (bd_t *bis,unsigned long base_addr) {struct eth_device *dev;struct xemaclite *emaclite;
@@ -366,7 +366,7 @@ int xilinx_emaclite_initialize (bd_t *bis, int base_addr) emaclite->rxpp =1 ;#endif -sprintf (dev->name,"Xelite.%x" , base_addr); +sprintf (dev->name,"Xelite.%lx" , base_addr); dev->iobase = base_addr; dev->init = emaclite_init;
include/netdev.h +1 -1
@@ -97,7 +97,7 @@ int uli526x_initialize(bd_t *bis);int armada100_fec_register (unsigned long base_addr);int xilinx_axiemac_initialize (bd_t *bis,unsigned long base_addr,unsigned long dma_addr); -int xilinx_emaclite_initialize (bd_t *bis,int base_addr); +int xilinx_emaclite_initialize (bd_t *bis,unsigned long base_addr);/* Boards with PCI network controllers can call this from their board_eth_init() * function to initialize whatever's on board.
Signature · 1 line
1.7.5.4
PATCH v2 2/3 net: emaclite: Move RX/TX ping pong initialization to
Init RX/TX ping pong directly from board not in the driver.
---
v2: Fix merge confict - no function change
--- .../xilinx/microblaze-generic/microblaze-generic.c | 18 ++++++++++++------ drivers/net/xilinx_emaclite.c | 11 ++++------- include/netdev.h | 3 ++- 3 files changed, 18 insertions(+), 14 deletions(-)
board/xilinx/microblaze-generic/microblaze-generic.c +12 -6
@@ -71,12 +71,18 @@ 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 -return xilinx_emaclite_initialize (bis,XILINX_EMACLITE_BASEADDR ); +u32 txpp =0 ; +u32 rxpp =0 ; +# ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG + txpp =1 ; +# endif +# ifdef CONFIG_XILINX_EMACLITE_RX_PING_PONG + rxpp =1 ; +# endif + ret |=xilinx_emaclite_initialize (bis,XILINX_EMACLITE_BASEADDR , + txpp, rxpp);#endif +return ret; }
drivers/net/xilinx_emaclite.c +4 -7
@@ -342,7 +342,8 @@ static int emaclite_recv(struct eth_device *dev) } -int xilinx_emaclite_initialize (bd_t *bis,unsigned long base_addr) +int xilinx_emaclite_initialize (bd_t *bis,unsigned long base_addr, +int txpp,int rxpp) {struct eth_device *dev;struct xemaclite *emaclite;
@@ -359,12 +360,8 @@ int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr) dev->priv = emaclite; -#ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG - emaclite->txpp =1 ; -#endif -#ifdef CONFIG_XILINX_EMACLITE_RX_PING_PONG - emaclite->rxpp =1 ; -#endif + emaclite->txpp = txpp; + emaclite->rxpp = rxpp;sprintf (dev->name,"Xelite.%lx" , base_addr);
include/netdev.h +2 -1
@@ -97,7 +97,8 @@ int uli526x_initialize(bd_t *bis);int armada100_fec_register (unsigned long base_addr);int xilinx_axiemac_initialize (bd_t *bis,unsigned long base_addr,unsigned long dma_addr); -int xilinx_emaclite_initialize (bd_t *bis,unsigned long base_addr); +int xilinx_emaclite_initialize (bd_t *bis,unsigned long base_addr, +int txpp,int rxpp);/* Boards with PCI network controllers can call this from their board_eth_init() * function to initialize whatever's on board.
Signature · 1 line
1.7.5.4
PATCH 3/3 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
@@ -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
@@ -68,6 +68,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.7.5.4
Wolfgang Denk
AppliedPATCH v2 2/3 net: emaclite: Move RX/TX ping pong initialization to
In reply to Michal SimekDear Michal Simek,
Quoted 11 lines · In message <[email protected]> you wrote:
Init RX/TX ping pong directly from board not in the driver.
Signed-off-by Michal Simek <[email protected]>---
v2: Fix merge confict - no function change--- .../xilinx/microblaze-generic/microblaze-generic.c | 18 ++++++++++++------ drivers/net/xilinx_emaclite.c | 11 ++++------- include/netdev.h | 3 ++- 3 files changed, 18 insertions(+), 14 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I have never understood the female capacity to avoid a direct answer to any question. -- Spock, "This Side of Paradise", stardate 3417.3
Wolfgang Denk
AppliedPATCH v2 1/3 net: emaclite: Use unsigned long for baseaddr
In reply to Michal SimekDear Michal Simek,
Quoted 10 lines · In message <[email protected]> you wrote:
Baseaddr should be unsigned long.
Signed-off-by Michal Simek <[email protected]>---
v2: Fix merge confict - no function change--- drivers/net/xilinx_emaclite.c | 4 ++-- include/netdev.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Do not simplify the design of a program if a way can be found to make it complex and wonderful.