1. 27 7月, 2008 1 次提交
  2. 15 7月, 2008 3 次提交
    • P
      mmc: remove multiwrite capability · 23af6039
      Pierre Ossman 提交于
      Relax requirements on host controllers and only require that they do not
      report a transfer count than is larger than the actual one (i.e. a lower
      value is okay). This is how many other parts of the kernel behaves so
      upper layers should already be prepared to handle that scenario. This
      gives us a performance boost on MMC cards.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      23af6039
    • A
      mmc: change .get_ro() callback semantics · 08f80bb5
      Anton Vorontsov 提交于
      Now get_ro() callback must return 0/1 values for its logical states, and
      negative errno values in case of error. If particular host instance doesn't
      support RO/WP switch, it should return -ENOSYS.
      
      This patch changes some hosts in two ways:
      
      1. Now functions should be smart to not return negative values in
         "RO asserted" case (particularly gpio_ calls could return negative
         values for the outermost GPIOs).
      
         Also, board code usually passes get_ro() callbacks that directly return
         gpioreg & bit result, so at91_mci, imxmmc, pxamci and mmc_spi's get_ro()
         handlers need take special care when returning platform's values to the
         mmc core.
      
      2. In case of host instance didn't implement get_ro() callback, it should
         really return -ENOSYS and let the mmc core decide what to do about it
         (mmc core thinks the same way as the hosts, so it isn't functional
         change).
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      08f80bb5
    • A
      mmc: add support for card-detection polling · 28f52482
      Anton Vorontsov 提交于
      Some hosts (and boards that use mmc_spi) do not use interrupts on the CD
      line, so they can't trigger mmc_detect_change. We want to poll the card
      and see if there was a change. 1 second poll interval seems resonable.
      
      This patch also implements .get_cd() host operation, that could be used
      by the hosts that are able to report card-detect status without need to
      talk MMC.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      28f52482
  3. 13 12月, 2007 1 次提交
  4. 24 9月, 2007 4 次提交
  5. 23 9月, 2007 1 次提交
  6. 01 5月, 2007 7 次提交
    • P
      MMC: Fix handling of low-voltage cards · 55556da0
      Philip Langdale 提交于
      Fix handling of low voltage MMC cards.
      
      The latest MMC and SD specs both agree that support for
      low-voltage operations is indicated by bit 7 in the OCR.
      The MMC spec states that the low voltage range is
      1.65-1.95V while the SD spec leaves the actual voltage
      range undefined - meaning that there is still no such
      thing as a low voltage SD card.
      
      However, an old Sandisk spec implied that bits 7.0
      represented voltages below 2.0V in 1V or 0.5V increments,
      and the code was accordingly written with that expectation.
      
      This confusion meant that host drivers attempting to support
      the typical low voltage (1.8V) would set the wrong bits in
      the host OCR mask (usually bits 5 and/or 6) resulting in the
      the low voltage mode never being used.
      
      This change corrects the low voltage range and adds sanity
      checks on the reserved bits (0-6) and for SD cards that
      claim to support low-voltage operations.
      Signed-off-by: NPhilip Langdale <philipl@overt.org>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      55556da0
    • P
      MMC: Consolidate voltage definitions · 4be34c99
      Philip Langdale 提交于
      Consolidate the list of available voltages.
      
      Up until now, a separate set of defines has been
      used for host->vdd than that used for the OCR
      voltage mask values. Having two sets of defines
      allows them to get out of sync and the current
      sets are already inconsistent with one claiming
      to describe ranges and the other specific voltages.
      
      Only the SDHCI driver uses the host->vdd defines and
      it is easily fixed to use the OCR defines.
      Signed-off-by: NPhilip Langdale <philipl@overt.org>
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      4be34c99
    • P
      mmc: add bus handler · 7ea239d9
      Pierre Ossman 提交于
      Delegate protocol handling to "bus handlers". This allows the core to
      just handle the task of arbitrating the bus. Initialisation and
      pampering of cards is now done by the different bus handlers.
      
      This design also allows MMC and SD (and later SDIO) to be more cleanly
      separated, allowing easier maintenance.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      7ea239d9
    • P
      mmc: Move core functions to subdir · aaac1b47
      Pierre Ossman 提交于
      Create a "core" subdirectory to house the central bus handling
      functions.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      aaac1b47
    • P
      mmc: deprecate mmc bus topology · b855885e
      Pierre Ossman 提交于
      The classic MMC bus was defined as multi card bus
      system, which is reflected in the design in the MMC
      layer.
      
      When SD showed up, the bus topology was abandoned
      and a star topology (one card per host) was mandated.
      MMC version 4 has followed this, officially deprecating
      the bus topology.
      
      As we do not have any known users of the bus
      topology we can remove support for it. This will
      simplify the code and rectify some incorrect
      assumptions in the newer additions.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      b855885e
    • P
      mmc: Flush pending detects on host removal · 3b91e550
      Pierre Ossman 提交于
      Make sure we kill of any pending detection runs when the host
      is removed instead of when it is freed. Also add some debugging
      to make sure the driver doesn't queue up more detection after it
      has removed the host.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      3b91e550
    • P
      mmc: Move OCR bit defines · f74d132c
      Pierre Ossman 提交于
      All host drivers were #include:ing mmc/protocol.h just to
      get access to the OCR bit defines. Move these to host.h instead.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      f74d132c
  7. 06 3月, 2007 1 次提交
  8. 05 2月, 2007 4 次提交
  9. 02 12月, 2006 1 次提交
  10. 22 11月, 2006 1 次提交
  11. 24 9月, 2006 1 次提交
    • R
      [MMC] MMC_CAP_BYTEBLOCK flag for non-log2 block sizes capable hosts · 42431acb
      Russell King 提交于
      Some MMC hosts can only handle log2 block sizes.  Unfortunately,
      the MMC password support needs to be able to send non-log2 block
      sizes.  Provide a capability so that the MMC password support can
      decide whether it should use this support or not.
      
      The unfortunate side effect of this host limitation is that any
      MMC card protected by a password which is not a log2 block size
      can not be accessed on a host which only allows a log2 block size.
      
      This change just adds the flag.  The MMC password support code
      needs updating to use it (if and when it is finally submitted.)
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      42431acb
  12. 16 9月, 2006 1 次提交
    • R
      [MMC] Add multi block-write capability · db53f28b
      Russell King 提交于
      Add a capability flag for drivers to set when they can perform multi-
      block transfers to cards _and_ correctly report the number of bytes
      transferred should an error occur.
      
      The last point is very important - if a driver reports more bytes than
      were actually accepted by the card and an error occurs, there is the
      possibility for data loss.
      
      Pierre Ossman provided the patch for wbsd and sdhci.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      db53f28b
  13. 07 9月, 2006 1 次提交
  14. 09 9月, 2005 2 次提交
  15. 08 9月, 2005 3 次提交
    • P
      [PATCH] sd: SD 4-bit bus · f218278a
      Pierre Ossman 提交于
      Infrastructure for 4-bit bus transfers with SD cards.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f218278a
    • P
      [PATCH] sd: read-only switch · a00fc090
      Pierre Ossman 提交于
      Support for the read-only switch on SD cards which must be enforced by the
      host.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a00fc090
    • P
      [PATCH] sd: initialize SD cards · 335eadf2
      Pierre Ossman 提交于
      Support for the Secure Digital protocol in the MMC layer.
      
      A summary of the legal issues surrounding SD cards, as understood by yours
      truly:
      
      Members of the Secure Digital Association, hereafter SDA, are required to sign
      a NDA[1] before given access to any specifications.  It has been speculated
      that including an SD implementation would forbid these members to redistribute
      Linux.  This is the basic problem with SD support so it is unclear if it even
      is a problem since it has no effect on those of us that aren't members.
      
      The SDA doesn't seem to enforce these rules though since the patches included
      here are based on documentation made public by some of the members.  The most
      complete specs[2] are actually released by Sandisk, one of the founding
      companies of the SDA.
      
      Because of this the NDA is considered a non-issue by most involved in the
      discussions concerning these patches.  It might be that the SDA is only
      interested in protecting the so called "secure" bits of SD, which so far
      hasn't been found in any public spec.  (The card is split into two sections,
      one "normal" and one "secure" which has an access scheme similar to TPM:s).
      
      (As a side note, Microsoft is working to make things easier for us since they
      want to be able to include the source code for a SD driver in one of their
      development kits.  HP is making sure that the new NDA will allow a Linux
      implementation.  So far only the SDIO specs have been opened up[3].  More will
      hopefully follow.)
      
       [1] http://www.sdcard.org/membership/images/ippolicy.pdf
       [2] http://www.sandisk.com/pdf/oem/ProdManualSDCardv1.9.pdf
       [3] http://www.sdcard.org/sdio/Simplified%20SDIO%20Card%20Specification.pdf
      
      This patch contains the central parts of the SD support.  If no MMC cards are
      found on a bus then the MMC layer proceeds looking for SD cards.  Helper
      functions are extended to handle the special needs of SD cards.
      Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      335eadf2
  16. 03 9月, 2005 1 次提交
  17. 19 8月, 2005 4 次提交
  18. 17 4月, 2005 2 次提交