From: Holly Gates <hgates@eink.com>
To: linux-mtd@lists.infradead.org
Subject: Smartmedia block mapping
Date: Tue, 22 Jul 2003 16:05:08 -0400 [thread overview]
Message-ID: <3F1D98F4.8060904@eink.com> (raw)
Hello all, I'm hoping someone can give me some advice on a smartmedia
issue. Here is the deal: I'm working on a display controller based on an
FPGA, some lookup table data is stored on a smartmedia card. The FPGA
just pulls data from the card sector by sector in incrementing order.
The cards I am using are samsung 32MB, and I was kind of hoping to find
some cards with no bad blocks in the area I care about, but we could
write VHDL to skip bad blocks if need be.
I've been writing the card using a linux laptop running redhat with a
PQI USB smartmedia adapter which just worked when I plugged it in, by
executing:
sh> dd if=table.bin of=/dev/sda bs=512c count=64000
When I read back the card using dd, all the data is in order. However
the problem comes when I read the card with the FPGA. First I noticed
that my binary file didn't show up until about sector 0x42, and also
occasionally data would come out that was supposed to be written
thousands of sectors away. Same thing happens if I do the
writing/reading using a PCMCIA/smartmedia adapter.
Having done all the work so far with just the data sheet, I started
poking around the web and it seems like I am running into the
logical->physical mapping inherent in most uses of smartmedia. However I
don't want this mapping since it would be a major pain in the ass to
build and maintain a RAM translation table in the FPGA part of the
system. I'm still not sure exactly how the translation table is made and
stored either; is it on the card somewhere? Maybe in those first 0x42
sectors?
Maybe I could see using the mapping table if it was on the card
somewhere, but ideally I could just write the binary file to the sectors
in true, physical, incrementing order. Anyone know of a utility I could
use to do this?
One thing I tried already was using the "raw" utility:
sh> raw /dev/raw/raw1 /dev/sda
and then using a C program to read out the sectors, however the raw
utility must be plugging in to a level that is above the mapping since
when I watch what sectors the computer requests from the card on a logic
analyzer, it still just jumps around for no apparent reason.
I suppose I could build a parallel port adapter and write some software
or something, but that is annoying since I know the computer is capable
of doing what I want if I could get at the right layer of the driver
stack...
Thanks for any help! (Please cc me on any reply since I am not subscribed)
-Holly Gates
next reply other threads:[~2003-07-22 20:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-22 20:05 Holly Gates [this message]
2003-07-22 20:17 ` Smartmedia block mapping David Woodhouse
2003-07-22 20:34 ` Holly Gates
2003-07-24 22:27 ` Charles Manning
2003-07-24 22:33 ` Matthew Dharm
2003-07-24 22:47 ` Charles Manning
2003-07-24 22:57 ` Matthew Dharm
2003-07-25 0:26 ` David Woodhouse
2003-07-22 21:11 ` Thomas Gleixner
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=3F1D98F4.8060904@eink.com \
--to=hgates@eink.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.