This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Leon3 compatible with LAN91C111?
- From: Tapio Koskinen <tapio dot koskinen at tut dot fi>
- To: ecos-discuss at sourceware dot org
- Date: Mon, 05 Mar 2007 16:40:46 +0200
- Subject: [ECOS] Leon3 compatible with LAN91C111?
Hi all,
I am using a Leon3 processor on Altera's Nios II Development Kit,
Stratix Edition. The board has a LAN91C111 Ethernet controller and I am
trying to get server_test.c working. There was no target for such a
configuration, so I made a new target to ecos.db and added the following
packages to it:
CYGPKG_HAL_SPARC
CYGPKG_HAL_SPARC_LEON3
CYGPKG_DEVS_ETH_SMSC_LAN91CXX
CYGPKG_DEVS_ETH_SPARC_LEON3
When trying to run the program it said "No 91Cxx signature found". It
seems there was an endianess problem, and after removing all calls to
CYG_CPU_TO_LE16 and CYG_LE16_TO_CPU in
devs/eth/smsc/lan91cxx/current/src/if_lan91cxx.c and smsc_lan91cxx.h it
found the signature.
However it prints "auto-negotiation failed" even though "link ok" led is
lit in the controller after aneg-bit is written to RPCR-register. Also
there is a yellow balloon tip in Windows saying 10Mbps link established.
After lan91cxx_start completes these lines are printed:
lan91cxx_can_send
lan91cxx_can_send: ENGINE RESTART: tcr 0x0000
lan91cxx_poll
lan91cxx_TxEvent
lan91cxx_TxEvent:START: fifo 0000 ints 3100
lan91cxx_TxEvent: ENGINE RESTART: tcr 0x0000 eph 0x0000 ints 0x3100
lan91cxx_TxEvent:END: fifo 0000 ints 3302
lan91cxx_isr
lan91cxx_TxEvent
lan91cxx_TxEvent:START: fifo 0000 ints 3100
lan91cxx_TxEvent: ENGINE RESTART: tcr 0x0000 eph 0x0000 ints 0x3100
lan91cxx_TxEvent:END: fifo 0000 ints 3302
lan91cxx_TxEvent
So it keeps executing lan91cxx_TxEvent over and over. TXENA-bit can't
stay up but there is no error in EPH_STATUS-register. And what is the
server_test/eCos trying to send anyways? Server_test should just wait
for a connection. I have set a static IP address so DHCP shouldn't be in
use. I also tried unloading DNS-package but it didn't help. What should
I try to do next?
I have tried using versions 1.19 and 1.20 of 91C111's drivers, although
in 1.20 calls to CYGACC_CALL_IF_DELAY_US(x) couldn't be linked even if I
added "#include <cyg/hal/hal_if.h>" to if_lan91cxx.c. So I had to change
those calls back to HAL_DELAY_US(x).
Thanks in advance
Tapio
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss