[U-Boot] DEC21140 driver && netconsole && new target.

Hello, I have a board which uses dec21140-like ethernet, non-pci. In Linksys' GPL release is old u-boot (seems 1.1.4). I had same problem with 2010.09, in that when I enable netconsole, I saw each putc/puts twice!
I read dec2114x datasheet in detail, and firstly, wonder if anyone else has tested this driver with netconsole. I made many changes to mine to ensure MIPS cache coherency, but here are my findings for those interested to maybe one day find in the mailing list archive..
the TX/RX descriptors can be rings or chains. the driver seems to setup chains and use the End of Ring bit as well. Thus, in the net_send routine, the chipset should send buffer1, see buffer2size=0, and start again at ring base. If TX ring has only 1 entry, it see's the same descriptor again, and sends the packet twice.
Since the chipset makes use of next descriptor if buffer2 size is 0, I made use of buffer2 itself. Then with buffer1size=0, it will only use buffer2. This is labeled "next" currently in the descriptor struct.
So that, inside the net_send routine, you would set next = cpu_to_le32(phys_to_bus((u32)packet)); instead of buf. then des1 can be set as: des1 = cpu_to_le32(TD_LS | TD_FS | (length << 11));
This is currently good for 1 tx descriptor and u-boots small packets which never use >1, and certainly fixes a lot.
Also, my board is the Linksys T-Mobile branded WRTU54G-TM, uses ADM8668 chipset for those curious, but this is from DEC21140 datasheet. Please inform me if this is not the case for whichever target uses it.

Dear Scott Nicholas,
In message AANLkTikPg0Duvni9fb_oNpz-XYdzZsE=Qoz89AP6FofL@mail.gmail.com you wrote:
I have a board which uses dec21140-like ethernet, non-pci. In Linksys' GPL release is old u-boot (seems 1.1.4). I had same problem with 2010.09, in that when I enable netconsole, I saw each putc/puts twice!
I read dec2114x datasheet in detail, and firstly, wonder if anyone else has tested this driver with netconsole. I made many changes to
Most probably not.
mine to ensure MIPS cache coherency, but here are my findings for those interested to maybe one day find in the mailing list archive..
Thanks, highly appreciated.
Also, my board is the Linksys T-Mobile branded WRTU54G-TM, uses ADM8668 chipset for those curious, but this is from DEC21140 datasheet. Please inform me if this is not the case for whichever target uses it.
There is no dec21140 Ethernet driver in mainline U-Boot, so it's pretty unlikely that there will be much feedback. Just don't be disappointed.
If would be great if you could submit your patches here - please see http://www.denx.de/wiki/U-Boot/Patches for details.
Best regards,
Wolfgang Denk

Hello,
On Wed, Nov 24, 2010 at 4:18 PM, Wolfgang Denk wd@denx.de wrote:
Dear Scott Nicholas,
In message AANLkTikPg0Duvni9fb_oNpz-XYdzZsE=Qoz89AP6FofL@mail.gmail.com you wrote:
There is no dec21140 Ethernet driver in mainline U-Boot, so it's pretty unlikely that there will be much feedback. Just don't be disappointed.
I mean drivers/net/dc2114x.c, whatever name it goes by.
If would be great if you could submit your patches here - please see http://www.denx.de/wiki/U-Boot/Patches for details.
I may. But I can't test changes to dc2114x itself, is why I asked the list. Because maybe the board that does use it, does not exactly follow behavior of mine?
Little would be gained from including my target to mainline. Afaik, it's only in this 1 router. The chip and board both out of production. But I can submit.
I'm currently trying to have MIPS startup code use unlzma on the rest, so that I may fit the entire binary into the same 64k sector used currently. Would such a patch seem useful for submission as well? seems not much MIPS use in here.
-- Scott

Dear Scott Nicholas,
In message AANLkTingEZsfkziHF+QDBxDm8ri1tL4eQA5v+DNYTStP@mail.gmail.com you wrote:
There is no dec21140 Ethernet driver in mainline U-Boot, so it's pretty unlikely that there will be much feedback. Just don't be disappointed.
I mean drivers/net/dc2114x.c, whatever name it goes by.
Oops. You are right.
But tehre are only few board configfurations that enable that driver, and most of them are old and unmaintained. I doubt any of these ever used netconsole.
The only more recent system is `linkstation', but again I doubt if it has been tested with netconsole (but of course you might ask Guennadi, the maintainer).
I may. But I can't test changes to dc2114x itself, is why I asked the list. Because maybe the board that does use it, does not exactly follow behavior of mine?
Try and ask if Guennadi can test this on his linkstation.
Little would be gained from including my target to mainline. Afaik, it's only in this 1 router. The chip and board both out of production. But I can submit.
There may be other users who use this box, and there are probably other, similar systems.
I'm currently trying to have MIPS startup code use unlzma on the rest, so that I may fit the entire binary into the same 64k sector used currently. Would such a patch seem useful for submission as well? seems not much MIPS use in here.
Indeed, there are not so many MIPS users out there. Dunno why.
Best regards,
Wolfgang Denk
participants (2)
-
Scott Nicholas
-
Wolfgang Denk