io.h question

3 messages, 3 authors, 2006-01-08 · open the first message on its own page

io.h question

From: <hidden>
Date: 2006-01-05 21:15:52

<FONT face=3D"Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=
=3D2><div>I finally noticed out=5F8 and in=5F8 and what not are located in =
the ppc io.h file in the kernel development download.&nbsp; But when I trie=
d to do a io.h with in my program I added #include &lt;asm/io.h&gt;&nbsp; a=
nd it seems to find it with not problems but it can not find the functions =
with in that file.&nbsp; Am i missing a define I need to set or something s=
o I can see the right files with in io.h I am compiling for a ppc405 on a x=
ilinx virtex 4 board.</div><DIV>Thanks</DIV><DIV>Brett</DIV></FONT>=

Re: io.h question

From: Arnd Bergmann <arnd@arndb.de>
Date: 2006-01-06 12:04:06

On Thursday 05 January 2006 21:00, mcnernbm@notes.udayton.edu wrote:
I finally noticed out_8 and in_8 and what not are located in the
ppc io.h file in the kernel development download.  But when I 
tried to do a io.h with in my program I added #include <asm/io.h> 
and it seems to find it with not problems but it can not find the
functions with in that file.  Am i missing a define I need to set
or something so I can see the right files with in io.h I am
compiling for a ppc405 on a xilinx virtex 4 board.      
The definitions in that file are only usable from inside the kernel,
you can not use them in a user space application.

The correct way to solve your problem (which you did not explain, so
I can only guess) would be to write a kernel device driver for
the peripherial you want to drive, at least if it does not exist yet.

For prototyping, you can play with mmap() on /dev/mem in a user
application, but that is often not very reliable.

	Arnd <><

Re: io.h question

From: Andrei Konovalov <hidden>
Date: 2006-01-08 18:57:18

Brett,

Is your program a kernel module?
asm/io.h is for kernel only (everything is inside #ifdef __KERNEL__ ... #endif)
Probably you build the module incorrectly so that __KERNEL__ is not defined.
If this is the case you may want to check the LDD book, chapter 2 "Building and
Running Modules".

Thanks,
Andrei

mcnernbm@notes.udayton.edu wrote:
I finally noticed out_8 and in_8 and what not are located in the ppc 
io.h file in the kernel development download.  But when I tried to do a 
io.h with in my program I added #include <asm/io.h>  and it seems to 
find it with not problems but it can not find the functions with in that 
file.  Am i missing a define I need to set or something so I can see the 
right files with in io.h I am compiling for a ppc405 on a xilinx virtex 
4 board.
Thanks
Brett


------------------------------------------------------------------------

_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help