- 积分
- 368
贡献137
飞刀6 FD
注册时间2010-5-27
在线时间304 小时
|
发表于 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 |
|