使用Linux3.2.81内核
1.arch/arm/mach-s3c2440/mach-smdk2440.c platform结构中增加&s3c_device_sdi语句。
static structplatform_device*smdk2440_devices[] __initdata =
{
&s3c_device_usb,
&s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c,
&s3c_device_iis,
&s3c_device_nand,
&s3c_device_sdi, //add here
};
2、添加和开发板相关的
SD 卡插拔引发的中断:drivers/mmc/host/s3cmci.c
host->sdio_irqen= enable;
//添加以下两行,根据原理图进行相应引脚的修改
host->irq_cd = IRQ_EINT16;
s3c2410_gpio_cfgpin(S3C2410_GPG(8),S3C2410_GPG8_EINT16);
if (enable == host->sdio_irqen)
goto same_state;
3、执行make
menuconfig
Device Driversà
<*> MMC/SD/SDIO cardsupportà
<*> MMC block device driver
<*> Samsung S3C SD/MMC Card Interface support
[*] Hardware support for SDIO IRQ //一定要选
Filesystemsà
DOS/FAT/NT Filesystemsà
(936) Default codepage for FAT
Native language supportà
<*>
Simplified Chinese charset (CP936, GB2312) //支持中文
<*>
NLS ISO 8859-1 (Latin 1; Western European Languages)
4、重新编译内核,然后下载
5、挂载SD卡
: mount -tvfat /dev/mmcblk0 /mnt