最近在搞imx6q,需要使用eim外接
FPGA,可是端口一点反应都没有,搞了两周了一点反应都没有,急急急啊,有没有大哥指点一下啊,
飞凌的人在哪?
下面是配置,
/*
CS0GCR1:
GBC=0;CSREC=1;DSZ=2;BL=0;
CREP=1;CSEN=1;
Opera
tion Mode: MUM=SRD=SWR=0.
(Async write/Async page read,none multiplexed)
*/
writel(0x00020081, ram_reg);//EIM_CS0GCR1
/*
ADH=0
*/
writel(0x00000000, ram_reg + 0x4); //EIM_CS0GCR2
/*
CS0RCR1:
RWSC=1;//28
RADVA=0;RADVN=0;
OEA=0;OEN=0;
RCSA=0;RCSN=0;
*/
writel(0x01000000, ram_reg + 0x8);//EIM_CS0RCR1
/*
CS0RCR2:
APR=1(Async Page Read);
PAT=4(6 EIM clock syclks)
changed RWSC=4,OEA=0,PAT=2;
*/
writel(0x00000000, ram_reg + 0xc);//EIM_CS0RCR2
/*
CS0WCR1:
WWSC=1;
WADVA=0;WADVN=0;
WBEA=0;WBEN=0;
WEA=0;WEN=0;
WCSA=0;WCSN=0;
*/
writel(0x01000000, ram_reg + 0x10);//EIM_CS0WCR1 WWSC=3 EIM clk
/*WBCDD=0*/
writel(0x00000000, ram_reg + 0x14);
writel(0x00000000, ram_reg + 0x090);
//init pad
mxc_iomux_v3_setup_multiple_
pads(mx6q_weimram_pads,ARRAY_SIZE(mx6q_weimram_pads));
//init pad
读写使用copy_from_user,copy_from_user
while(total > 0){
tmp = min(0x1000 - (pos & 0xfff),total);
if((ret = copy_from_user(fram_info.base + pos,buf + count - total,tmp)) < 0){
return -EFAULT;
}
printk("ret=%xn",ret);
ndelay(50);
total -= tmp;
pos += tmp;
}
我没有接fpga,是从
开发板的eim接口测试的,正常应该有数据才对啊,现在一点反应都没有,哪个大哥搞过eim指定一下啊