Hello,
I am new to linux as well as OMAP.
I am trying to write a Linux driver for accessing the FPGA through the EMIFA bus.
I am unable to access the EMIFA control registers at 0x68000000.
I wrote the following the code:
resrc=request_mem_region(0x68000000,64,"fpga");
if (resrc== NULL)
{
printk("resource not allocated\n");
return -1;
}
location = (unsigned int *)ioremap_nocache(0x68000000,64);
if (!location)
{
printk("AEMIFA CTL BASE NOT AVAILABLE\n");
return 1;
}
regval = readl(location);
printk("Regval %x\n",regval);
regval = ioread32(location);
printk("Regval %x\n",regval);
I have tried to use both ioread32 as well as readl functions but I always get 0 as return values.
The value expected is 0x4000 0205h. Its a read only location so there is no question of something else overwriting the register.
I get the correct value when I access the same register in u-boot.
With regards
Pankaj