From: David Jander <david.jander@protonic.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] i.MX51: FEC: Cache coherency problem?
Date: Mon, 18 Jul 2011 17:18:36 +0200 [thread overview]
Message-ID: <20110718171836.67bfe605@archvile> (raw)
Hi all,
I am busy debugging a problem with the i.MX51 FEC ethernet driver, that
stopped working after upgrading u-boot. Before the upgrade I used
v2010.06-rc3, which worked fine.
I gave up on trying to find the difference beween the old version and this one
that broke it.... due to BSP issues, git bisecting seems a monumental task I
am not considering yet.
The funny part is that it seems to work fine if I disable data-caches!
With data caches enabled, it hangs in the following while loop in fec_send(),
at line 592:
...
584 /*
585 * Enable SmartDMA transmit task
586 */
587 fec_tx_task_enable(fec);
588
589 /*
590 * wait until frame is sent .
591 */
592 while (readw(&fec->tbd_base[fec->tbd_index].status) & FEC_TBD_READY) {
593 udelay(1);
594 }
...
If I change this code in the following way, the while loop exits successfully:
...
584 /*
585 * Enable SmartDMA transmit task
586 */
587 flush_cache(&fec->tbd_base[fec->tbd_index], 4);
588 fec_tx_task_enable(fec);
589 flash_dcache_all();
590
591 /*
592 * wait until frame is sent .
593 */
594 while (readw(&fec->tbd_base[fec->tbd_index].status) & FEC_TBD_READY) {
595 udelay(1);
596 }
...
Notice the cache flush calls at line 587 and 589. With these, sending
succeeds. The driver still hangs in receiving afterwards, but at least this
part seems to work. If I remove either of the two added lines, it stops
working again.
What is going on here? Why did this work with caches enabled before??
Best regards,
--
David Jander
Protonic Holland.
next reply other threads:[~2011-07-18 15:18 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 15:18 David Jander [this message]
2011-07-18 16:16 ` [U-Boot] i.MX51: FEC: Cache coherency problem? Aneesh V
2011-07-19 7:26 ` David Jander
2011-07-19 11:07 ` Matthias Weißer
2011-07-19 11:17 ` David Jander
2011-07-19 11:20 ` Wolfgang Denk
2011-07-19 12:10 ` David Jander
2011-07-20 6:29 ` David Jander
2011-07-20 8:56 ` Albert ARIBAUD
2011-07-20 9:21 ` David Jander
2011-07-20 10:29 ` Aneesh V
2011-07-20 11:31 ` David Jander
2011-07-20 12:05 ` Aneesh V
2011-07-19 11:19 ` Wolfgang Denk
2011-07-19 14:31 ` Matthias Weißer
2011-07-19 11:51 ` Aneesh V
2011-07-18 16:55 ` Stefano Babic
2011-07-19 7:44 ` David Jander
2011-07-19 8:21 ` Albert ARIBAUD
2011-07-19 8:37 ` David Jander
2011-07-19 8:43 ` Aneesh V
2011-07-19 8:58 ` David Jander
2011-07-19 9:11 ` Albert ARIBAUD
2011-07-19 11:50 ` Aneesh V
2011-07-19 11:42 ` Aneesh V
2011-07-19 9:05 ` Albert ARIBAUD
2011-07-19 14:36 ` J. William Campbell
2011-07-19 15:17 ` David Jander
2011-07-19 18:14 ` Anton Staaf
2011-07-19 20:11 ` J. William Campbell
2011-07-20 13:02 ` Albert ARIBAUD
[not found] ` <4E26DF9D.5070709@comcast.net>
[not found] ` <4E26E7AA.9070001@aribaud.net>
2011-07-20 15:36 ` J. William Campbell
2011-07-21 6:48 ` David Jander
2011-07-23 13:04 ` Albert ARIBAUD
2011-07-23 15:35 ` J. William Campbell
2011-07-20 8:37 ` Aneesh V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110718171836.67bfe605@archvile \
--to=david.jander@protonic.nl \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox