Unable to access FPGA device with virtual address returned by ioremap()
Sri Ram Vemulpali
sri.ram.gmu06 at gmail.com
Wed Dec 25 19:00:41 EST 2013
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 at gmail.com>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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131225/a8831684/attachment.html
More information about the Kernelnewbies
mailing list