config20102009-11-19 19:31
外设fpga做的8k的memory,用arm9去读写它,在linux2.6系统下;这样做对吗?
实际地址映射到虚拟内存中,用得到的虚拟地址去读写。
地址总线:a1-a14 数据总线:d0-d16
#define FPGA_BASE_ADDR (0x18000000)//片选为nGCS3
#define BWSCON (0x48000000)
#define BANKCON3 (0x48000010)
#define IP_SIZE (0x1FFF)//13根地址线8K的物理空间
static void *bwscon,*bankcon3,*fpga_base_addr;
bwscon = ioremap_nocache(BWSCON,0x0000004);
bankcon3 = ioremap_nocache(BANKCON3,0x0000004);
fpga_base_addr = ioremap_nocache(FPGA_BASE_ADDR,IP_SIZE);
writel(readl(bwscon)|0xD000,bwscon);
writel(0x7FFC,bankcon3);
for(i=0;i