* [U-Boot] [PATCH 0/3] Microblaze/Xilinx network driver changes @ 2011-10-13 9:23 Michal Simek 2011-10-13 9:23 ` [U-Boot] [PATCH 1/3 v2] net: emaclite: Use unsigned long for baseaddr Michal Simek 0 siblings, 1 reply; 6+ messages in thread From: Michal Simek @ 2011-10-13 9:23 UTC (permalink / raw) To: u-boot Hi, The patches are based on git://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(-) -- 1.7.5.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/3 v2] net: emaclite: Use unsigned long for baseaddr 2011-10-13 9:23 [U-Boot] [PATCH 0/3] Microblaze/Xilinx network driver changes Michal Simek @ 2011-10-13 9:23 ` Michal Simek 2011-10-13 9:23 ` [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to Michal Simek 2011-10-23 20:15 ` [U-Boot] [PATCH 1/3 v2] net: emaclite: Use unsigned long for baseaddr Wolfgang Denk 0 siblings, 2 replies; 6+ messages in thread From: Michal Simek @ 2011-10-13 9:23 UTC (permalink / raw) To: u-boot Baseaddr should be unsigned long. Signed-off-by: Michal Simek <monstr@monstr.eu> --- v2: Fix merge confict - no function change --- drivers/net/xilinx_emaclite.c | 4 ++-- include/netdev.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index bb4fb01..ac3dae1 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -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; diff --git a/include/netdev.h b/include/netdev.h index 669f60b..a624677 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -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. -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to 2011-10-13 9:23 ` [U-Boot] [PATCH 1/3 v2] net: emaclite: Use unsigned long for baseaddr Michal Simek @ 2011-10-13 9:23 ` Michal Simek 2011-10-13 9:23 ` [U-Boot] [PATCH 3/3] microblaze: Wire up axi_ethernet driver initialization Michal Simek 2011-10-23 20:16 ` [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to Wolfgang Denk 2011-10-23 20:15 ` [U-Boot] [PATCH 1/3 v2] net: emaclite: Use unsigned long for baseaddr Wolfgang Denk 1 sibling, 2 replies; 6+ messages in thread From: Michal Simek @ 2011-10-13 9:23 UTC (permalink / raw) To: u-boot Init RX/TX ping pong directly from board not in the driver. Signed-off-by: Michal Simek <monstr@monstr.eu> --- 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(-) diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 183e4dc..9b2952f 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -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; } diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index ac3dae1..9791b9a 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -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); diff --git a/include/netdev.h b/include/netdev.h index a624677..54b52a5 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -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. -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 3/3] microblaze: Wire up axi_ethernet driver initialization 2011-10-13 9:23 ` [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to Michal Simek @ 2011-10-13 9:23 ` Michal Simek 2011-10-23 20:16 ` [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to Wolfgang Denk 1 sibling, 0 replies; 6+ messages in thread From: Michal Simek @ 2011-10-13 9:23 UTC (permalink / raw) To: u-boot Initialize axi_ethernet driver. Signed-off-by: Michal Simek <monstr@monstr.eu> --- .../xilinx/microblaze-generic/microblaze-generic.c | 6 ++++++ include/configs/microblaze-generic.h | 4 ++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 9b2952f..c4c13a6 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -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; diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 09ff7c4..6b3fd76 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -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 -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to 2011-10-13 9:23 ` [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to Michal Simek 2011-10-13 9:23 ` [U-Boot] [PATCH 3/3] microblaze: Wire up axi_ethernet driver initialization Michal Simek @ 2011-10-23 20:16 ` Wolfgang Denk 1 sibling, 0 replies; 6+ messages in thread From: Wolfgang Denk @ 2011-10-23 20:16 UTC (permalink / raw) To: u-boot Dear Michal Simek, In message <1318497803-21874-3-git-send-email-monstr@monstr.eu> you wrote: > Init RX/TX ping pong directly from board not in the driver. > > Signed-off-by: Michal Simek <monstr@monstr.eu> > > --- > 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 -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH 1/3 v2] net: emaclite: Use unsigned long for baseaddr 2011-10-13 9:23 ` [U-Boot] [PATCH 1/3 v2] net: emaclite: Use unsigned long for baseaddr Michal Simek 2011-10-13 9:23 ` [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to Michal Simek @ 2011-10-23 20:15 ` Wolfgang Denk 1 sibling, 0 replies; 6+ messages in thread From: Wolfgang Denk @ 2011-10-23 20:15 UTC (permalink / raw) To: u-boot Dear Michal Simek, In message <1318497803-21874-2-git-send-email-monstr@monstr.eu> you wrote: > Baseaddr should be unsigned long. > > Signed-off-by: Michal Simek <monstr@monstr.eu> > > --- > 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 -- 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-10-23 20:16 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-10-13 9:23 [U-Boot] [PATCH 0/3] Microblaze/Xilinx network driver changes Michal Simek 2011-10-13 9:23 ` [U-Boot] [PATCH 1/3 v2] net: emaclite: Use unsigned long for baseaddr Michal Simek 2011-10-13 9:23 ` [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to Michal Simek 2011-10-13 9:23 ` [U-Boot] [PATCH 3/3] microblaze: Wire up axi_ethernet driver initialization Michal Simek 2011-10-23 20:16 ` [U-Boot] [PATCH 2/3 v2] net: emaclite: Move RX/TX ping pong initialization to Wolfgang Denk 2011-10-23 20:15 ` [U-Boot] [PATCH 1/3 v2] net: emaclite: Use unsigned long for baseaddr Wolfgang Denk
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.