Re: Unable to access FPGA device with virtual address returned by ioremap()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I am working on bringing up the board sbc8641d, which is mostly similar in architecture with mpc8641 having powerpc chip. My board was customized to add FPGA. This FPGA was connected as external device to processor on localbus. I am able to boot the board recognizing all the devices, except external device FPGA. I have mentioned in device tree regarding chip select and parent address in processor address domain of the fpga. I have the following problems.

I have problem with ioremap returned address to my device in kernel. ioremap takes physical address and returns virtual address. Using virtual address, if I write and read, there is no result. I am writing to scratch pad of the FPGA chip and reading from it the same string. When I read I do not see any value (written value). 

Second, when I typed command in bash "free -m" it shows 756MB memory available. I used "mem=" commandline option to tell kernel to use 4GB memory. But after booting the kernel it still shows 756MB. Why is this?

Can anyone help me in directing where to look to debug this. Any help would be appreciated. Is there anyway I can debug pagetables to see what is happening at address mapping level.

NOTE: this is powerpc architecture. 


On Wed, Dec 25, 2013 at 3:53 PM, Sri Ram Vemulpali <sri.ram.gmu06@xxxxxxxxx> wrote:
Hi All,

I am working on bringing up the board sbc8641d, which is mostly similar in architecture with mpc8641 having powerpc chip. My board was customized to add FPGA. This FPGA was connected as external device to processor on localbus. I am able to boot the board recognizing all the devices, except external device FPGA. I have mentioned in device tree regarding chip select and parent address in processor address domain of the fpga. I have the following problems.

I have problem with ioremap returned address to my device in kernel. ioremap takes physical address and returns virtual address. Using virtual address, if I write and read, there is no result. I am writing to scratch pad of the FPGA chip and reading from it the same string. When I read I do not see any value (written value). 

Second, when I typed command in bash "free -m" it shows 756MB memory available. I used "mem=" commandline option to tell kernel to use 4GB memory. But after booting the kernel it still shows 756MB. Why is this?

Can anyone help me in directing where to look to debug this. Any help would be appreciated. Is there anyway I can debug pagetables to see what is happening at address mapping level.

NOTE: this is powerpc architecture. 

--
Regards,
Sri.



--
Regards,
Sri.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux