ky2012SPJK 发表于 2012-7-22 17:41:29

飞凌-fatfish 发表于 2012-7-23 16:30:29

这个版本的sd驱动有点bug 导致有的sd不能正常识别

dglwx 发表于 2012-7-23 17:11:55

回复 2# 飞凌-fatfish

   在3.0的内核里,修改drivers/mmc/host/s3cmci.c,添加SD卡的探测和写保护等Pin支持。2.6.28应该也差不多~

    diff -Nuar linux-3.0/drivers/mmc/host/s3cmci.c linux-3.0-s3c2440/drivers/mmc/host/s3cmci.c
--- linux-3.0/drivers/mmc/host/s3cmci.c 2011-07-22 10:17:23.000000000 +0800
+++ linux-3.0-s3c2440/drivers/mmc/host/s3cmci.c 2012-07-18 21:52:20.124872993 +0800
@@ -1275,6 +1275,7 @@

    writel(mci_con, host->base + S3C2410_SDICON);

+#if 0 /*Comment by guowenxue, remove the noisy debug output*/
    if ((ios->power_mode == MMC_POWER_ON) ||
      (ios->power_mode == MMC_POWER_UP)) {
      dbg(host, dbg_conf, "running at %lukHz (requested: %ukHz).\n",
@@ -1282,6 +1283,7 @@
    } else {
      dbg(host, dbg_conf, "powered down.\n");
    }
+#endif

    host->bus_width = ios->bus_width;
}
@@ -1357,11 +1359,16 @@
    .enable_sdio_irq = s3cmci_enable_sdio_irq,
};

+/*Change s3cmci_def_pdata by guowenxue, 2011.09.06*/
static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
    /* This is currently here to avoid a number of if (host->pdata)
   * checks. Any zero fields to ensure reasonable defaults are picked. */
-    .no_wprotect = 1,
-    .no_detect = 1,
+   .gpio_detect = S3C2410_GPG(10), /* NCD(NCD_SD) pin use EINT18/GPG10*/
+   .gpio_wprotect = S3C2410_GPH(8), /*WP(WP_SD) pin use GPH8*/
+   .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
+   .wprotect_invert = 0,
+   .detect_invert = 0,
+   .set_power = NULL,
};

#ifdef CONFIG_CPU_FREQ

ky2012SPJK 发表于 2012-7-26 13:48:40

页: [1]
查看完整版本: FL2440 linux 2.6.28下挂接SD卡没有反应是怎么回事啊?