All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Dubov <oakad@yahoo.com>
To: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Smartmedia/xd card support - request for comments
Date: Thu, 17 Apr 2008 01:50:33 -0700 (PDT)	[thread overview]
Message-ID: <466372.69780.qm@web36702.mail.mud.yahoo.com> (raw)

I've implemented, with generous help from JMicron, a native support for Smartmedia/xD picture card
media. Currently, only JMicron backend is available, but TI expressed some interest in this too,
so TI Flashmedia backend may soon follow.

Smartmedia cards are quite akin to the dumb flash chips, but they have their quirks that put them
aside as a separate media type.

I thought of the following merge structure:

include/linux/
    flash_bd.h
    xd_card.h

drivers/xd_card/
    xd_card_blk.c - protocol implementation
    xd_card_ecc.c - software version of Smartmedia ecc algorithm
    jmb38x_xd.c   - JMicron backend

lib/
    flash_bd.c    - generic FTL implementation

A few more words about flash_bd component. Legacy MemoryStick and SmartMedia cards require direct
management of flash memory. I studied the mtd layer, but found it to be not very helpful, so I
wrote my own FTL module.

Its requirements were:
1. Subsystem independent. For a given byte range it will produce a sequence of generic opcodes
needed to read or write such a range to/off the flash memory, assuming page grained access. This
is used not only for block device operations, but also for metadata retrieval.
2. No FTL related metadata is stored to the flash (as nothing can be assumed about other
readers/writers in interchange media formats).

My FTL implements random block replacement policy, as there's no spec-mandated way to maintain
wear counts on Smartmedia or Memorystick. It also supports block allocation zoning, as required by
these formats.

Current version will always issue whole block writes (no individual page programming). I,in fact,
implemented a version which tracks partially filled blocks, but experiments with some Olympus xd
cards triggered a lot of funny hardware problems with this, and then, it appeared that latest
version of xd card spec specifically disallows partial block writes.

MemoryStick spec does allow individual page writes, but so did an older version of xd card spec.
Given this, I decided to start with simpler version of FTL for now and replace it with a more
complex one if need arises.



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

             reply	other threads:[~2008-04-17  8:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17  8:50 Alex Dubov [this message]
2008-04-17  9:01 ` Smartmedia/xd card support - request for comments Ben Dooks
2008-04-17  9:11   ` Alex Dubov
2008-04-17 13:10     ` Andy Lutomirski
2008-04-17 13:36       ` Arnd Bergmann
2008-04-17 13:38     ` Thomas Gleixner
2008-04-17 14:07       ` Jörn Engel
2008-04-17 19:11         ` Thomas Gleixner
2008-04-17 21:21           ` Jörn Engel
2008-04-18  8:47             ` Alex Dubov
2008-04-18  9:35               ` Thomas Gleixner
2008-04-19  2:49                 ` Alex Dubov
2008-04-19  5:56                   ` Thomas Gleixner
2008-04-18 14:00               ` Jörn Engel
2008-04-19  3:05                 ` Alex Dubov
2008-04-19  6:37                   ` Thomas Gleixner
2008-04-19 16:35                     ` Jörn Engel
2008-04-20  2:25                     ` Alex Dubov
2008-04-17 13:35 ` Thomas Gleixner
2008-04-17 14:19 ` Jörn Engel
  -- strict thread matches above, loose matches on Subject: below --
2008-04-19  8:31 matthieu castet
2008-04-20 16:01 ` Jörn Engel
2008-04-21  1:33   ` Alex Dubov

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=466372.69780.qm@web36702.mail.mud.yahoo.com \
    --to=oakad@yahoo.com \
    --cc=linux-kernel@vger.kernel.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.