linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: linuxppc-dev@ozlabs.org
Subject: Re: Weird 5200/mtd-ram problem
Date: Mon, 25 May 2009 19:41:14 +0200	[thread overview]
Message-ID: <1243273283.3328.0@antares> (raw)
In-Reply-To: <20090520200135.GB13287@pengutronix.de> (from w.sang@pengutronix.de on Wed May 20 22:01:35 2009)

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

Hi Gary & Wolfram:

Thanks for youre help, and sorry for the late reply - I've been on  
vacation...

Am 20.05.09 21:59 schrieb(en) Gary Thomas:
> Try to access this without using the cache.

Unfortunately, this is not cache related - I switched the dcache off  
completely - same results.

Am 20.05.09 22:01 schrieb(en) Wolfram Sang:
> Does it work with byte, word and long accesses?

A word or long copy of 0x0055aaff with U-Boot works fine, but a byte  
copy filled the whole ram with 0x0000aaaa.  The reason is apparently  
that the chip is attached to the local bus in 16-bit mode, which is  
incompatible with byte accesses.  However, the Local Bus doesn't  
provide "low byte" or "high byte" indicators in non-muxed mode.  How is  
this supposed to work then?

For the mtd driver, I tracked down the problem via mapram_write() (in  
drivers/mtd/chips/map_ram.c) down to the call of map_copy_to() which is  
actually inline_map_copy_to(), which in turn calls memcpy_toio().  I  
*think* this is _memcpy_toio() in arch/powerpc/kernel/io.c, which  
copies all data in long (4-byte) moves, except for the last 4 bytes.  I  
guess I have to write my own copy function which respects the fact that  
byte writes actually must be a read word - modify - write word  
sequence, right?

Thanks, Albrecht.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2009-05-25 17:41 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
2009-05-20 20:01 ` Wolfram Sang
2009-05-25 17:41   ` Albrecht Dreß [this message]
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=1243273283.3328.0@antares \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).