1. 25 5月, 2011 6 次提交
  2. 25 3月, 2011 1 次提交
  3. 12 8月, 2010 1 次提交
    • A
      mmc: add erase, secure erase, trim and secure trim operations · dfe86cba
      Adrian Hunter 提交于
      SD/MMC cards tend to support an erase operation.  In addition, eMMC v4.4
      cards can support secure erase, trim and secure trim operations that are
      all variants of the basic erase command.
      
      SD/MMC device attributes "erase_size" and "preferred_erase_size" have been
      added.
      
      "erase_size" is the minimum size, in bytes, of an erase operation.  For
      MMC, "erase_size" is the erase group size reported by the card.  Note that
      "erase_size" does not apply to trim or secure trim operations where the
      minimum size is always one 512 byte sector.  For SD, "erase_size" is 512
      if the card is block-addressed, 0 otherwise.
      
      SD/MMC cards can erase an arbitrarily large area up to and
      including the whole card.  When erasing a large area it may
      be desirable to do it in smaller chunks for three reasons:
      
          1. A single erase command will make all other I/O on the card
             wait.  This is not a problem if the whole card is being erased, but
             erasing one partition will make I/O for another partition on the
             same card wait for the duration of the erase - which could be a
             several minutes.
      
          2. To be able to inform the user of erase progress.
      
          3. The erase timeout becomes too large to be very useful.
             Because the erase timeout contains a margin which is multiplied by
             the size of the erase area, the value can end up being several
             minutes for large areas.
      
      "erase_size" is not the most efficient unit to erase (especially for SD
      where it is just one sector), hence "preferred_erase_size" provides a good
      chunk size for erasing large areas.
      
      For MMC, "preferred_erase_size" is the high-capacity erase size if a card
      specifies one, otherwise it is based on the capacity of the card.
      
      For SD, "preferred_erase_size" is the allocation unit size specified by
      the card.
      
      "preferred_erase_size" is in bytes.
      Signed-off-by: NAdrian Hunter <adrian.hunter@nokia.com>
      Acked-by: NJens Axboe <axboe@kernel.dk>
      Cc: Kyungmin Park <kmpark@infradead.org>
      Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ben Gardiner <bengardiner@nanometrics.ca>
      Cc: <linux-mmc@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dfe86cba
  4. 28 5月, 2010 1 次提交
  5. 02 11月, 2007 1 次提交
  6. 27 10月, 2007 1 次提交
  7. 24 9月, 2007 1 次提交
    • D
      MMC core learns about SPI · af517150
      David Brownell 提交于
      Teach the MMC/SD/SDIO core about using SPI mode.
      
       - Use mmc_host_is_spi() so enumeration works through SPI signaling
         and protocols, not just the native versions.
      
       - Provide the SPI response type flags with each request issued,
         including requests from the new lock/unlock code.
      
       - Understand that cmd->resp[0] and mmc_get_status() results for SPI
         return different values than for "native" MMC/SD protocol; this
         affects resetting, checking card lock status, and some others.
      
       - Understand that some commands act a bit differently ... notably:
           * OP_COND command doesn't return the OCR
           * APP_CMD status doesn't have an R1_APP_CMD analogue
      
      Those changes required some new and updated primitives:
      
       - Provide utilities to access two SPI-only requests, and one
         request that wasn't previously needed:
           * mmc_spi_read_ocr() ... SPI only
           * mmc_spi_set_crc() ... SPI only (override by module parm)
           * mmc_send_cid() ... for use without broadcast mode
      
       - Updated internal routines:
           * Previous mmc_send_csd() modified into mmc_send_cxd_native();
             it uses native "R2" responses, which include 16 bytes of data.
           * Previous mmc_send_ext_csd() becomes new mmc_send_cxd_data()
             helper for command-and-data access
           * Bugfix to that mmc_send_cxd_data() code:  dma-to-stack is
             unsafe/nonportable, so kmalloc a bounce buffer instead.
      
       - Modified mmc_send_ext_csd() now uses mmc_send_cxd_data() helper
      
       - Modified mmc_send_csd(), and new mmc_spi_send_cid(), routines use
         those helper routines based on whether they're native or SPI
      
      The newest categories of cards supported by the MMC stack aren't expected
      to work yet with SPI:  MMC or SD cards with over 4GB data, and SDIO.
      All those cards support SPI mode, so eventually they should work too.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      af517150
  8. 23 9月, 2007 2 次提交
  9. 26 7月, 2007 3 次提交
  10. 01 5月, 2007 1 次提交