This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Leon3 compatible with LAN91C111?


The correct config command for leon3 and LANC91C111 is thus:

ecosconfig new sparc_leon3 net
ecosconfig add CYGPKG_DEVS_ETH_SMSC_LAN91CXX CYGPKG_DEVS_ETH_SPARC_LEON3
ecosconfig tree
make tests

Great. I tried to add packages using configtool but it didn't let me and I assumed ecosconfig wouldn't do it either.


Also it was strange that endianess conversion wasn't
needed even though Leon3 is big endian and LAN-controller little endian.
Endian conversion is typically done at the board level
by swapping the byte lanes. This is the case on the Nuhorizon
Spartan3 board, the Altera Nios boards, and on the GR-CPCI-AX
board from Pender. Which board are you using?

It is Altera's Nios board.


After doing the above and removing endianess conversion calls from the eCos code the following changes were needed for Ethernet to work (only half of the 91C111's registers were working originally):
- /devs/eth/sparc/leon3/current/include/devs_eth_leon3.inl
- #define CYGNUM_DEVS_ETH_SMSC_LAN91CXX_SHIFT_ADDR 1
- /devs/eth/smsc/lan91cxx/current/src/smsc_lan91cxx.h
- In get_reg-function HAL_READ_UINT16 was replaced with HAL_READ_UINT32.
- /devs/eth/smsc/lan91cxx/current/src/if_lan91cxx.c
- Calls to function CYGACC_CALL_IF_DELAY_US were replaced with
HAL_DELAY_US (linker failed without this).


Changes to if_lan91cxx.c were made to version 1.20 in
CVS-repository. In configtool "Ethernet register's address" was changed
to 0x20000300.

Shifting and read_uint32 changes were made to fool amba-bus to set byte enables correctly when reading 91C111's registers. Shifting was negated in hardware (probably in smc_mctrl.vhd).

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]