From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6673 invoked by alias); 13 Apr 2007 11:36:54 -0000 Received: (qmail 6664 invoked by uid 22791); 13 Apr 2007 11:36:53 -0000 X-Spam-Check-By: sourceware.org Received: from av-gw1.cc.tut.fi (HELO av-gw1.cc.tut.fi) (130.230.130.110) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 13 Apr 2007 12:36:50 +0100 Received: from av-gw1.cc.tut.fi (unknown [127.0.0.1]) by av-gw1.cc.tut.fi (Symantec Mail Security) with ESMTP id 1B5F2B580AA; Fri, 13 Apr 2007 14:36:47 +0300 (EEST) X-AuditID: 82e6826e-acac7bb0000073b4-ca-461f6b4e18fa Received: from mail.cc.tut.fi (unknown [130.230.1.120]) by av-gw1.cc.tut.fi (Symantec Mail Security) with ESMTP id CB96F430028; Fri, 13 Apr 2007 14:36:46 +0300 (EEST) Received: from [193.166.235.105] (e219.ttorni.tontut.fi [193.166.235.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cc.tut.fi (Postfix) with ESMTP id C2FA2A4117; Fri, 13 Apr 2007 14:36:46 +0300 (EEST) Message-ID: <461F6B2B.7060501@tut.fi> Date: Fri, 13 Apr 2007 11:36:00 -0000 From: Tapio Koskinen User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Jiri Gaisler CC: ecos-discuss@sourceware.org References: <45FD90E4.6040400@gaisler.com> <460BE1E3.2000107@tut.fi> <460BE5FF.906@gaisler.com> <460BFF27.9010907@tut.fi> <460C4CA4.2070108@gaisler.com> In-Reply-To: <460C4CA4.2070108@gaisler.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Re: Leon3 compatible with LAN91C111? X-SW-Source: 2007-04/txt/msg00064.txt.bz2 > 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