LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Memory mapped devices (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/memory-mapped-devices-909255/)

skorek 10-20-2011 09:39 PM

Memory mapped devices
 
Hi,
I am working on the board support package for a board based on Freescale SoC (P4080). The reference board has an enhanced local bus with a flash device and FPGA attached to it. Both of these devices are mapped into the memory when the board boots and the flash memory and FPGA's registers can be accessed from u-boot by reading memory. The new board will have additional device (FPGA) attached to that bus and I need to access that device.
My question is how do I control how the new FPGA's registers are mapped into the memory address space and at what address. How is that mapping controlled in u-boot or in the kernel?

I know that this is a very fundamental question. I would appreciate any pointers to get me in the right direction or to the right resources. Can you recommend any books that cover similar topics?

Thank you in advance.

nini09 10-21-2011 02:37 PM

Is the register in IO or memory mapped space for new FPGA?

skorek 10-24-2011 07:59 AM

Yes, the FPGA's datasheet lists registers that are mapped.
I am not sure where do I specify the base address at which the FPGA's is is mapped.
So far, I think I have to create a device for FPGA in the Flat Device Tree and the kernel learns the base address from there. This means that the actual mapping has to take place before kernel is booted, so somewhere in u-boot maybe?

nini09 10-24-2011 02:27 PM

About Flat Device Tree, communicating between U-boot and kernel, you can reference to following link, http://my.safaribooksonline.com/book...s/ch07lev1sec5


All times are GMT -5. The time now is 03:41 AM.