On Thu, Mar 16, 2000 at 08:19:25AM -0800, Estabridis, Janet P wrote:
> Hi,
> I have tried to search the archives for two days, but can't.  So, I really
> need some help now.
> 
> I am using RTL1.1 on kernel 2.0.36.
> 
> I am accessing a video frame grabber at (0xB0000), but want to try and speed
> things up.  It is an ISA card.  
> 
> I have 
> 
> unsigned char  *ptr;
> 
> ptr = bus_to_virt(0xB0000);
> 
> 
> and then I can assign any value to    *(ptr+offset).
> 
> How can I do a block write in kernel space ???   I tried memset_io(  ... )
> but it is unresolved



memset_io() is the correct function to use.  It is defined in <asm/io.h>.
And remember that it takes a _bus address_, not the virtual address you
converted 0xb0000 to.  (The bus address, in this case, is 0xb0000.)

I would strongly encourage using readb() and writeb() instead of doing
straight access to memory.  There are many reasons to do this, including
portability.  Another reason is that since ptr is not declared volatile,
you may get strange reordering that is difficult to debug.  Back in
January, I suggested using the bus_to_virt() method, which is "less than
correct".

Also, that method avoids the debug checking that is done in newer 2.3.x
kernels to see if you are accessing ISA memory without mapping it. I
expect that sometime in early 2.5, drivers will have to start explicitly
mapping ISA space.




dave...

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to