Problems using UART on MPC5200

Detlev Zundel dzu at denx.de
Thu Jul 29 21:55:18 EST 2010


Hi Sven,

> I am using a PowerPC MPC5200 from Freescale (with STK5200-Board), ELDK 4.2
> from DENX and the Kernel 2.6.34-rc5.
>
> My Kernel is running fine. The console output is coming over the device
> ttyPSC0.
>
> In future I want to login over telnet. So I deactivated the Kerneloption
> to output the console over the UART device.

It would help if you were more precise in describing what you did and
what you try to achieve.  What exact option did you change?

> Now I want to read and write to the RS232 interface from a program.
> But when I try to open the device ttyPSC* I get the following error:
> "unable to read portsettings : Inappropriate ioctl for device"

The message means what it says - whatever device driver is connected to
the device file you open does not support the ioctl you call on it.
Now to better understand this, it would help if you tell us what device
file you open, what major and minor number this has, what /proc/devices
shows this hooks to and what ioctl you do in your application.

> What does this mean ? How can I send and receive Data from/to the UART ?

This should all work with standard procedures.

Cheers
  Detlev

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de



More information about the Linuxppc-dev mailing list