U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] FEC in mcf52x2
@ 2005-04-04 23:06 wroberts1 at cox.net
  2005-04-05 16:19 ` Zachary Landau
  0 siblings, 1 reply; 6+ messages in thread
From: wroberts1 at cox.net @ 2005-04-04 23:06 UTC (permalink / raw)
  To: u-boot

I was trying to do an tftp transfer from u-boot-1.1.2 on an 
mcf5282.  The fec driver in there does not seem to be
functioning.   Is this driver functional on the mcf5272c3?

Also keep in mind I had to put in sdram init and other initialization like pin assignment register settings,
because this is executing from the end of sdram.

The FEC appears to not be running since the transmitter never becomes ready:

-> tftp 10000 image.bin
Eth Addrs: 00:09:91:1f:b3:44
TFTP from server 10.32.48.37; our IP address is 10.32.48.199
Filename 'image.bin'.
Load address: 0x10000
Loading: TX timeout
fec.c[124] eth_send: cycles: 100    status: 8c00  retry cnt: 0
T TX timeout
fec.c[124] eth_send: cycles: 100    status: ac00  retry cnt: 0

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

* [U-Boot-Users] FEC in mcf52x2
  2005-04-04 23:06 wroberts1 at cox.net
@ 2005-04-05 16:19 ` Zachary Landau
  2005-04-05 16:28   ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Zachary Landau @ 2005-04-05 16:19 UTC (permalink / raw)
  To: u-boot

On Apr 4, 2005 7:06 PM, wroberts1 at cox.net <wroberts1@cox.net> wrote:
> I was trying to do an tftp transfer from u-boot-1.1.2 on an
> mcf5282.  The fec driver in there does not seem to be
> functioning.   Is this driver functional on the mcf5272c3?

The FEC structure in immap_5282.h is wrong.  Try this:

typedef struct fec {
    uint    res1;
    uint    fec_ievent;
    uint    fec_imask;
    uint    res2;
    uint    fec_r_des_active;
    uint    fec_x_des_active;
    uint    res3[3];
    uint    fec_ecntrl;
    uint    res4[6];
    uint    fec_mii_data;
    uint    fec_mii_speed;

    uint    res5[7];
    uint    fec_mibc;
    uint    res6[7];
    uint    fec_r_cntrl;
    uint    res7[15];
    uint    fec_x_cntrl;
    uint    res8[7];
    uint    fec_addr_low;   uint    fec_addr_high;
    uint    fec_opd;
    uint    res9[10];
    uint    fec_ihash_table_high;
    uint    fec_ihash_table_low;

    uint    fec_ghash_table_high;
    uint    fec_ghash_table_low;
    uint    res10[7];
    uint    fec_tfwr;
    uint    res11;
    uint    fec_r_bound;
    uint    fec_r_fstart;
    uint    res12[11];
    uint    fec_r_des_start;
    uint    fec_x_des_start;
    uint    fec_r_buff_size;
} fec_t;



-- 
Zachary P. Landau <kapheine@gmail.com>

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

* [U-Boot-Users] FEC in mcf52x2
  2005-04-05 16:19 ` Zachary Landau
@ 2005-04-05 16:28   ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2005-04-05 16:28 UTC (permalink / raw)
  To: u-boot

In message <a04f56da050405091976426543@mail.gmail.com> you wrote:
>
> The FEC structure in immap_5282.h is wrong.  Try this:

Please submit a proper patch.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
No question is too silly to ask. Of course, some  questions  are  too
silly to to answer...  - L. Wall & R. L. Schwartz, _Programming Perl_

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

* [U-Boot-Users] FEC in mcf52x2
@ 2005-04-05 18:31 wroberts1 at cox.net
  2005-04-05 18:55 ` Zachary Landau
  0 siblings, 1 reply; 6+ messages in thread
From: wroberts1 at cox.net @ 2005-04-05 18:31 UTC (permalink / raw)
  To: u-boot

Yea that fec_t structure works fine. However the FEC
driver was setting RCR[MAX_FL] to zero, so it was only
getting rx frame length violation. I had to do this:

#define OPT_FRAME_SIZE (PKT_MAXBUF_SIZE << 16)

    fecp->fec_r_cntrl = OPT_FRAME_SIZE | FEC_RCNTRL_MII_MODE | FEC_RCNTRL_DRT;

its fast enough.  takes under four seconds to transfer
this 1.8Mbyte image.

> From: Zachary Landau <kapheine@gmail.com>
> Date: 2005/04/05 Tue PM 12:19:45 EDT
> To: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] FEC in mcf52x2
> 
> On Apr 4, 2005 7:06 PM, wroberts1 at cox.net <wroberts1@cox.net> wrote:
> > I was trying to do an tftp transfer from u-boot-1.1.2 on an
> > mcf5282.  The fec driver in there does not seem to be
> > functioning.   Is this driver functional on the mcf5272c3?
> 
> The FEC structure in immap_5282.h is wrong.  Try this:
> 
> typedef struct fec {
>     uint    res1;
>     uint    fec_ievent;
>     uint    fec_imask;
>     uint    res2;
>     uint    fec_r_des_active;
>     uint    fec_x_des_active;
>     uint    res3[3];
>     uint    fec_ecntrl;
>     uint    res4[6];
>     uint    fec_mii_data;
>     uint    fec_mii_speed;
> 
>     uint    res5[7];
>     uint    fec_mibc;
>     uint    res6[7];
>     uint    fec_r_cntrl;
>     uint    res7[15];
>     uint    fec_x_cntrl;
>     uint    res8[7];
>     uint    fec_addr_low;   uint    fec_addr_high;
>     uint    fec_opd;
>     uint    res9[10];
>     uint    fec_ihash_table_high;
>     uint    fec_ihash_table_low;
> 
>     uint    fec_ghash_table_high;
>     uint    fec_ghash_table_low;
>     uint    res10[7];
>     uint    fec_tfwr;
>     uint    res11;
>     uint    fec_r_bound;
>     uint    fec_r_fstart;
>     uint    res12[11];
>     uint    fec_r_des_start;
>     uint    fec_x_des_start;
>     uint    fec_r_buff_size;
> } fec_t;
> 
> 
> 
> -- 
> Zachary P. Landau <kapheine@gmail.com>
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 

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

* [U-Boot-Users] FEC in mcf52x2
  2005-04-05 18:31 [U-Boot-Users] FEC in mcf52x2 wroberts1 at cox.net
@ 2005-04-05 18:55 ` Zachary Landau
  2005-04-05 19:05   ` NZG
  0 siblings, 1 reply; 6+ messages in thread
From: Zachary Landau @ 2005-04-05 18:55 UTC (permalink / raw)
  To: u-boot

On Apr 5, 2005 2:31 PM, wroberts1 at cox.net <wroberts1@cox.net> wrote:
> Yea that fec_t structure works fine. However the FEC
> driver was setting RCR[MAX_FL] to zero, so it was only
> getting rx frame length violation. I had to do this:
> 
> #define OPT_FRAME_SIZE (PKT_MAXBUF_SIZE << 16)
> 
>     fecp->fec_r_cntrl = OPT_FRAME_SIZE | FEC_RCNTRL_MII_MODE | FEC_RCNTRL_DRT;
> 
> its fast enough.  takes under four seconds to transfer
> this 1.8Mbyte image.

Ahh yeah, I had to change that too.  I have a bunch of little changes
to the 5282 code.  Unfortunately a lot of it was done quickly and
needs to be cleaned up before I can submit a patch.  (I did submit a
couple smaller ones at some point, though).  If you search the mailing
list archives for 'fec structure errors?' (which probably would have
been a good idea from the start) you'll see a post from me with a url
to a u-boot tree with my 5282 changes.  NGZ may have also posted his
5282 changes at some point, I can't remember.

-- 
Zachary P. Landau <kapheine@gmail.com>

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

* [U-Boot-Users] FEC in mcf52x2
  2005-04-05 18:55 ` Zachary Landau
@ 2005-04-05 19:05   ` NZG
  0 siblings, 0 replies; 6+ messages in thread
From: NZG @ 2005-04-05 19:05 UTC (permalink / raw)
  To: u-boot

>NGZ may have also posted his
> 5282 changes at some point, I can't remember.
I haven't posted anything yet, I'm still testing and my fec is still broke
I'm trying to keep things unified with Zac's code and release once everything 
is functional.

NZG.

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

end of thread, other threads:[~2005-04-05 19:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-05 18:31 [U-Boot-Users] FEC in mcf52x2 wroberts1 at cox.net
2005-04-05 18:55 ` Zachary Landau
2005-04-05 19:05   ` NZG
  -- strict thread matches above, loose matches on Subject: below --
2005-04-04 23:06 wroberts1 at cox.net
2005-04-05 16:19 ` Zachary Landau
2005-04-05 16:28   ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox