What does "cat /proc/tty/driver/PXA\ serial" say before and after?
How about stty -F /dev/ttyS2?

Right after booting:

# ./get-serialstate
serinfo:1.0 driver revision:
0: uart:FFUART mmio:0x40100000 irq:15 tx:387 rx:0 CTS|DSR|CD|RI
1: uart:BTUART mmio:0x40200000 irq:14 tx:0 rx:0
2: uart:STUART mmio:0x40700000 irq:13 tx:0 rx:0
3: uart:HWUART mmio:0x41600000 irq:0 tx:9769 rx:20793 RTS|CTS|DTR
# stty -F /dev/ttyS2
speed 9600 baud;
-brkint -imaxbel

After a short and successful conversation with the robostix:  
(note that my test script also calls stty so that changes a bit)

serinfo:1.0 driver revision:
0: uart:FFUART mmio:0x40100000 irq:15 tx:387 rx:0 CTS|DSR|CD|RI
1: uart:BTUART mmio:0x40200000 irq:14 tx:0 rx:0
2: uart:STUART mmio:0x40700000 irq:13 tx:318 rx:246
3: uart:HWUART mmio:0x41600000 irq:0 tx:19277 rx:34310 RTS|CTS|DTR
# stty -F /dev/ttyS2
speed 38400 baud;
min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost
-isig -icanon

After starting and control-C'ing my C program:
(the stty settings change a lot)

# ./get-serialstate
serinfo:1.0 driver revision:
0: uart:FFUART mmio:0x40100000 irq:15 tx:387 rx:0 RTS|CTS|DTR|DSR|CD|RI
1: uart:BTUART mmio:0x40200000 irq:14 tx:0 rx:0
2: uart:STUART mmio:0x40700000 irq:13 tx:318 rx:246 RTS|DTR
3: uart:HWUART mmio:0x41600000 irq:0 tx:30394 rx:50672 RTS|CTS|DTR
# stty -F /dev/ttyS2
speed 38400 baud;
intr = M-}; quit = M-^?; erase = M->; kill = \; eof = M-^A; eol = M-,;
eol2 = M-^A; start = M-}; stop = M-^?; susp = M->; rprnt = M-*; werase = @;
lnext = \; flush = ^C; min = 1; time = 0;
-cread
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

After starting and control-C'ing the test script (and getting the 'interrupted system call' message I described earlier)

# ./get-serialstate
serinfo:1.0 driver revision:
0: uart:FFUART mmio:0x40100000 irq:15 tx:387 rx:0 RTS|CTS|DTR|DSR|CD|RI
1: uart:BTUART mmio:0x40200000 irq:14 tx:0 rx:0
2: uart:STUART mmio:0x40700000 irq:13 tx:318 rx:246 RTS|DTR
3: uart:HWUART mmio:0x41600000 irq:0 tx:36394 rx:54432 RTS|CTS|DTR
# stty -F /dev/ttyS2
speed 38400 baud;
intr = M-}; quit = M-^?; erase = M->; kill = \; eof = M-^A; eol = M-,;
eol2 = M-^A; start = M-}; stop = M-^?; susp = M->; rprnt = M-*; werase = @;
lnext = \; flush = ^C; min = 1; time = 0;
-cread
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

If I "stty -F /dev/ttyS2 sane" I can restore the tty settings (see below), but the serial port still doesn't work.

# stty -F /dev/ttyS2 sane
# stty -F /dev/ttyS2
speed 38400 baud;
# ./test-robostix
Power-cycling the robostix
Sleeping two seconds to let the robostix boot
Testing
[it just hung, so I press control-C]
./test-robostix: 11: cannot create /dev/ttyS2: Interrupted system call
cat: /dev/ttyS2: Resource temporarily unavailable
# stty -F /dev/ttyS2
speed 38400 baud;
min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost
-isig -icanon

And one last time:

# ./get-serialstate
serinfo:1.0 driver revision:
0: uart:FFUART mmio:0x40100000 irq:15 tx:387 rx:0 RTS|CTS|DTR|DSR|CD|RI
1: uart:BTUART mmio:0x40200000 irq:14 tx:0 rx:0
2: uart:STUART mmio:0x40700000 irq:13 tx:318 rx:246 RTS|DTR
3: uart:HWUART mmio:0x41600000 irq:0 tx:55146 rx:78454 RTS|CTS|DTR

/etc/gumstix-release:

# cat /etc/gumstix-release
DISTRIB_ID='gumstix'
DISTRIB_DESCRIPTION=''
DISTRIB_RELEASE='648M'
DISTRIB_CODENAME=''
BUILD_DATE='Sat Nov 19 18:55:25 PST 2005'
BUILD_HOSTNAME='localhost.localdomain'

--
Nate Waddoups
Redmond WA USA
http://www.natew.com/   <== for nerds
http://www.featherforum.com/   <== for birds