Hi,
I am using DM365 hardware with Linux 2.6.37 kernel. I want to write to VPBE registers of DM365.
I did a ioremap(). It returned me a chunk of address. To this address I am trying to write and trying to read it back. Write is successful, but read back is not giving me the expectd values. Plese find the chunk of code I used below.
void __iomem *test;
test = ioremap(0xZZZZ,0x4);
((unsigned int *)test)[0] = 0xA;
printk("ov9712_ravi: val =0x%x \n",((unsigned int *)test)[0]);
iounmap(test);
Above piece of code my write and read are successful. I m wring oxA and able to read back 0xA.
But immediately after this, I did below ioremap of same address.
test = ioremap(0xZZZZ,0x4);
printk("ov9712_ravi: val =0x%x \n",((unsigned int *)test)[0]);
iounmap(test);
Now I expect value to be 0xA since address is same. But it reads "0".
I tried this with about more than 50 addresses. & behavior is same throughout.
Thanks.