Message ID | 20110415144908.16476jnz1wxcpps4@mail.unibe.ch |
---|---|
State | Changes Requested |
Delegated to: | Wolfgang Denk |
Headers | show |
Hi Alain,
Le 15/04/2011 14:49, alain.peteut@space.unibe.ch a écrit :
> Please find attached the checked patch. Sorry for the inconvenience.
Please follow the rules for updated patches:
<http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions>
(also, while patchwork seems to deal well with patches sent as
attachments, please consider sending the patches inline, for instance
using 'git send-email' commands. Many of us look at patches in their
mail, and just seeing an attachment and having to open it in an external
app is a bit of a pain.)
Amicalement,
Dear alain.peteut@space.unibe.ch, In message <20110415144908.16476jnz1wxcpps4@mail.unibe.ch> you wrote: > > Please find attached the checked patch. Sorry for the inconvenience. Please send patches inline. No attachments! And please stick to the rules with updated versions - mark the version in the Subject, and provide a Changelog. See http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions Also, please provide a meaningful Subject: and commit message - I have to admit that I have no idea what this patch is suposed to be about. > /* > - * TX - TX_PING & TX_PONG initialization > + TX - TX_PING & TX_PONG initialization > */ Why are you messing up a previously correct multinine comment into an incorrect one? Please undo. > out_be32 (emaclite.baseaddress + XEL_TSR_OFFSET, 0); > @@ -155,12 +157,13 @@ static int emaclite_init(struct eth_device *dev, bd_t > *bis) > while ((in_be32 (emaclite.baseaddress + XEL_TSR_OFFSET) & > XEL_TSR_PROG_MAC_ADDR) != 0) ; > > -#ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG > +#ifdef XILINX_EMACLITE_TX_PING_PONG Why are you making this change? Configurable parameteres are supposed to start with CONFIG_ resp. CONFIG_SYS_ ? > - out_be32 (emaclite.baseaddress + XEL_TPLR_OFFSET, ENET_ADDR_LENGTH); > + out_be32 (emaclite.baseaddress + XEL_TPLR_OFFSET + XEL_BUFFER_OFFSET, > + ENET_ADDR_LENGTH); This change appears to be unrelated to macro names. Please split into separate patches, and provde information what you change and why. Best regards, Wolfgang Denk
Wolfgang Denk wrote: > Dear alain.peteut@space.unibe.ch, > > In message <20110415144908.16476jnz1wxcpps4@mail.unibe.ch> you wrote: >> Please find attached the checked patch. Sorry for the inconvenience. > > Please send patches inline. No attachments! > > And please stick to the rules with updated versions - mark the > version in the Subject, and provide a Changelog. See > http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions > > Also, please provide a meaningful Subject: and commit message - I have > to admit that I have no idea what this patch is suposed to be about. > >> /* >> - * TX - TX_PING & TX_PONG initialization >> + TX - TX_PING & TX_PONG initialization >> */ > > Why are you messing up a previously correct multinine comment into an > incorrect one? > > Please undo. > >> out_be32 (emaclite.baseaddress + XEL_TSR_OFFSET, 0); >> @@ -155,12 +157,13 @@ static int emaclite_init(struct eth_device *dev, bd_t > *bis) >> while ((in_be32 (emaclite.baseaddress + XEL_TSR_OFFSET) & >> XEL_TSR_PROG_MAC_ADDR) != 0) ; >> >> -#ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG >> +#ifdef XILINX_EMACLITE_TX_PING_PONG > > Why are you making this change? Configurable parameteres are supposed > to start with CONFIG_ resp. CONFIG_SYS_ ? > >> - out_be32 (emaclite.baseaddress + XEL_TPLR_OFFSET, ENET_ADDR_LENGTH); >> + out_be32 (emaclite.baseaddress + XEL_TPLR_OFFSET + XEL_BUFFER_OFFSET, >> + ENET_ADDR_LENGTH); > > This change appears to be unrelated to macro names. Please split > into separate patches, and provde information what you change and why. I have found this old post. Just some my comments. 1. Wolfgang if you see any patches for xilinx fpga and microblaze and I don't reply that posts for a while, please ping me. I am more focus on other things and not checking u-boot malling list so often - it will be better soon. 2. This change is caused by misunderstanding of xparameters.h for microblaze/xilinx ppc boards. If someone wants to use looong xilinx xparameters from EDK/SDK project, not the correct one generated by u-boot bsp, reach problems like this and wants to rename it. The reason why I decided several years ago to use u-boot BSP was that new xparameters.h in board contains just minimum parameters which are important for u-boot. It wasn't and I believe it is unacceptable to add hundreds line with unimportant macros which are totally unrelated to u-boot. Thanks, Michal
Dear Michal Simek, In message <4E561EB2.1010207@monstr.eu> you wrote: > > 1. Wolfgang if you see any patches for xilinx fpga and microblaze and I don't reply > that posts for a while, please ping me. I am more focus on other things and not checking > u-boot malling list so often - it will be better soon. Sorry, but I don't have time and resources to track things like that - there are way too many custodians and developers out there that I could maintain a list of unanswered mails for each of them. > 2. This change is caused by misunderstanding of xparameters.h for microblaze/xilinx ppc boards. > If someone wants to use looong xilinx xparameters from EDK/SDK project, not the correct one generated by u-boot bsp, > reach problems like this and wants to rename it. > The reason why I decided several years ago to use u-boot BSP was that new xparameters.h in board contains > just minimum parameters which are important for u-boot. It wasn't and I believe it is unacceptable to > add hundreds line with unimportant macros which are totally unrelated to u-boot. I'm afraid I don;t understand what you want to tell me here. In any case, the patch cannot be applied as is, so if there are parts of it that should be merged it has to be reposted anyway. Best regards, Wolfgang Denk
From 3de8fc98d5bc133e94092f5171eac1c57f3572b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20P=C3=A9teut?= <peteut@space.unibe.ch> Date: Fri, 15 Apr 2011 14:40:52 +0200 Subject: [PATCH] xilinx_emaclite.c: Ping/Pong fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed macro names for Ping/Pong implementation. Initialisation for emaclite.nexttxbuffertouse and emaclite.nextrxbuffertouse added. Fixed a missed offset (XEL_BUFFER_OFFSET). Signed-off-by: Alain Péteut <peteut@space.unibe.ch> --- drivers/net/xilinx_emaclite.c | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 76af939..bc081d3 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -139,8 +139,10 @@ static int emaclite_init(struct eth_device *dev, bd_t *bis) memset (&emaclite, 0, sizeof (xemaclite)); emaclite.baseaddress = dev->iobase; + emaclite.nexttxbuffertouse = 0x0; + emaclite.nextrxbuffertouse = 0x0; /* - * TX - TX_PING & TX_PONG initialization + TX - TX_PING & TX_PONG initialization */ /* Restart PING TX */ out_be32 (emaclite.baseaddress + XEL_TSR_OFFSET, 0); @@ -155,12 +157,13 @@ static int emaclite_init(struct eth_device *dev, bd_t *bis) while ((in_be32 (emaclite.baseaddress + XEL_TSR_OFFSET) & XEL_TSR_PROG_MAC_ADDR) != 0) ; -#ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG +#ifdef XILINX_EMACLITE_TX_PING_PONG /* The same operation with PONG TX */ out_be32 (emaclite.baseaddress + XEL_TSR_OFFSET + XEL_BUFFER_OFFSET, 0); xemaclite_alignedwrite (dev->enetaddr, emaclite.baseaddress + XEL_BUFFER_OFFSET, ENET_ADDR_LENGTH); - out_be32 (emaclite.baseaddress + XEL_TPLR_OFFSET, ENET_ADDR_LENGTH); + out_be32 (emaclite.baseaddress + XEL_TPLR_OFFSET + XEL_BUFFER_OFFSET, + ENET_ADDR_LENGTH); out_be32 (emaclite.baseaddress + XEL_TSR_OFFSET + XEL_BUFFER_OFFSET, XEL_TSR_PROG_MAC_ADDR); while ((in_be32 (emaclite.baseaddress + XEL_TSR_OFFSET + @@ -172,7 +175,7 @@ static int emaclite_init(struct eth_device *dev, bd_t *bis) */ /* Write out the value to flush the RX buffer */ out_be32 (emaclite.baseaddress + XEL_RSR_OFFSET, XEL_RSR_RECV_IE_MASK); -#ifdef CONFIG_XILINX_EMACLITE_RX_PING_PONG +#ifdef XILINX_EMACLITE_RX_PING_PONG out_be32 (emaclite.baseaddress + XEL_RSR_OFFSET + XEL_BUFFER_OFFSET, XEL_RSR_RECV_IE_MASK); #endif @@ -222,7 +225,7 @@ static int emaclite_send (struct eth_device *dev, volatile void *ptr, int len) printf ("Error: Timeout waiting for ethernet TX buffer\n"); /* Restart PING TX */ out_be32 (emaclite.baseaddress + XEL_TSR_OFFSET, 0); -#ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG +#ifdef XILINX_EMACLITE_TX_PING_PONG out_be32 (emaclite.baseaddress + XEL_TSR_OFFSET + XEL_BUFFER_OFFSET, 0); #endif @@ -238,7 +241,7 @@ static int emaclite_send (struct eth_device *dev, volatile void *ptr, int len) && ((in_be32 ((baseaddress) + XEL_TSR_OFFSET) & XEL_TSR_XMIT_ACTIVE_MASK) == 0)) { -#ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG +#ifdef XILINX_EMACLITE_TX_PING_PONG emaclite.nexttxbuffertouse ^= XEL_BUFFER_OFFSET; #endif debug ("Send packet from 0x%x\n", baseaddress); @@ -254,7 +257,7 @@ static int emaclite_send (struct eth_device *dev, volatile void *ptr, int len) out_be32 (baseaddress + XEL_TSR_OFFSET, reg); return 1; } -#ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG +#ifdef XILINX_EMACLITE_TX_PING_PONG /* Switch to second buffer */ baseaddress ^= XEL_BUFFER_OFFSET; /* Determine if the expected buffer address is empty */ @@ -290,11 +293,11 @@ static int emaclite_recv(struct eth_device *dev) reg = in_be32 (baseaddress + XEL_RSR_OFFSET); debug ("Testing data at address 0x%x\n", baseaddress); if ((reg & XEL_RSR_RECV_DONE_MASK) == XEL_RSR_RECV_DONE_MASK) { -#ifdef CONFIG_XILINX_EMACLITE_RX_PING_PONG +#ifdef XILINX_EMACLITE_RX_PING_PONG emaclite.nextrxbuffertouse ^= XEL_BUFFER_OFFSET; #endif } else { -#ifndef CONFIG_XILINX_EMACLITE_RX_PING_PONG +#ifndef XILINX_EMACLITE_RX_PING_PONG debug ("No data was available - address 0x%x\n", baseaddress); return 0; #else -- 1.7.2.5