From: Joshua Lamorie <jpl@xiphos.ca>
To: linux-mtd@lists.infradead.org
Subject: Re: JFFS2 on big-endian system, 8-bit wide flash on 32-bit bus
Date: Thu, 15 Apr 2004 00:41:46 -0400 [thread overview]
Message-ID: <1082004106.32004.47.camel@roadie.xiphos.ca> (raw)
In-Reply-To: <1081995604.30866.20.camel@roadie.xiphos.ca>
Well, I've found a fix, but it's a bit of a kludge, and I don't know if
there is a more proper way. I kinda think that changing something in
the kernel is rather drastic, but anyway...
The block device makes all of the access through cfi_amdstd_read which
will then call the map->copy_from function. This gets mapped through to
a straight memcpy, with no respect paid to the buswidth of the flash
device. So, I added a little switch. Here is the code I'm now using in
drivers/mtd/maps/physmap.c
void physmap_copy_from(struct map_info *map, void *to, unsigned long
from, ssize_t len)
{
int i;
if(map->buswidth == 1){
for(i=0;i<len;i++){
((__u8 *)to)[i] = physmap_read8(map,from+i);
}
}else
memcpy_fromio(to, map->map_priv_1 + from, len);
}
Is this a gross hack? Should I be paying attention to endianness?
Anyway.. it seems to be working so far. It's just soooo slow! (my
fault).
Now if I can get the root-filesystem there.
Joshua
--
Joshua Lamorie jpl@xiphos.ca
Space Systems 514-848-9640 ext. 277
Xiphos Technologies Inc. 514-848-9644 (fax)
prev parent reply other threads:[~2004-04-15 4:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-15 2:20 JFFS2 on big-endian system, 8-bit wide flash on 32-bit bus Joshua Lamorie
2004-04-15 4:41 ` Joshua Lamorie [this message]
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=1082004106.32004.47.camel@roadie.xiphos.ca \
--to=jpl@xiphos.ca \
--cc=linux-mtd@lists.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