1. 29 11月, 2012 2 次提交
  2. 08 11月, 2012 16 次提交
  3. 12 10月, 2012 1 次提交
    • M
      mmc: mxs-mmc: Fix merge issue causing build error · 4c5bb2e4
      Marek Vasut 提交于
      The following error appeared due to a merge problem; the patches:
      
      fc108d24 "mmc: mxs-mmc: fix deadlock caused by recursion loop"
      829c1bf4 "mmc: spi: Pull out parts shared between MMC and SPI"
      
      came in through separate branches and cause this build error when
      combined.
      
      drivers/mmc/host/mxs-mmc.c: In function 'mxs_mmc_enable_sdio_irq':
      drivers/mmc/host/mxs-mmc.c:527:3: error: 'struct mxs_mmc_host' has no member named 'base'
      drivers/mmc/host/mxs-mmc.c:527:3: error: 'struct mxs_mmc_host' has no member named 'devid'
      make[3]: *** [drivers/mmc/host/mxs-mmc.o] Error 1
      
      This patch corrects the issue.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      4c5bb2e4
  4. 08 10月, 2012 7 次提交
  5. 07 10月, 2012 1 次提交
  6. 06 10月, 2012 1 次提交
  7. 03 10月, 2012 12 次提交
    • G
      mmc: sh-mmcif: avoid oops on spurious interrupts · 8464dd52
      Guennadi Liakhovetski 提交于
      On some systems, e.g., kzm9g, MMCIF interfaces can produce spurious
      interrupts without any active request. To prevent the Oops, that results
      in such cases, don't dereference the mmc request pointer until we make
      sure, that we are indeed processing such a request.
      Reported-by: NTetsuyuki Kobayashi <koba@kmckk.co.jp>
      Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      8464dd52
    • G
      mmc: sh-mmcif: properly handle MMC_WRITE_MULTIPLE_BLOCK completion IRQ · 7a7eb328
      Guennadi Liakhovetski 提交于
      Upon completion of a MMC_WRITE_MULTIPLE_BLOCK command MMCIF issues an IRQ
      with the DTRANE bit set and often with one or several of CMD12 bits set.
      If those interrupts are not acknowledged, an additional interrupt can be
      produced and will be delivered later, possibly, when the transaction has
      already been completed. To prevent this from happening, CMD12 completion
      interrupt sources have to be cleared too upon reception of an DTRANE IRQ.
      Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
      Tested-by: NTetsuyuki Kobayashi <koba@kmckk.co.jp>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      7a7eb328
    • C
      mmc: sdhci-s3c: Fix crash on module insertion for second time · 387a8cbd
      Chander Kashyap 提交于
      If sdhci-s3c driver is built as module, it gives following error if inserted
      again after removing. This was happening as pm_runtime_use_autosuspend() is
      called in sdhci_s3c_probe() function but in sdhci_s3c_remove() its
      complementary pm_runtime_dont_use_autosuspend() is not called.
      
      BUG: spinlock bad magic on CPU#1, insmod/955
       lock: 0xee771368, .magic: 00000000, .owner: insmod/955, .owner_cpu: 1
      [<c00147e0>] (unwind_backtrace+0x0/0xf8) from [<c0136b40>] (do_raw_spin_unlock+0xa4/0xe4)
      [<c0136b40>] (do_raw_spin_unlock+0xa4/0xe4) from [<c01be508>] (_raw_spin_unlock_irqrestore+0xc/0x38)
      [<c01be508>] (_raw_spin_unlock_irqrestore+0xc/0x38) from [<c01a9334>] (sdhci_runtime_suspend_host+0x54/0x80)
      [<c01a9334>] (sdhci_runtime_suspend_host+0x54/0x80) from [<bf0060a8>] (sdhci_s3c_runtime_suspend+0x14/0x38 [sdhci_s3c])
      [<bf0060a8>] (sdhci_s3c_runtime_suspend+0x14/0x38 [sdhci_s3c]) from [<c016cb00>] (pm_generic_runtime_suspend+0x2c/0x40)
      [<c016cb00>] (pm_generic_runtime_suspend+0x2c/0x40) from [<c0170090>] (__rpm_callback+0x70/0x98)
      [<c0170090>] (__rpm_callback+0x70/0x98) from [<c01703f0>] (rpm_suspend+0xf0/0x534)
      [<c01703f0>] (rpm_suspend+0xf0/0x534) from [<c0171670>] (__pm_runtime_suspend+0x5c/0x74)
      [<c0171670>] (__pm_runtime_suspend+0x5c/0x74) from [<c016d018>] (pm_generic_runtime_idle+0x44/0x4c)
      [<c016d018>] (pm_generic_runtime_idle+0x44/0x4c) from [<c0170090>] (__rpm_callback+0x70/0x98)
      [<c0170090>] (__rpm_callback+0x70/0x98) from [<c0170984>] (rpm_idle+0xdc/0x18c)
      [<c0170984>] (rpm_idle+0xdc/0x18c) from [<c0171608>] (pm_runtime_set_autosuspend_delay+0x30/0x3c)
      [<c0171608>] (pm_runtime_set_autosuspend_delay+0x30/0x3c) from [<bf0069c4>] (sdhci_s3c_probe+0x35c/0x52c [sdhci_s3c])
      [<bf0069c4>] (sdhci_s3c_probe+0x35c/0x52c [sdhci_s3c]) from [<c016a014>] (platform_drv_probe+0x18/0x1c)
      Signed-off-by: NChander Kashyap <chander.kashyap@linaro.org>
      Acked-by: NJaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      387a8cbd
    • C
      mmc: sdhci-s3c: Enable only required bus clock · e684c468
      Chander Kashyap 提交于
      In case of multiple bus clock sources, all the clock sources were
      getting enabled. As only one clock source is needed at the time hence
      enable only the required bus clock.
      
      This patch does as follows:
      1.	In sdhci_s3c_probe enable only required bus clock source.
      
      2.	Handle the disabling of old bus clock and enables the
      	best clock selected in sdhci_s3c_set_clock().
      Signed-off-by: NChander Kashyap <chander.kashyap@linaro.org>
      Acked-by: NJaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      e684c468
    • S
      mmc: Revert "mmc: dw_mmc: Add check for IDMAC configuration" · 897b69e7
      Seungwon Jeon 提交于
      This reverts commit 94c6cee9 (Add check for IDMAC configuration).
      Synopsys says that only if internal dmac is not present, optional
      external dma interface is present. When internal dmac is present,
      '0' value in DMA_INTERFACE of HCON is reasonable. DMA_INTERFACE
      indicates external dma interface. And idmac initialization is
      prohibited now.
      
      The commit should be reverted since: the check for IDMAC is not
      reliable; falling back to PIO would provide awful performance; we
      wouldn't expect to see instances of this block without DMA support.
      Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com>
      Acked-by: NWill Newton <will.newton@imgtec.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      897b69e7
    • J
      mmc: mxcmmc: fix bug that may block a data transfer forever · f6ad0a48
      Javier Martin 提交于
      The problem can be easily reproduced using a script that loops
      copying a file in an SD card to another place in the same SD card
      and its related to read transfers. This only happens with DMA enabled.
      
      This is related to the fact that, when reading, an MMC irq signals
      the fact that all data from the SD card has been copied to the
      internal buffers. However, it doesn't signal whether the DMA transfer
      that is in charge of moving data from these internal buffers to RAM
      has finished or not. Thus, calling dmaengine_terminate_all() in the
      MMC irq routine can cancel an ongoing DMA transfer leaving some data
      in the internal buffers that produces an accumulative effect which,
      in the end, blocks a read data transfer forever.
      
      The following patch watches DMA irq for reading and MMC irqs for
      writing transfers. The 'dangerous' usage of dmaengine_terminate_all()
      is removed and a timeout of 10 seconds is added so that the MMC won't
      block forever anymore.
      Signed-off-by: NJavier Martin <javier.martin@vista-silicon.com>
      Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      f6ad0a48
    • V
      mmc: omap_hsmmc: Pass on the suspend failure to the PM core · c4c8eeb4
      Vaibhav Bedia 提交于
      In some cases mmc_suspend_host() is not able to claim the
      host and proceed with the suspend process. The core returns
      -EBUSY to the host controller driver. Unfortunately, the
      host controller driver does not pass on this information
      to the PM core and hence the system suspend process continues.
      
      	ret = mmc_suspend_host(host->mmc);
      	if (ret) {
      		host->suspended = 0;
      		if (host->pdata->resume) {
      			ret = host->pdata->resume(dev, host->slot_id);
      
      The return status from mmc_suspend_host() is overwritten by return
      status from host->pdata->resume. So the original return status is lost.
      
      In these cases the MMC core gets to an unexpected state
      during resume and multiple issues related to MMC crop up.
      1. Host controller driver starts accessing the device registers
      before the clocks are enabled which leads to a prefetch abort.
      2. A file copy thread which was launched before suspend gets
      stuck due to the host not being reclaimed during resume.
      
      To avoid such problems pass on the -EBUSY status to the PM core
      from the host controller driver. With this change, MMC core
      suspend might still fail but it does not end up making the
      system unusable. Suspend gets aborted and the user can try
      suspending the system again.
      Signed-off-by: NVaibhav Bedia <vaibhav.bedia@ti.com>
      Signed-off-by: NHebbar, Gururaja <gururaja.hebbar@ti.com>
      Acked-by: NVenkatraman S <svenkatr@ti.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      c4c8eeb4
    • H
      mmc: atmel-mci: AP700x PDC is not connected to MCI · 6bf2af8c
      Hein_Tibosch 提交于
      Earlier, atmel-mci was adapted to make use of the peripheral DMA
      controller (PDC), in case normal DMA wouldn't work.
      ( http://comments.gmane.org/gmane.linux.kernel.mmc/9403 )
      
      This works OK on ARM platforms (AT91), but it broke the driver
      for AVR32, the AP700x.  Although the MCI has PDC support, the
      connection is not done for AVR chips.
      
      This patch makes the use of PDC depend on !CONFIG_AVR32.
      Signed-off-by: NHein Tibosch <hein_tibosch@yahoo.es>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      6bf2af8c
    • H
      mmc: atmel-mci: DMA can be used with other controllers · ccdfe612
      Hein_Tibosch 提交于
      After the latest changes to atmel-mci, it could not be used with
      DMA on the AVR32 platform. This patch will allow to use DMA again
      and it will avoid access to MCI register ATMCI_DMA.
      
      Even if the IP version is lower than v3xx and doesn't have the DMA
      configuration register, DMA transfers can be used with a different
      controller than the Atmel AHB DMA one. For instance, some AVR chips
      use the Synopsys DesignWare AHB DMA controller.
      Signed-off-by: NHein Tibosch <hein_tibosch@yahoo.es>
      Acked-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      ccdfe612
    • J
      mmc: mmci: use clk_prepare_enable and clk_disable_unprepare · ac940938
      Julia Lawall 提交于
      clk_prepare_enable and clk_disable_unprepare combine clk_prepare and
      clk_enable, and clk_disable and clk_unprepare.  They make the code more
      concise, and ensure that clk_unprepare is called when clk_enable fails.
      
      A simplified version of the semantic patch that introduces calls to these
      functions is as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression e;
      @@
      
      - clk_prepare(e);
      - clk_enable(e);
      + clk_prepare_enable(e);
      
      @@
      expression e;
      @@
      
      - clk_disable(e);
      - clk_unprepare(e);
      + clk_disable_unprepare(e);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      ac940938
    • T
      mmc: sdhci-s3c: Add device tree support · cd1b00eb
      Thomas Abraham 提交于
      Add device tree based discovery support for Samsung's sdhci controller.
      
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Signed-off-by: NThomas Abraham <thomas.abraham@linaro.org>
      Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      cd1b00eb
    • T
      mmc: dw_mmc: add support for exynos specific implementation of dw-mshc · c3665006
      Thomas Abraham 提交于
      Samsung Exynos SoC's extend the dw-mshc controller for additional clock
      and bus control. Add support for these extensions and include provide
      device tree based discovery suppory as well.
      Signed-off-by: NThomas Abraham <thomas.abraham@linaro.org>
      Acked-by: NWill Newton <will.newton@imgtec.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      c3665006