Beagleboard and serial port confusion (trying to configure serial lirc)


I’m still working on the getting lirc working with my beagleboard & Ubuntu.
when I’m trying to load the module, I get these messages out:
[ 12.394775] lirc_serial: module is from the staging directory, the quality is unknown, you have been warned.
[ 12.396392] lirc_serial: IRQ 74 busy

The reason I’m trying to use IRQ 74, is also from dmesg:
[ 0.000000] Kernel command line: console=ttyO2,115200n8 console=tty0 root=/dev/mmcblk0p2 rootwait ro vram=12MB omapfb.mode=dvi:1280x720MR-16@60 fixrtc buddy=none mpurate=auto
[ 0.000000] console [tty0] enabled
[ 0.764312] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
[ 0.764556] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
[ 0.764770] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
[ 1.580017] console [ttyO2] enabled
[ 1.583953] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3

I assumed this is because the serial port is taken by the console, but strangely releasing the port is not working:
ubuntu@omap:/etc$ sudo setserial /dev/ttyO2 uart none
Cannot set serial info: Invalid argument
If I try without sudo, I get “Permission denied”

Also strangely, when I try to look at the port status:
ubuntu@omap:/etc$ sudo setserial -g /dev/ttyO[0-3]
/dev/ttyO0, UART: undefined, Port: 0x0000, IRQ: 72
/dev/ttyO1, UART: undefined, Port: 0x0000, IRQ: 73
/dev/ttyO2, UART: undefined, Port: 0x0000, IRQ: 74
/dev/ttyO3, UART: undefined, Port: 0x0000, IRQ: 80

Shouldn’t there be something in that port address ? How about the undefined part ?

My /etc/serial.conf:
/dev/ttyO2 uart none

And /etc/modprobe.d/lirc-serial.conf:
options lirc_serial irq=74 io=0x49020000 debug=1

Could someone help out how the serial port is configuration should be done properly ?
Thank you.

Hi Juha,

It's also used by getty on startup, so disable that too with the
console=ttyO2 bootarg.....



Hi Robert,

I disabled the getty from attaching to ttyO2 (in /etc/init/ttyO2.conf) and also modified the boot arguments for the kernel (by modifying boot.cmd, and re-creating the boot.scr) so that console is not set to ttyO2.

I verified that I can no longer make a serial connection with putty to proper COM port (I can no longer send characters from another machine and see them via cat /dev/ttyO2)

But for some reason lirc complains the IRQ is still reserved…

When checking IRQ status with ‘cat /proc/interrupts’ I see:
– snip –
72: 0 INTC serial idle
73: 0 INTC serial idle
74: 0 INTC serial idle
77: 3114 INTC ehci_hcd:usb1
80: 2 INTC serial idle
– snip –

Also I’m puzzled why setserial is unable to release the ttyO2 (like in my previous mail, it just complains “invalid arguments”…)

On your panda, are you able to release a serial port with calling ‘sudo setserial /dev/ttyO2 uart none’ as people everywhere over the internet suggest ?

Thank again,

You should not pass any "console=ttyS0" parameters to the kernel from
within uboot. Also remove the /etc/init/ttyO2.conf file (rename it to
/root/init-ttyO2.conf or something).

After that /dev/ttyO2 should be all yours to connect up to lirc.

Please keep us posted with the results you get.