linux-2.6.24.3下移植SD/MMC到S3C2440上的全历程
creator
sz111@126.com
移植SD/MMC驱动,吃力周折,成果最年夜是patch过失。不过历尽艰辛总算是找到了。特来分享。
1.起首下载2.6.24.3内核源码。其他内核不包管可以。移植部门就不讲了,假如不会参考我的其他文章。我仅仅测试了这个。
2.去http://svnweb.openmoko.org/*chec ... _mci.patch?rev=4096
下载SD/MMC patch,其他晚期版本不可,我就栽倒了这其中间。
3.把 s3c_mci.patch copy到linux-2.6.24.3下。执行patch -p1
4.make menuconfig,选择MMC/SD ,选择言语CP437,ISO 8859-1,最好也同时选择SCSI相关的工具吧,连USB也一块支撑了。(昨天SD接续弗成功,就把U盘测试了,至少要包管有结局啊。
5.关于patch天生的s3cmci.c还要参加detect脚位,我选择的是S3C2410_GPG8。设定:
static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
.do_dma = 0,
.gpio_detect = S3C2410_GPG8,
.set_power = NULL,
.ocr_avail = MMC_VDD_32_33,
};
6.编译下载。
出现信息如下:
--------start mdev-------
s3c2440-sdi s3c2410-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2410-sdi: CMD[FAIL(-110)] #2 op:CMD8 arg:0x000001aa flags:0x082f5
retries:0 Status:nothing to complete
s3c2440-sdi s3c2410-sdi: CMD[FAIL(-110)] #3 op:CMD5 arg:0x00000000 flags:0x082e1
retries:3 Status:nothing to complete
s3c2440-sdi s3c2410-sdi: CMD[FAIL(-110)] #4 op:CMD5 arg:0x00000000 flags:0x082e1
retries:2 Status:nothing to complete
s3c2440-sdi s3c2410-sdi: CMD[FAIL(-110)] #5 op:CMD5 arg:0x00000000 flags:0x082e1
retries:1 Status:nothing to complete
s3c2440-sdi s3c2410-sdi: CMD[FAIL(-110)] #6 op:CMD5 arg:0x00000000 flags:0x082e1
retries:0 Status:nothing to complete
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2410-sdi: CMD[FAIL(-110)] #10 op:CMD8 arg:0x000001aa flags:0x082f
5 retries:0 Status:nothing to complete
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2410-sdi: running at 16875kHz (requested: 25000kHz).
s3c2440-sdi s3c2410-sdi: running at 16875kHz (requested: 25000kHz).
mmc0: new SD card at address 73ef
mmcblk0: mmc0:73ef SD064 62080KiB
mmcblk0:<7>mmc0: starting CMD18 arg 00000000 flags 000000b5
p1
辅导辅导辅导AV女优**
love linux
starting pid 801, tty '': '-/bin/sh'
Processing /etc/profile...
Set search library path in /etc/profile
Set user path in /etc/profile
Done
[root@/]#cat /proc/partitions
major minor #blocks name
31 0 384 mtdblock0
31 1 2048 mtdblock1
31 2 63040 mtdblock2
179 0 62080 mmcblk0
179 1 62060 mmcblk0p1
[root@/]#mount -t vfat /dev/mmcblk0p1 /mnt/temp
成功,ok。感激通通的Linux开辟和支撑者。感激openmoko开源软件。
版权声明:
原创作品,容许转载,转载时请务必以超链接方法标明文章 原始起因 、作者信息和本声明。否则将清查法律责任。