<br><br><div><span class="gmail_quote">2006/5/25, Konstantin Boyanov &lt;<a href="mailto:kkboyanov@gmail.com">kkboyanov@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi again,<br>
<br>
The problem persist even with the new driver for 2.6 ... :(<br>
It is obvious that the driver cannot allocate memory for the window...
It fails that thing called __ioremap(), whatever it might be used for:<br>
<br>
<div style="margin-left: 40px;">[mvme6100]# vme_setoutboundwin -h<br>
vme_setoutboundwin<br>
Usage: vme_setoutboundwin &lt;options&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -w &lt;window&gt;&nbsp;&nbsp;&nbsp;&nbsp; window(where 0&lt;=window&lt;=6)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -m
&lt;mode&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address mode (where
0=A16,1=A24,2=A32,3=A64,4=CRCSR)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -p
&lt;protocol&gt;&nbsp;&nbsp; protocol (where
1=SCT,2=BLT,4=MBLT,8=2eVME,0x10=2eSST)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -a &lt;VME addr&gt;&nbsp;&nbsp; VME address<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -d &lt;data width&gt; data width (8, 16, 32, 64)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -s &lt;window
size&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; window size (where 0
&lt; window_size &lt;= 0x400000)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-v&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Be more verbose<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Give this (short) help<br>
<br>
[mvme6100]# vme_setoutboundwin -w0 -m0 -p8 -a0x8800 -d16 -s400000 -v<br>
window = 0, mode = 0 protocol 0x8 vme_addr = 0x8800 data width = 16
<span class="q"><br>
__ioremap(): phys addr 01000000 is RAM lr d100be34
<br></span><span class="q">
vmedrv: No memory for outbound window
<br></span>
ioctl VME_IOCTL_SET_OUTBOUND failed.: Cannot allocate memory
<br>
</div>
<br>
While searching on the web for information about __ioremap I found this:<br>
<pre style="margin-left: 40px;"><font size="-1">/*<br> * Remap an arbitrary physical address space into the kernel virtual<br> * address space. Needed when the kernel wants to access high addresses<br> * directly.<br> *<br>
<br> * NOTE! We need to allow non-page-aligned mappings too: we will obviously<br> * have to convert them into an offset in a page-aligned mapping, but the<br> * caller shouldn't need to know that small detail.<br> */</font>
</pre>


<div style="margin-left: 40px;"><br>
</div>

<pre style="margin-left: 40px;">And another thing - people should not be using __ioremap() unless they<br>have a _good_ _reason_ in their driver.  They should be using ioremap()<br>instead.  __ioremap() is an architecture implementation detail which
<br><br>has no interface stability guarantees _at all_.</pre>
How's that? So it seems that the kernel can't translate the accesses to the VME bus propperly. Any ideas how to fix that?<br>
Actually I cant figure out why configuring a single outbound window is
so damn tough to achieve.e maybe I'm missing some crutial settings. I
tried to set up the window attribute register, and the outbound
translation offset register in the hope to fit in the needed size for
the window, but again failed. I'm trying to get frustrated about that...<br>
<br>
Best regards,<br><span class="sg">
Konstantin<br>
<br>

</span></blockquote></div>&nbsp;P.S. I forgot to say that on the target
I'm booting a bare kernel with not much functionality. Could it be that
there are missing some settings for the virtual memory management,
which are crutial for the VME driver? I mean the above message <span class="q">&quot;phys
addr 01000000 is RAM lr d100be34&quot; is somehow connected to
misconfiguration (or lack of it at all) for the virtual memory pages?
That's what I can think of som late in the night...<br>
Thank you anyways.<br>
<br>
Best regards,<br>
Konstantin<br>
</span><br>