linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Weird 5200/mtd-ram problem
@ 2009-05-20 14:13 Albrecht Dreß
  2009-05-20 14:23 ` Gary Thomas
  2009-05-20 20:01 ` Wolfram Sang
  0 siblings, 2 replies; 10+ messages in thread
From: Albrecht Dreß @ 2009-05-20 14:13 UTC (permalink / raw)
  To: linuxppc-dev

Hi all,

I ran into a weird problem when I tried to access a static (NV) ram attache=
d to the localbus of a '5200 using Wolfram's mtd-ram OF driver (on a stock =
2.6.29.1 kernel).  The 512k ram chip is connected in 16-bit mode to cs1.  t=
he of entry reads

nvram@1,0 {
=09compatible =3D "mtd-ram";
=09reg =3D <1 0x0 0x00080000>;      // 512 kB
=09bank-width =3D <2>;
=09device-width =3D <2>;
=09#size-cells =3D <1>;
=09#address-cells =3D <1>;
=09};

For the test I created a "pattern file" which is filled with the unsigned l=
ong 0x0055aaff.  Using the Abatron BDI3000, I can write the pattern file to=
 the ram and re-read it without problems.  The same applies to u-boot (writ=
e ram via tftp, dump contents).

In Linux, when I write the file to /dev/mtdx, the last dword of each block =
is broken, e.g. when running "dd if=3Dpattern of=3D/dev/mtd5 bs=3D512" the =
dword's at offset 0x1fc, 0x3fc, ... are 0x0000aaaa (instead of 0x0055aaff),=
 if I use bs=3D1024 the dwords at 0x3fc, 0x7fc, ... show this value, if I u=
se bs=3D4096 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 sho=
uld be fine, as u-boot uses the same as Linux.

Any idea what goes wrong here?  I guessed I missed something in the LPB set=
up...

Thanks in advance,
Albrecht.

Arcor.de Gaming Area - kostenfrei daddeln bis der Arzt kommt!
Jetzt checken und aus =FCber 80 Spielen w=E4hlen!
http://www.arcor.de/footer-gaming/

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

end of thread, other threads:[~2009-05-28  3:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-05-25 21:47     ` Wolfram Sang
2009-05-27 19:54       ` [Solved/Patch Question] " Albrecht Dreß
2009-05-28  3:10         ` Jon Smirl

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).