1. 25 5月, 2011 1 次提交
    • T
      mmc: sdhci: Fix read-only detection with JMicron 388 chip · 82b0e23a
      Takashi Iwai 提交于
      On HP laptops with JMicron 388 chip, the write-locked SD card isn't
      detected correctly as read-only in many cases.  This is because the
      PRESENT_STATE register becomes unsable just after plugging, and it
      returns the WRITE_PROTECT bit wrongly at the first read.
      
      This patch fixes the read-only detection by adding a new sdhci quirk
      indicating to check the register more intensively with a relatively
      long delay.
      
      The patch is tested with 2.6.39-rc4 kernel.
      
      Cc: Aries Lee <arieslee@jmicron.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      82b0e23a
  2. 09 1月, 2011 2 次提交
  3. 23 10月, 2010 1 次提交
    • G
      mmc: sdhci: split up sdhci.h for sdhci-pltfm users · 1978fda8
      Giuseppe Cavallaro 提交于
      Some platforms based on sdhci-pltfm need to set their own quirks.
      Previously to this patch, the quirks were in drivers/mmc/host/sdhci.h.
      
      This patch splits drivers/mmc/host/sdhci.h into two parts:
      
      * drivers/mmc/host/sdhci.h  includes the HC registers and I/O accessors.
      * include/linux/mmc/sdhci.h includes the sdhci structure and quirks.
      
      Instead of including drivers/mmc/host/sdhci.h, -pltfm drivers should
      now include include/linux/mmc/sdhci.h and include/linux/sdhci-pltfm.h.
      
      This patch avoids adding/changing the calls/flags in the
      sdhci_pltfm_data structure.  It has been tested on STM platforms
      (e.g. STx7106, STx7108, STx5206) where the driver is configured
      and used as shown in the example below:
      
      [snip]
      static int mmc_pad_resources(struct sdhci_host *sdhci)
      {
      	if (!devm_stm_pad_claim(sdhci->mmc->parent,
      				&stx7108_mmc_pad_config,
      				dev_name(sdhci->mmc->parent)))
      		return -ENODEV;
      
      	return 0;
      }
      
      static struct sdhci_pltfm_data stx7108_mmc_platform_data = {
      	.init = mmc_pad_resources,
      	.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
      };
      
      static struct platform_device stx7108_mmc_device = {
      	.name = "sdhci",
      [snip]
      
      Note: drivers/mmc/host/sdhci.h now also includes linux/mmc/sdhci.h,
      and no modifications should be needed on other sdhci-<XXX> drivers.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Reviewed-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      1978fda8