S3C6410驱动IDE硬盘

S3C6410提供两种方式驱动IDE硬盘,PIO模式和UDMA模式,两种模式分别使用不同的接口线。硬件接口如下图

https://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。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值