From: Tim Bowman <tbowman@emware.com>
To: Eric <ebrower@usa.net>, mtd mailing list <mtd@infradead.org>
Subject: Re: [RPX Classic/Lite and byte ordering]
Date: Tue, 03 Apr 2001 16:31:20 -0600 [thread overview]
Message-ID: <3ACA4F38.908FA4C7@emware.com> (raw)
In-Reply-To: 20010403024521.10444.qmail@nwcst285.netaddress.usa.net
Tim Bowman <tbowman@emware.com> wrote:
> The rpxlite layer seems to be using memcpy_fromio, writeb, writew, etc,
> not __raw_writeb. Should these be replaced with the raw versions?
Yes, in any case they should be using the __raw equivalents to force
untranslated byte ordering. This allows the ENDIAN defines to work
appropriately. I can't say if this is your problem, but you should
go 'raw' at the very least to be idiomatic with the other drivers.
-----------------
Ta-Da.... I fixed the problem in include/asm-ppc/io.h:
...
#define readb(addr) in_8((volatile u8 *)(addr))
#define writeb(b,addr) out_8((volatile u8 *)(addr), (b))
#if defined(CONFIG_APUS) || defined(RPXCLASSIC)
#define readw(addr) (*(volatile u16 *) (addr))
#define readl(addr) (*(volatile u32 *) (addr))
#define writew(b,addr) ((*(volatile u16 *) (addr)) = (b))
#define writel(b,addr) ((*(volatile u32 *) (addr)) = (b))
#else
#define readw(addr) in_le16((volatile u16 *)(addr))
#define readl(addr) in_le32((volatile u32 *)(addr))
#define writew(b,addr) out_le16((volatile u16 *)(addr),(b))
#define writel(b,addr) out_le32((volatile u32 *)(addr),(b))
#endif
...
Everything works great now, in fact so great that I blew away the RPX
utility with a jffs file system and rendered my board useless. Has
anyone re-programmed the flash via BDM on these boards? I wonder what
hardware and software works the best.
This solution doesn't explain why some of you haven't had this problem.
Maybe the flash really is wired up two different ways on RPX boards...
Thanks a lot for everybody's help. -T
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
next prev parent reply other threads:[~2001-04-03 22:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-03 2:45 [RPX Classic/Lite and byte ordering] Eric
2001-04-03 22:31 ` Tim Bowman [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-03-30 19:59 Eric
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=3ACA4F38.908FA4C7@emware.com \
--to=tbowman@emware.com \
--cc=ebrower@usa.net \
--cc=mtd@infradead.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