From: Gary Thomas <gary@mlbassoc.com>
To: "Albrecht Dreß" <albrecht.dress@arcor.de>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Weird 5200/mtd-ram problem
Date: Wed, 20 May 2009 13:59:26 -0600 [thread overview]
Message-ID: <4A14611E.4000003@mlbassoc.com> (raw)
In-Reply-To: <1242848213.3432.0@antares>
Albrecht Dreß wrote:
> Am 20.05.09 16:23 schrieb(en) Gary Thomas:
>> > In Linux, when I write the file to /dev/mtdx, the last dword of each
>> block is broken, e.g. when running "dd if=pattern of=/dev/mtd5 bs=512"
>> the dword's at offset 0x1fc, 0x3fc, ... are 0x0000aaaa (instead of
>> 0x0055aaff), if I use bs=1024 the dwords at 0x3fc, 0x7fc, ... show
>> this value, if I use bs=4096 the dword at 0xffc shows this value,
>> etc. I looked at the CS/WR lines with a scope, and I couldn't see
>> anything special. The timing should be fine, as u-boot uses the same
>> as Linux.
>> >
>> > Any idea what goes wrong here? I guessed I missed something in the
>> LPB setup...
>>
>> Check your cache setup - the BDI is most certainly not accessing this
>> via the Data cache whereas Linux probably will be.
>
> Hmm, yes - I didn't touch the vanilla Lite5200B Linux setup there, which
> has a flash chip at cs1...
>
> If it is really a cache problem (I'm away now from my test board) -
> isn't a sync sufficient after doing the copy to the external ram
> (lpb/cs1)? What is the proper approach for devices attached to the
> localbus?
Based on the behaviour, it's probably a timing problem with
multi-beat transfers. When the PowerPC does cache flushes,
the chip activity is very different than the single beat accesses
used by the BDI.
Try to access this without using the cache. If it works properly
then you'll need to look at the timing setup (the local bus registers)
to see why it fails with the multi-beat accesses.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
next prev parent reply other threads:[~2009-05-20 19:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 14:13 Weird 5200/mtd-ram problem Albrecht Dreß
2009-05-20 14:23 ` Gary Thomas
2009-05-20 19:36 ` Albrecht Dreß
2009-05-20 19:59 ` Gary Thomas [this message]
2009-05-20 20:01 ` Wolfram Sang
2009-05-25 17:41 ` Albrecht Dreß
2009-05-25 18:11 ` Wolfgang Denk
2009-05-25 21:47 ` Wolfram Sang
2009-05-27 19:54 ` [Solved/Patch Question] " Albrecht Dreß
2009-05-28 3:10 ` Jon Smirl
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=4A14611E.4000003@mlbassoc.com \
--to=gary@mlbassoc.com \
--cc=albrecht.dress@arcor.de \
--cc=linuxppc-dev@ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.