Hi, I am working on DV EVM - DM6446 and I have to access external memory region connected to processor through AEMIF interface.
To tell you the exact details, In our custom target board which we will receive next week, there are 2 FPGA connected to 2 AEMIF interfaces of the DM6446, and I need to configure FPGA registers from Linux user space. But presently I have the DVEVM-DM6446 and I am trying to access DDR memory connected to processor through another EMIF, hoping that the same way I can access the FPGA registers!! I tried following 2 methods and both are working fine! Method 1) U32 *virt_addr; //Get the virtual address virt_addr = (U32 *)phys_to_virt(Physical address); //Write data *(virt_addr + offset) = (U32) 0x12345678; And if I print both virt and phy addresses, Virt = 0xc0000000:: Phy = 0x80000000 and offset 0xf00 Method 2) U32 *virt_addr; //Get the virtual address virt_addr = (U32 *)ioremap(Physical address, 4096); //Write data *(virt_addr + offset) = (U32) 0x12345678; And if I print both virt and phy addresses, Virt = 0xc8164f00:: Phy = 0x80000000 and offset 0xf00 I would like to know which one is the preferred/correct way to work with mapped memories? Appreciate your help !! Thanks and Regards, Nitin Joshi ________________________________ This message (including attachment if any) is confidential and may be privileged. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. MindTree reserves the right to monitor and review the content of all messages sent to or from MindTree e-mail address. Messages sent to or from this e-mail address may be stored on the MindTree e-mail system or else where.
_______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
