1. 22 May, 2014 7 commits
  2. 14 May, 2014 1 commit
    • Nick Sanders's avatar
      mmc: sdhci: remove mdelay in eMMC tuning · 197160d5
      Nick Sanders authored
      This patch removes an unneccesary 1ms mdelay in the HS200 tuning
      loop, called 40 times per retuning. Currently this causes a latency
      of >40ms on any emmc accesses triggering wake from runtime PM,
      which can occur for a significant portion of reads on a mostly idle system.
      
      The delay is left in place for SD Cards, which use
      MMC_SEND_TUNING_BLOCK rather than MMC_SEND_TUNING_BLOCK_HS200.
      I'm not able to find evidence that this is required for SD in the
      specs I have access to, however this delay has been present from
      initial checkin for SD so I have preserved the original behavior for
      compatibility.
      
      This has been verified to fix observed glitching on local audio
      playback and recording on apps with inbuilt assumptions on storage
      latency.
      Signed-off-by: default avatarNick Sanders <nsanders@chromium.org>
      Reviewed-by: default avatarGrant Grundler <grundler@chromium.org>
      Reviewed-by: default avatarDoug Anderson <dianders@chromium.org>
      Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      197160d5
  3. 12 May, 2014 29 commits
  4. 22 Apr, 2014 3 commits
    • Micky Ching's avatar
      mmc: rtsx: add R1-no-CRC mmc command type handle · 5027251e
      Micky Ching authored
      a27fbf2f ("mmc: add ignorance case for CMD13 CRC error") produced
      a cmd.flags unhandled in realtek pci host driver.  This will make MMC
      card fail to initialize, this patch is used to handle the new cmd.flags
      condition and MMC card can be used.
      Signed-off-by: default avatarMicky Ching <micky_ching@realsil.com.cn>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      5027251e
    • Ulf Hansson's avatar
      mmc: core: Invoke sdio func driver's PM callbacks from the sdio bus · 573185cc
      Ulf Hansson authored
      The sdio func device is added to the driver model after the card
      device.
      
      This means the sdio func device will be suspend before the card device
      and thus resumed after. The consequence are the mmc core don't
      explicity need to protect itself from receiving sdio requests in
      suspended state. Instead that can be handled from the sdio bus, which
      is thus invokes the PM callbacks instead of old dummy function.
      
      In the case were the sdio func driver don't implement the PM callbacks
      the mmc core will in the early phase of system suspend, remove the
      card from the driver model and thus power off it.
      
      Cc: Aaron Lu <aaron.lu@intel.com>
      Cc: NeilBrown <neilb@suse.de>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: default avatarAaron Lu <aaron.lu@intel.com>
      Tested-by: default avatarxiaoming wang <xiaoming.wang@intel.com>
      Tested-by: default avatarChuanxiao Dong <chuanxiao.dong@intel.com>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      573185cc
    • Stefan Wahren's avatar
      mmc: core: Use maximum timeout values in case TACC field is zero · f7bf11a3
      Stefan Wahren authored
      When plugging a specific micro SD card at MMC socket of a custom i.MX28 board,
      we get the following kernel warning:
      
      WARNING: CPU: 0 PID: 30 at drivers/mmc/host/mxs-mmc.c:342 mxs_mmc_start_cmd+0x34c/0x378()
      Modules linked in:
      CPU: 0 PID: 30 Comm: kworker/u2:1 Not tainted 3.14.0-rc5 #8
      Workqueue: kmmcd mmc_rescan
      [<c0015420>] (unwind_backtrace) from [<c0012cb0>] (show_stack+0x10/0x14)
      [<c0012cb0>] (show_stack) from [<c001daf8>] (warn_slowpath_common+0x6c/0x8c)
      [<c001daf8>] (warn_slowpath_common) from [<c001db34>] (warn_slowpath_null+0x1c/0x24)
      [<c001db34>] (warn_slowpath_null) from [<c0349478>] (mxs_mmc_start_cmd+0x34c/0x378)
      [<c0349478>] (mxs_mmc_start_cmd) from [<c0338fa0>] (mmc_start_request+0xc4/0xf4)
      [<c0338fa0>] (mmc_start_request) from [<c03390b4>] (mmc_wait_for_req+0x50/0x164)
      [<c03390b4>] (mmc_wait_for_req) from [<c03405b8>] (mmc_app_send_scr+0x158/0x1c8)
      [<c03405b8>] (mmc_app_send_scr) from [<c033ee1c>] (mmc_sd_setup_card+0x80/0x3c8)
      [<c033ee1c>] (mmc_sd_setup_card) from [<c033f788>] (mmc_sd_init_card+0x124/0x66c)
      [<c033f788>] (mmc_sd_init_card) from [<c033fd7c>] (mmc_attach_sd+0xac/0x174)
      [<c033fd7c>] (mmc_attach_sd) from [<c033a658>] (mmc_rescan+0x25c/0x2d8)
      [<c033a658>] (mmc_rescan) from [<c003597c>] (process_one_work+0x1b4/0x4ec)
      [<c003597c>] (process_one_work) from [<c0035de4>] (worker_thread+0x130/0x464)
      [<c0035de4>] (worker_thread) from [<c003c824>] (kthread+0xb4/0xd0)
      [<c003c824>] (kthread) from [<c000f420>] (ret_from_fork+0x14/0x34)
      
      The error is due to an invalid value in CSD register of a specific 2GB
      micro SD card. The CSD version of this card is 1.0 but the TACC field
      has the invalid value 0.
      
      cid:0000005553442020000000000000583f
      csd:00000032535a83bfedb7ffbf1680003f
      date:08/2005
      erase_size:512
      fwrev:0x0
      hwrev:0x0
      manfid:0x000000
      name:USD
      oemid:0x0000
      preferred_erase_size:4194304
      scr:0225000000000000
      serial:0x00000000
      type:SD
      
      Since the kernel is making use of this TACC field to calculate the SD
      card timeout, an invalid value 0 leads to a warning at
      mxs_ns_to_ssp_ticks() and later the following misleading error message
      appears in a loop:
      
      mxs-mmc 80010000.ssp: card claims to support voltages below defined range
      mxs-mmc 80010000.ssp: no support for card's volts
      mmc0: error -22 whilst initialising MMC card
      
      This error is only found on this 2GB SD card on mxs platform.
      On x86 this card works without any problems.
      
      The following patch based on the work of Peter Chan and Otavio Salvador.
      It catches the case that the determined timeout is still 0 and sets it
      to a valid value.
      
      Successful tested on a i.MX28 board.
      Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: default avatarChris Ball <chris@printf.net>
      f7bf11a3