<div dir="ltr">Is there any way to specify in power pc that we can make static physical to virtual mapping which is similar to io_table_init in ARM?<div><br></div><div>choose the virtual address and map to FPGA physical address using mapping function similar to io_table_init? I am hoping that it has to be there because your platform driver requires to access the board&#39;s registers using it.</div>
<div><br></div><div>have you tried using io_remap alone instead of io_remap_nocahe?</div><div><br></div><div>or just to try</div><div><br></div><div>write a user space application with mmap to this address and try to see whether you are able to read scratch regs?</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 27, 2013 at 12:11 PM, Sri Ram Vemulpali <span dir="ltr">&lt;<a href="mailto:sri.ram.gmu06@gmail.com" target="_blank">sri.ram.gmu06@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Haresh,<div><br></div><div>iotable_init() is specific to ARM arch. I am using powerpc, seems there is no equivalent to that static function. Can you please give more input. </div>
<div><br></div><div>Thanks,</div>
<div>Sri.</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 9:01 PM, Sri Ram Vemulpali <span dir="ltr">&lt;<a href="mailto:sri.ram.gmu06@gmail.com" target="_blank">sri.ram.gmu06@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for reply Haresh. Will try and let u know.<div><br></div><div>Thanks,</div><div>Sri</div></div><div class="gmail_extra">

<div><div><br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 5:09 PM, haresh langaraman <span dir="ltr">&lt;<a href="mailto:hareshel@gmail.com" target="_blank">hareshel@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi ram, </p>
<p dir="ltr">Can you try to map the address using io_table_init table of kernel initialization code. </p>
<p dir="ltr">Thanks, <br>
Haresh. </p>
<div class="gmail_quote"><div><div>On 27 Dec 2013 05:12, &quot;Sri Ram Vemulpali&quot; &lt;<a href="mailto:sri.ram.gmu06@gmail.com" target="_blank">sri.ram.gmu06@gmail.com</a>&gt; wrote:<br type="attribution">
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div dir="ltr"><div>Hi All,</div><div><br></div>I am using custom board MPC8641d. It has all evaluation board devices connected. Apart from that an external FPGA device connected through localbus. <div><br></div><div>The localbus is at address 0xF5005000 directly connected to processor. The FPGA address in the processor realm is 0xF3800000. As per spec FPGA target interface is CS3 (chip select 3). 32-bit peripheral address bus as seen by FPGA is 0xF3800000. The global address of FPGA is 0x0BFC0000.</div>




<div><br></div><div><br></div><div>I am implementing driver for FPGA. I am using ioremap() to map to FPGA registers at location 0xF3800000. The virtual address returned by ioremap() when used with write32(), read32() at memory locations shows no response from device. FPGA has special scratch pad to which one can write and read to validate the memory map is working. When I write and read I see no value.</div>




<div><br></div><div><div>#define FCP_ADDRESS_START 0xF3800000</div><div>#define FCP_ADDRESS_END   0xF3808000</div><div>#define FCP_ADDRESS_RANGE (FCP_ADDRESS_END - FCP_ADDRESS_START)</div></div><div><br></div><div><div> void *fcp_scratch_pad;</div>




<div> char buff[10];</div></div><div><br></div><div> io_fcp_mem = ioremap_nocache( FCP_ADDRESS_START, FCP_ADDRESS_RANGE );<br></div><div><div><br></div><div>        if( ! io_fcp_mem ) {</div><div>                return -ENODEV;</div>




<div>        }</div><div><br></div><div>        printk( KERN_CRIT &quot;ioremap virt mem:%p\n&quot;, io_fcp_mem );</div><div><br></div><div>        fcp_scratch_pad = ((char*)io_fcp_mem) + 224;</div><div><br></div><div>        printk( KERN_CRIT &quot;scratch pad virt mem:%p\n&quot;, fcp_scratch_pad );</div>




<div><br></div><div>        iowrite8_rep( fcp_scratch_pad, &quot;Hello&quot;, 6 );</div><div><br></div><div>        ioread8_rep( fcp_scratch_pad, buff, 6 );</div><div><br></div><div>        printk( KERN_CRIT &quot;value read from scratch_pad:%s\n&quot;, buff );</div>




<div><br></div><div>        return 0;</div></div><div><br></div><div><br></div><div>Attached is the device tree of the board.</div><div><br></div><div>Can anyone please direct me or point where I am doing wrong. It seems I am unable to access FPGA device memory. Thanks.<br clear="all">




<div><br></div>--<br>Regards,<div>Sri.</div>
</div></div>
<br></div></div>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br>Regards,<div>Sri.</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Regards,<div>Sri.</div>
</font></span></div>
</blockquote></div><br></div>