Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

TSE (Triple Speed Ethernet) MAC on uClinux with MMU

Hello all,

I am having some difficulties with the TSE MAC in uClinux with MMU.

I am working on Terasic DE4 board, with "unstable-nios2mmu" in linux-2.6 and "trunk" in uClinux-dist. All folders are updated with the update script.

I am able to boot the uclinux correctly with my base system, having a ddr2 controller.

My next step is to add the tse mac, sgdma-tx, sgdma-rx and descriptor memory for networking.

In uClinux configuration (#make menuconfig), I check the Marvell Phy Support and TSE Drivers (SLS).

The uClinux compiles and boots, however when I check the networking devices (#ifconfig), the only device is lo; there is no eth0 device.

I made no changes on arch/nios2/include/asm/nios.h. Do I need to define a new variable? What if I have multiple TSE instances, then?

I don't blame it on my sopc system, at the moment, but more on the configuration I have in uClinux.

Any ideas will be appreciated.

Kind Regards,

Turhan

16 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Now that the system works with one TSE, I try to have multiple TSE instances. The first one initializes correctly during the boot, but the others yield

    WARNING: at nios2-linux/linux-2.6/fs/sysfs/dir.c:455 sysfs_add_one+0xb0/0xe0()

    sysfs: cannot create duplicate filename '/devices/virtual/mdio_bus/0'

    Modules linked in:...

    I understand that the TSEs are registered with the same name, but I cannot find out how to prevent that.

    Thanks.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Did you set a different mii-id in the device tree for the second TSE instance? Unfortunately there are some shortcomings in the driver wrt accessing the PHY from two TSEs via the same MDIO interface.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks Tobias, that solved the problem. I thought all devices were connected to the same mdio interface, but that was not the case. Now things work correctly.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello again,

    It turns out I was a little too quick to celebrate multiple port functioning correctly. They all function, but not at the same time. I have all eth0, eth1, eth2, and eth3 "installed" at the boot time. ifconfig'ing one port up, and other ports down ensures that one given port will function correctly. However, if multiple ports are up'ped, only the one which has been up'ped the earliest will work. In order to test the functionality I use "ping" command. All 4 clients that are attached to the ports have different IP's (manually set) and the same netmask.

    I cannot make sure if this is a system/uClinux related question, or more about my limited linux knowledge.

    Any ideas that pop to your mind? Any suggestions?

    Thanks.

    PS: On this link (http://forums.freescale.com/t5/other-microcontrollers/mpc8360e-one-ethernet-device-works-two-doesn-t-work/td-p/25038) the same problem is experienced because of some incorrectly set constants in marvell.c linux/drivers/net/phy. However, these constant names are not available any more.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    Try with ping -I or ifconfig eth(x) down in order to get only on eth device up.

    Regards,

    Franck.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you very much Franck.

    "#ping -I eth(x) IP" did the trick. This means things are OK in terms of the sopc system and uClinux compilation, but there are some problems in terms of networking settings.

    I have already been doing "#ifconfig eth(x) down" for all the other ports, so that the up'ped one will function correctly. But this is not what I want. I need all ports up'ped.

    Now I will see if my multi-ethernet client-server code will work correctly.

    I think I will need "-I" kind of a trick for the bind function. Let's see... =)

    Thanks again.