fl2440内核linux-3.0移植-----添加SD卡支持
来源:互联网 发布:阿里云注册 编辑:程序博客网 时间:2024/05/17 03:55
Linux—3.0中对S3C2440 SD驱动已经支持的非常好。为了让FL2440支持SD卡,只需要完成几个步骤即可。
1. 在内核中注册SD卡平台设备。通过修改mach-smdk2440.c 文件来实现。在mach-smdk2440.c文件的smdk2440_devices数组中增加s3c_device_sdi 平台设备成员,如下所示:(红色为添加部分)
[lingyun@localhost linux-3.0]$ vim arch/arm/mach-s3c2440/mach-smdk2440.c
static struct platform_device *smdk2440_devices[] __initdata = {
&s3c_device_ohci,
&s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
&s3c_device_rtc,
&s3c_device_dm9000, /* modify by liuchengdeng */
&s3c_device_adc, /* modify by liuchengdeng */
&s3c_device_ts, /* modify by liuchengdeng */
&uda1340_codec, /* modify by liuchengdeng */
&s3c24xx_uda134x, /* modify by liuchengdeng */
&samsung_asoc_dma, /* modify by liuchengdeng */
&s3c_device_sdi, /* modify by liuchengdeng */
};
2. 修改s3cmci.c, 设置检测SD卡插入的中断号,及配置响应的引脚为中断功能。如下所示:修改s3cmci_probe函数:
vim drivers/mmc/host/s3cmci.c
将host->irq_cd = gpio_to_irq(host->pdata->gpio_detect);修改为
host->irq_cd = IRQ_EINT16;/* add by liu chengdeng*/
s3c2410_gpio_cfgpin(S3C2410_GPG(8), S3C2410_GPG8_EINT16);/* add by liu chengdeng */
3. 3、 添加MMC内核配置选项
在内核的MMC配置选项中添加对S3C SD/MMC的支持,如下所示:
Device Drivers --->
<*> MMC/SD/SDIO card support --->
--------------------------------------------------------------------------------------------+ |
| | --- MMC/SD/SDIO card support | |
| | [ ] MMC debugging | |
| | [ ] Assume MMC/SD cards are non-removable (DANGEROUS) | |
| | [ ] MMC host clock gating (EXPERIMENTAL) | |
| | *** MMC/SD/SDIO Card Drivers *** | |
| | <*> MMC block device driver | |
| | (8) Number of minors per block device | |
| | [*] Use bounce buffer for simple hosts | |
| | < > SDIO UART/GPS class support | |
| | < > MMC host test driver | |
| | *** MMC/SD/SDIO Host Controller Drivers *** | |
| | < > Secure Digital Host Controller Interface support | |
| | < > MMC/SD/SDIO over SPI | |
| | <*> Samsung S3C SD/MMC Card Interface support | |
| | [ ] Hardware support for SDIO IRQ | |
| | Samsung S3C SD/MMC transfer code (Use PIO transfers only) --->
444、编译内核即可:make
5、烧录内核打印如下信息时说明已经支持SD卡了:
dm9000 dm9000: eth0: link down
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
usb 1-1: new full speed USB device number 2 using s3c2410-ohci
s3c-sdi s3c2440-sdi: powered down.
%
5
- fl2440内核linux-3.0移植-----添加SD卡支持
- 内核linux-3.0移植到fl2440-----添加DM9000网卡驱动
- fl2440内核linux-3.0移植-----添加led驱动
- 基于fl2440内核linux-3.0移植----添加按键驱动
- 基于fl2440内核linux-3.0移植----添加adc驱动
- FL2440移植Linux内核
- FL2440移植内核Linux-3.0过程。
- fl2440内核移植过程Linux-3.0
- FL2440 Linux-3.0内核最小系统移植
- FL2440移植linux-3.0全过程(4)添加DM9000网卡支持
- FL2440移植linux-3.0全过程(5)添加u盘挂载,MMC,LCD支持等
- 内核linux-3.0移植到fl2440-----添加U盘,MMC和LCD驱动
- ARM9开发板FL2440移植Linux-3.0内核————添加USB驱动
- 基于fl2440内核linux-3.0移植----触摸屏移植
- fl2440添加SD卡驱动
- Arm9+linux fl2440 lcd驱动移植、添加MMC支持、添加U盘支持
- fl2440——移植USB驱动、内核添加USB支持、U盘挂载
- FL2440移植linux-3.0全过程(1)内核启动
- nginx 下php-fpm 占用cpu过高
- 围住神经猫源代码下载(iOS版本(Swift语言))
- Windows下使用Vim和CSCOPE搭建C/C++ IDE和源代码浏览器的步骤
- 遍历二叉树的各种操作(非递归遍历)
- 从极大似然函数到EM算法
- fl2440内核linux-3.0移植-----添加SD卡支持
- 安装ffmpeg配置x264播放器的时候出现 ERROR: libx264 not found
- xcode6-beta5版本下载链接!
- 我的第一个博客
- FTP相关网络协议
- java对象复制
- Opencv2.4.4+VS2010永久配置
- An extremely simple ftp-like ftp
- python 安装 easy_install 的三种方式