public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Re:  Leon3 compatible with LAN91C111?
@ 2007-03-18 19:19 Jiri Gaisler
  2007-03-19 14:06 ` HASAN HÜSEYIN YILMAZ
  2007-03-29 16:12 ` Tapio Koskinen
  0 siblings, 2 replies; 7+ messages in thread
From: Jiri Gaisler @ 2007-03-18 19:19 UTC (permalink / raw)
  To: ecos-discuss


LEON3 support for LAN91C111 is available in the patched eCos version
available from Gaisler Research:

ftp://gaisler.com/gaisler.com/ecos/src

This version of eCos also support SMP for LEON3. We have not succeeded
in pushing our modifications into the main tree yet ...

Some basic info is also available here:

http://www.gaisler.com/cms4_5_3/index.php?option=com_content&task=view&id=149&Itemid=31

Jiri.

Tapio Koskinen wrote:
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Re: Leon3 compatible with LAN91C111?
  2007-03-18 19:19 [ECOS] Re: Leon3 compatible with LAN91C111? Jiri Gaisler
@ 2007-03-19 14:06 ` HASAN HÜSEYIN YILMAZ
  2007-03-29 16:12 ` Tapio Koskinen
  1 sibling, 0 replies; 7+ messages in thread
From: HASAN HÜSEYIN YILMAZ @ 2007-03-19 14:06 UTC (permalink / raw)
  To: Jiri Gaisler; +Cc: ecos-discuss

Hi All
   Anyone know if smsc 9117 series ethernet driver ported to ecos ?
Regards,

On 3/18/07, Jiri Gaisler <jiri@gaisler.com> wrote:
>
> LEON3 support for LAN91C111 is available in the patched eCos version
> available from Gaisler Research:
>
> ftp://gaisler.com/gaisler.com/ecos/src
>
> This version of eCos also support SMP for LEON3. We have not succeeded
> in pushing our modifications into the main tree yet ...
>
> Some basic info is also available here:
>
> http://www.gaisler.com/cms4_5_3/index.php?option=com_content&task=view&id=149&Itemid=31
>
> Jiri.
>
> Tapio Koskinen wrote:
> > 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
>
>


-- 
----
Hasan Hüseyin Yılmaz

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Re:  Leon3 compatible with LAN91C111?
  2007-03-18 19:19 [ECOS] Re: Leon3 compatible with LAN91C111? Jiri Gaisler
  2007-03-19 14:06 ` HASAN HÜSEYIN YILMAZ
@ 2007-03-29 16:12 ` Tapio Koskinen
  2007-03-29 16:23   ` Jiri Gaisler
  1 sibling, 1 reply; 7+ messages in thread
From: Tapio Koskinen @ 2007-03-29 16:12 UTC (permalink / raw)
  To: Jiri Gaisler; +Cc: ecos-discuss

Hi Jiri,

Yes, I have been using ecos-rep-1.0.7.tar.gz. However I only found
support for Greth and Openeth, not Lan91C111 (in configtool
Build->Templates).

Tapio


Jiri Gaisler wrote:
> LEON3 support for LAN91C111 is available in the patched eCos version
> available from Gaisler Research:
> 
> ftp://gaisler.com/gaisler.com/ecos/src
> 
> This version of eCos also support SMP for LEON3. We have not succeeded
> in pushing our modifications into the main tree yet ...
> 
> Some basic info is also available here:
> 
> http://www.gaisler.com/cms4_5_3/index.php?option=com_content&task=view&id=149&Itemid=31
> 
> Jiri.
> 
> Tapio Koskinen wrote:
>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Re:  Leon3 compatible with LAN91C111?
  2007-03-29 16:12 ` Tapio Koskinen
@ 2007-03-29 16:23   ` Jiri Gaisler
  2007-03-29 23:32     ` Tapio Koskinen
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Gaisler @ 2007-03-29 16:23 UTC (permalink / raw)
  To: Tapio Koskinen; +Cc: ecos-discuss


The package name is CYGPKG_DEVS_ETH_SMSC_LAN91CXX, in directory
devs/eth/smsc/lan91cxx .

Jiri.

Tapio Koskinen wrote:
> Hi Jiri,
> 
> Yes, I have been using ecos-rep-1.0.7.tar.gz. However I only found
> support for Greth and Openeth, not Lan91C111 (in configtool
> Build->Templates).
> 
> Tapio
> 
> 
> Jiri Gaisler wrote:
>> LEON3 support for LAN91C111 is available in the patched eCos version
>> available from Gaisler Research:
>>
>> ftp://gaisler.com/gaisler.com/ecos/src
>>
>> This version of eCos also support SMP for LEON3. We have not succeeded
>> in pushing our modifications into the main tree yet ...
>>
>> Some basic info is also available here:
>>
>> http://www.gaisler.com/cms4_5_3/index.php?option=com_content&task=view&id=149&Itemid=31
>>
>>
>> Jiri.
>>
>> Tapio Koskinen wrote:
>>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Re:  Leon3 compatible with LAN91C111?
  2007-03-29 16:23   ` Jiri Gaisler
@ 2007-03-29 23:32     ` Tapio Koskinen
  2007-03-30  6:27       ` Jiri Gaisler
  0 siblings, 1 reply; 7+ messages in thread
From: Tapio Koskinen @ 2007-03-29 23:32 UTC (permalink / raw)
  To: Jiri Gaisler; +Cc: ecos-discuss

Yes that is the driver I used. There were some problems with sw/hw 
co-operation. Also it was strange that endianess conversion wasn't 
needed even though Leon3 is big endian and LAN-controller little endian.

In my previous post I meant that there is no target for Leon3 with 
91C111, only Greth and Openeth (e.g. "ecosconfig new sparc_leon3_greth 
net").

Tapio

Jiri Gaisler kirjoitti:
> The package name is CYGPKG_DEVS_ETH_SMSC_LAN91CXX, in directory
> devs/eth/smsc/lan91cxx .
> 
> Jiri.
> 
> Tapio Koskinen wrote:
>> Hi Jiri,
>>
>> Yes, I have been using ecos-rep-1.0.7.tar.gz. However I only found
>> support for Greth and Openeth, not Lan91C111 (in configtool
>> Build->Templates).
>>
>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Re:  Leon3 compatible with LAN91C111?
  2007-03-29 23:32     ` Tapio Koskinen
@ 2007-03-30  6:27       ` Jiri Gaisler
  2007-04-13 11:36         ` Tapio Koskinen
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Gaisler @ 2007-03-30  6:27 UTC (permalink / raw)
  To: Tapio Koskinen, ecos-discuss


Tapio Koskinen wrote:
> Yes that is the driver I used. There were some problems with sw/hw
> co-operation. 

You also have to add CYGPKG_DEVS_ETH_SPARC_LEON3.

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

> 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?

Note also that the interrupt from the LAN91C111 device comes
through PIO pin 4. You can change this with configtool if your
hardware uses a different pin.

Jiri.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Re:  Leon3 compatible with LAN91C111?
  2007-03-30  6:27       ` Jiri Gaisler
@ 2007-04-13 11:36         ` Tapio Koskinen
  0 siblings, 0 replies; 7+ messages in thread
From: Tapio Koskinen @ 2007-04-13 11:36 UTC (permalink / raw)
  To: Jiri Gaisler; +Cc: ecos-discuss

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-04-13 11:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-18 19:19 [ECOS] Re: Leon3 compatible with LAN91C111? Jiri Gaisler
2007-03-19 14:06 ` HASAN HÜSEYIN YILMAZ
2007-03-29 16:12 ` Tapio Koskinen
2007-03-29 16:23   ` Jiri Gaisler
2007-03-29 23:32     ` Tapio Koskinen
2007-03-30  6:27       ` Jiri Gaisler
2007-04-13 11:36         ` Tapio Koskinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).