Forum Discussion
Altera_Forum
Honored Contributor
14 years agoThe data cache flush needs to be done with the same virtual address as the memory access itself - which means you'll need to do it from within the driver.
The gcc 'asm' statement for the 'flushda' instruction is quite simple, you might find one if you search through all the header files. If your driver isn't using ioremap_nocache() to get a kernel virtual address for the phyiscal address, what is it using? I am presuming you are using the MMU - I can't remember if that requires the data cache. If you aren't using the MMU (so virtual and physical addresses match), setting the high address bit or using the defines that generate the 'io' forms of the memeory instructions would work.