public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* io.h question
@ 2006-01-05 21:00 mcnernbm
  2006-01-05 23:54 ` Andrei Konovalov
  2006-01-06 12:03 ` Arnd Bergmann
  0 siblings, 2 replies; 5+ messages in thread
From: mcnernbm @ 2006-01-05 21:00 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/html, Size: 606 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: io.h question
@ 2006-01-09 12:16 Fillod Stephane
  2006-01-09 12:39 ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Fillod Stephane @ 2006-01-09 12:16 UTC (permalink / raw)
  To: linuxppc-embedded, Arnd Bergmann

Arnd Bergmann wrote:
>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.=A0 But when I=20
>> tried to do a io.h with in my program I added #include <asm/io.h>=A0
>> and it seems to find it with not problems but it can not find the
>> functions with in that file.=A0 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.     =20
>
>The definitions in that file are only usable from inside the kernel,
>you can not use them in a user space application.

You may not include the file directly from a user-land application
program, but you may copy/paste the in_*/out_* macros, with appropriate=20
care off course.

>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.

Sometimes, user-land access can make things simpler. YMMV.

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

For sake of curiosity, what is not reliable in mmap'ed access
by user application?

Regards,
--=20
Stephane

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-09 12:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-05 21:00 io.h question mcnernbm
2006-01-05 23:54 ` Andrei Konovalov
2006-01-06 12:03 ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2006-01-09 12:16 Fillod Stephane
2006-01-09 12:39 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox