[uClinux-dev] FEC freezes on m5235evb from flash

Stefano Caioli caioli at infstudio.it
Wed Oct 19 04:35:58 EDT 2005


Hi Greg,

i tried the patch but nothing happens.
The boot process just stops again on the same istruction.
However, i wish to tell you about my test:
If i use dbug loading the image in ram at 0x20000 with DN command the FEC works fine.
If i copy the image in flash at 0xff40000 (i.e. after dbug) then
when dbug starts i copy from flash to ram at 0x20000 with the console command BM
i have the same problem the FEC DOESN'T work.
This is very strange , it looks like somewhat passing the uClinux image trought the
flash altering the FEC behavior!
If i use colilo i get the same exact problem.
After several tries, my system has sometime booted giving the
message FEC: No PHY device found, but it seems to work!
It looks like a random initialization of some FEC register.
Just for the record: same behavior with the latest distro 20051014.
I keep trying!
Regards,

             Stefano.



On Wed, 19 Oct 2005 11:45:06 +1000, Greg Ungerer wrote
> Hi Stefano,
> 
> Looking at the early setting of fec_r_des_active in fec_enet_init
> I would say that is probably wrong (since the descriptors themselves
> have not been initialized yet).
> 
> Can you try this patch and see if it works any better:
> 
> --- drivers/net/fec.c   26 Sep 2005 07:04:28 -0000      1.43
> +++ drivers/net/fec.c   19 Oct 2005 01:44:14 -0000
> @@ -2164,7 +2164,6 @@
>          fecp->fec_hash_table_low = 0;
>          fecp->fec_r_buff_size = PKT_MAXBLR_SIZE;
>           fecp->fec_ecntrl = 2;
> -        fecp->fec_r_des_active = 0x01000000;
> 
>          /* Set the Ethernet address.  If using multiple Enets on the 8xx,

>           * this needs some work to get unique addresses.
> @@ -2253,6 +2252,7 @@
>          */
>          fecp->fec_r_des_start = __pa((uint)(fep->rx_bd_base));
>          fecp->fec_x_des_start = __pa((uint)(fep->tx_bd_base));
> +       fecp->fec_r_des_active = 0x01000000;
> 
>          /* Install our interrupt handlers. This varies depending on
>           * the architecture.
> 
> Regards
> Greg
> 
> Greg Ungerer wrote:
> > Stefano Caioli wrote:
> >> Ok, i've done some trivial debug an i found that the problem is in
> >> file fec.c function fec_enet_init.
> >> The system freezes when trying the instruction:
> >>
> >> fecp->fec_r_des_active = 0x01000000;
> >>
> >> Hope this could help  a solution.
> > 
> > That setting is done in a number of places, which exact one
> > do you think is causing your problem?
> > 
> > Regards
> > Greg
> > 
> > 
> > 
> > 
> >> On Tue, 18 Oct 2005 16:44:20 +1000, Greg Ungerer wrote
> >>
> >>> Hi Stefano,
> >>>
> >>> Stefano Caioli wrote:
> >>>
> >>>> Hi all,
> >>>> I'm trying to boot uClinux from flash, but on FEC init the system 
> >>>> freezes.
> >>>> If i execute the same image from ram it works.
> >>>> Any suggestions?
> >>>> Thanks.
> >>>>
> >>>>             Stefano.
> >>>>
> >>>> This is the output:
> >>>>
> >>>> uClinux/COLDFIRE(m523x)
> >>>> COLDFIRE port done by Greg Ungerer, gerg at snapgear.com
> >>>> Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
> >>>> Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate 
> >>>> Sujjavanich)<7>O6Built 1
> >>>> zonelists
> >>>> Kernel command line: root=1f00
> >>>> PID hash table entries: 128 (order: 7, 2048 bytes)
> >>>> Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
> >>>> Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
> >>>> Memory available: 14616k/16384k RAM, 0k/0k ROM (866k kernel code, 
> >>>> 147k data)
> >>>> Mount-cache hash table entries: 512
> >>>> NET: Registered protocol family 16
> >>>> i8042.c: i8042 controller self test timeout.
> >>>> ColdFire internal UART serial driver version 1.00
> >>>> ttyS0 at 0x40000200 (irq = 77) is a builtin ColdFire UART
> >>>> ttyS1 at 0x40000240 (irq = 78) is a builtin ColdFire UART
> >>>> io scheduler noop registered
> >>>> io scheduler cfq registered
> >>>> RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
> >>>> FEC ENET Version 0.2
> >>>
> >>>
> >>> When you RAM boot what is the next kernel subsystem to print
> >>> out messages?
> >>>
> >>> If it is MTD then it may be that the MTD flash probe is killing
> >>> your kernel running from flash...
> >>>
> >>> Regards
> >>> Greg
> >>>
> >>> ------------------------------------------------------------------------
> >>> Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg at snapgear.com
> >>> SnapGear -- a CyberGuard Company            PHONE:       +61 7 3435 2888
> >>> 825 Stanley St,                             FAX:         +61 7 3891 3630
> >>> Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
> >>> _______________________________________________
> >>> uClinux-dev mailing list
> >>> uClinux-dev at uclinux.org
> >>> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> >>> This message was resent by uclinux-dev at uclinux.org
> >>
> >>
> >>
> >>
> >> **********************************
> >>
> >> InfStudio
> >> Consulenza Informatica e Elettronica
> >> Via Pisana 267A/r
> >> 50142 Firenze
> >> http://www.infstudio.it/
> >>
> >> _______________________________________________
> >> uClinux-dev mailing list
> >> uClinux-dev at uclinux.org
> >> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> >> This message was resent by uclinux-dev at uclinux.org
> >>
> >
> 
> -- 
> ------------------------------------------------------------------------
> Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg at snapgear.com
> SnapGear -- a CyberGuard Company            PHONE:       +61 7 3435 2888
> 825 Stanley St,                             FAX:         +61 7 3891 3630
> Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org


**********************************

InfStudio
Consulenza Informatica e Elettronica
Via Pisana 267A/r
50142 Firenze
http://www.infstudio.it/




More information about the uClinux-dev mailing list