Regarding parallel port in MPC8245...

Wolfgang Denk wd at
Mon Aug 2 18:13:27 EST 2004

In message <20040802072537.86860.qmail at> you wrote:
>          Im working on MPC8245 board..
> with timesys GPL-linux..
> ---------
> #include "asm/io.h"
> #include<unistd.h>
> #include<stdlib.h>
> #include<stdio.h>
> main()
> {
>         outb(0x378,0xff);
>         printf("Data sent out \n");
> }
> ----------------------------------------
> the oub function  defination is in  "asm/io.h"..which
> i included but also it is showing error undefined
> reference...

You make many errors here at once.

First: "asm/io.h" is a kernel header file, and you are  not  supposed
to include it at all in a user space application file.

Second: outb() is only available for kernel code (drivers) on PowerPC.

Third: I don't think that 0x378 will work on your MPC8245 board.

Four: eventually there is not even a PC style parallel port  on  your

> in x86 it was executed perfectly...

Not all the world is a VAX...

Check with your board manual if there is really a PC  style  parallel
port  on  it,  and if so, on which addresses it is mapped. Then study
Alessandro Rubini, Jonathan Corbet:  _"Linux  Device  Drivers"_,  2nd
Edition,  and  get  a clue about driver programming. Then implement a
device driver.

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at
FORTRAN? The syntactically incorrect statement "DO 10 I = 1.10"  will
parse  and  generate  code  creating  a  variable, DO10I, as follows:
"DO10I = 1.10" If that doesn't terrify you, it should.

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list