1. 18 Apr, 2008 1 commit
  2. 02 Nov, 2007 1 commit
  3. 23 Sep, 2007 12 commits
    • Pierre Ossman's avatar
      mmc: add led trigger · af8350c7
      Pierre Ossman authored
      
      
      Add a led trigger for each host controller that indicates if there
      is a request active on the controller.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      af8350c7
    • David Brownell's avatar
      MMC core learns about SPI · af517150
      David Brownell authored
      
      
      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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      af517150
    • Pierre Ossman's avatar
      mmc: increase power up delay · f9996aee
      Pierre Ossman authored
      
      
      Increase delay for power up in order to support some slower boards.
      
      Also add some comments about why the delays are there.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      f9996aee
    • Pierre Ossman's avatar
      mmc: replace BUG_ON with WARN_ON · d84075c8
      Pierre Ossman authored
      
      
      Replace all cases of BUG_ON with WARN_ON where there is a chance
      (with varying degrees of slim) that the kernel can continue without
      incidence.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      d84075c8
    • Pierre Ossman's avatar
      mmc: fix sdio timeout calculation · e6f918bf
      Pierre Ossman authored
      
      
      SDIO doesn't have a CSD so it uses different timeout values than
      SD memory.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      e6f918bf
    • Pierre Ossman's avatar
      mmc: fix incorrect divisor in debug output · ce252edd
      Pierre Ossman authored
      
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      ce252edd
    • Nicolas Pitre's avatar
      sdio: allow for mmc_claim_host to be aborted · 2342f332
      Nicolas Pitre authored
      
      
      It is sometimes necessary to give up on trying to claim the host lock,
      especially if that happens in a thread that has to be stopped.
      
      While at it, fix the description for mmc_claim_host() which was wrong.
      
      Signed-off-by: default avatarNicolas Pitre <npitre@mvista.com>
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      2342f332
    • Nicolas Pitre's avatar
      mmc: initialize mmc subsystem with subsys_initcall() · 26074962
      Nicolas Pitre authored
      
      
      The problem is that the sdio_bus must be registered before any SDIO
      drivers are registered against it otherwise the kernel sulks.  Because
      the sdio_bus registration happens through module_init (equivalent to
      device_initcall), then any SDIO
      drivers linked before the SDIO core code in the kernel will be initialized
      first.
      
      Upcoming SDIO function drivers are likely to be located outside the
      drivers/mmc directory as it is common practice to group drivers according
      to their function rather than the bus they use.  SDIO drivers are therefore
      likely to appear at random location in the kernel link.
      
      To make sure the sdio_bus is always initialized before any SDIO drivers,
      let's move the MMC init to the subsys_initcall level.
      
      Signed-off-by: default avatarNicolas Pitre <npitre@mvista.com>
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      26074962
    • Pierre Ossman's avatar
      mmc: basic SDIO device model · e29a7d73
      Pierre Ossman authored
      
      
      Add the sdio bus type and basic device handling.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      e29a7d73
    • Pierre Ossman's avatar
      mmc: detect SDIO cards · 5c4e6f13
      Pierre Ossman authored
      
      
      Really basic init sequence for SDIO cards.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      5c4e6f13
    • Pierre Ossman's avatar
      mmc: mmc_set_data_timeout() parameter write is redundant · b146d26a
      Pierre Ossman authored
      
      
      The write parameter in mmc_set_data_timeout() is redundant as the
      data structure contains information about the direction of the
      transfer.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      b146d26a
    • Pierre Ossman's avatar
      mmc: remove custom error codes · 17b0429d
      Pierre Ossman authored
      
      
      Convert the MMC layer to use standard error codes and not its own,
      incompatible values.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      17b0429d
  4. 25 Jul, 2007 4 commits
  5. 09 Jul, 2007 3 commits
  6. 09 May, 2007 1 commit
  7. 08 May, 2007 1 commit
  8. 01 May, 2007 12 commits
  9. 06 Mar, 2007 1 commit
  10. 04 Feb, 2007 4 commits
    • Pierre Ossman's avatar
      mmc: Graceful fallback for fancy features · ae06eaf9
      Pierre Ossman authored
      
      
      MMC high-speed, wide bus support and SD high-speed
      are functions that aren't critical for correct
      operation of the card. As such, they shouldn't mark
      the card as bad or dead when there is a failure
      activating these features.
      
      This is needed in particular on some really stupid
      hardware (e.g. Winbond's) where not all data transfer
      commands are supported.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      ae06eaf9
    • Pierre Ossman's avatar
      mmc: Allow host drivers to specify max block count · 55db890a
      Pierre Ossman authored
      
      
      Many controllers have an upper limit on the number of blocks that can be
      transferred in one request. Allow the host drivers to specify this and make
      sure we avoid hitting this limit.
      
      Also change the max_sectors field to avoid confusion. This makes it map
      less directly to the block layer limits, but as they didn't apply directly
      on MMC cards anyway, this isn't a great loss.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      55db890a
    • Pierre Ossman's avatar
      mmc: Allow host drivers to specify a max block size · fe4a3c7a
      Pierre Ossman authored
      
      
      Most controllers have an upper limit on the block size. Allow the host
      drivers to specify this and make sure we avoid hitting this limit.
      
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      fe4a3c7a
    • Philip Langdale's avatar
      mmc: Add support for SDHC cards · fba68bd2
      Philip Langdale authored
      
      
      Thanks to the generous donation of an SDHC card by John Gilmore, and
      the surprisingly enlightened decision by the SD Card Association to
      publish useful specs, I've been able to bash out support for SDHC. The
      changes are not too profound:
      
      i) Add a card flag indicating the card uses block level addressing and
      check it in the block driver. As we never took advantage of byte-level
      addressing, this simply involves skipping the block -> byte
      translation when sending commands.
      
      ii) The layout of the CSD is changed - a set of fields are discarded
      to make space for a larger C_SIZE. We did not reference any of the
      discarded fields except those related to the C_SIZE.
      
      iii) Read and write timeouts are fixed values and not calculated from
      CSD values.
      
      iv) Before invoking SEND_APP_OP_COND, we must invoke the new
      SEND_IF_COND to inform the card we support SDHC.
      
      Signed-off-by: default avatarPhilipl Langdale <philipl@overt.org>
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      fba68bd2