S3C6410提供两种方式驱动IDE硬盘,PIO模式和UDMA模式,两种模式分别使用不同的接口线。硬件接口如下图
http://p.blog.csdn.net/images/p_blog_csdn_net/guetcw/EntryImages/20091015/444.jpg
2.5寸以下的IDE硬盘接口大都是3.3V可以直接和6410的IO连接不需要电平转换。
PIO模式使用Xm0这组总线,UDMA模式使用Xhi这组总线,两组总线不能同时候接到IDE硬盘,只能选择一种,将另一组的串联电阻去掉。
在注册表中添加如下信息
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\6410_CF]
"Prefix"="IDE"
"Dll"="s3c6410_cf_atapi.dll"
"Order"=dword:15
"Class"=dword:01
"SubClass"=dword:01
"ConfigEntry"="GenericConfig" ; PCI configuration entry point ;;maybe not required
"Legacy"=dword:01 ; legacy, use Irq for primary and Irq+1 for secondary ;;maybe not required
"Irq"=dword:54 ; CFCon Virtual IRQ = 84 (0x54), Physical IRQ = 46
"SysIntr"=dword:00 ; SysIntr not specified
"DMAAlignment"=dword:04 ; default DMA alignment
"SoftResetTimeout"=dword:5 ; ATA/ATAPI spec defines 31s ceiling; this is too long
"StatusPollCycles"=dword:100 ; Status register DRQ/BSY polling; 256 poll cycles
"StatusPollsPerCycle"=dword:20 ; Status register DRQ/BSY polling; 32 polls per cycle
"StatusPollCyclePause"=dword:05 ; Status register DRQ/BSY polling; 5 milliseconds between poll cycles
"IoBase"=multi_sz:"0x70300000","0x70300000"
"IoLen"=multi_sz:"0x1998","0x1998"
"RegisterStride"=dword:4 ; Ref. Board ATA register stride; register block is word-contiguous
"InterfaceType"=dword:0 ; Internal
"DeviceControlOffset"=dword:20
"AlternateStatusOffset"=dword:20
"DeviceId"=dword:00
"SpawnFunction"="CreateRomi" ; Reference Board specific instantiation function
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\6410_CF\Device0]
"Prefix"="DSK"
"Dll"="s3c6410_cf_atapi.dll"
"Order"=dword:16
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}",
"{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"
"InterruptDriven"=dword:00 ; en(1) dis(0)able interrupt driven I/O
"DMA"=dword:00 ; disable DMA. DMA is not supported
"DoubleBufferSize"=dword:10000 ; 128 sector (65536 byte) double buffer
"DrqDataBlockSize"=dword:200 ; 1 sector (512 byte) DRQ data block
"WriteCache"=dword:01 ; enable on-disk write cache
"LookAhead"=dword:01 ; enable on-disk look-ahead
"DeviceId"=dword:00 ; device 0, i.e., primary master
"TransferMode"=dword:ff ; use mode 0;
"EnablePDMA"=dword:1 ; 0 = PIO, 1 = PDMA. We recommend PDMA mode.
"EnableUDMA"=dword:1 ; 0 = PIO, 1 = UDMA. We recommend UDMA mode.
"IndirectMode"=dword:1 ; 0 = Direct, 1 = Indirect. (To use UDMA, It should be '0'. UDMA is only working on DIRECT MODE.)
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\6410_CF]
"Name"="ATA Type Storage"
"Folder"="ATADisk"
"IndirectMode"=dword:1 这里选择控制模式,0为PIO模式,1为UDMA模式。添加后编译BSP包下的DRIVERS\CF_ATAPI。
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/guetcw/archive/2009/10/15/4674339.aspx 牛人陈大猫博客,还有PC100地址映射与启动、MLC与SLC区别等文章