linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: "Albrecht Dreß" <albrecht.dress@arcor.de>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Weird 5200/mtd-ram problem
Date: Mon, 25 May 2009 20:11:39 +0200	[thread overview]
Message-ID: <20090525181140.01DB1832E416@gemini.denx.de> (raw)
In-Reply-To: <1243273283.3328.0@antares>

Dear Albrecht =?iso-8859-1?b?RHJl3w==?=,

In message <1243273283.3328.0@antares> you wrote:
>
> Thanks for youre help, and sorry for the late reply - I've been on  
> vacation...

Hally you...

> 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?

I remember some nasty problems with memcpy*(),  especially  with  un-
aligned  accesses  over the LocalPlus Bus. I'm not sure if fixes ever
made it into 2.6; the only commit that might be related is 6989f5122f
"fec: do not use memcpy on physical addresses", but this doesn't  got
into details about the casue.

Please see here for an old (2.4.25) patch for this problem - maybe
it's worth a try on your system:

http://git.denx.de/?p=linuxppc_2_4_devel.git;a=commit;h=222bd702a59efb22bf66937f6ac844ed7327fd1a

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
If you're not part of the solution, you're part of the problem.

  reply	other threads:[~2009-05-25 18:11 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ß
2009-05-25 18:11     ` Wolfgang Denk [this message]
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=20090525181140.01DB1832E416@gemini.denx.de \
    --to=wd@denx.de \
    --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 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).