Discussion:
Problem with amba-pl011 uart driver for console
Manish RATHI
2006-05-10 11:54:54 UTC
Permalink
Hi,
I am porting linux 2.6.16 on my ARM based target board.
My UART data sheet matches to pl011 driver so I am using
amba-pl011 driver as my serial and console driver.

I've 2 UART and I want to use UART1 for console. I've passed
Kernel config as "root=/dev/ram0 console=ttyAMA1,38400n8 init=linuxrc"

When amba-pl011 driver is probed, it call uart_add_one_port() defined
In serial core framework. Even for UART0 (NON console port), my code
Go into register_console()->pl011_console_setup.., effectively accessing
amba_ports[1] which is uninitialized hence go into panic.

Problem is how should amba-pl011/serial-core driver know that my console
Port is UART1. I am not finding any way to pass CONFIG_CMDLINE to there driver.

When I hardcoded console for UART1, I got the shell prompt. But when I run any command,
I loose many characters and format is disturbed.

This happen only when cmd output is little long [ say for ls -l / ].
There is no problem in typing the cmd and echo it.

I've checked IBRD and FBRD register for baud rate coefficent. They are for 38400
(which is intended baud rate ). My fifo size is 32 which I've changed in amba-pl011
Driver and UART_NR is 2.

Pls note that when I use the same ramdisk with my 2.4 driver (Not taken from open source ),
It works fine.


Can you help me in this problem?



Regards
Manish


-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
Russell King - ARM Linux
2006-05-10 12:02:44 UTC
Permalink
Post by Manish RATHI
I am porting linux 2.6.16 on my ARM based target board.
My UART data sheet matches to pl011 driver so I am using
amba-pl011 driver as my serial and console driver.
Just create the necessary AMBA device structures, pass the right
command line (as you're already doing) and it should all work without
_any_ code modifications.
Post by Manish RATHI
When amba-pl011 driver is probed, it call uart_add_one_port() defined
In serial core framework. Even for UART0 (NON console port), my code
Go into register_console()->pl011_console_setup.., effectively accessing
amba_ports[1] which is uninitialized hence go into panic.
Not surprised - such modifications aren't necessary.

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
Manish RATHI
2006-05-11 03:21:01 UTC
Permalink
I am nor clear that what should I do so that amba-pl011 driver recognize
from CONFIG_CMDLINE that uart1/uart0 is my console.
I don't want to do hardcoding.



-----Original Message-----
From: Russell King - ARM Linux [mailto:***@arm.linux.org.uk]
Sent: Wednesday, May 10, 2006 5:33 PM
To: Manish RATHI
Cc: linux-***@lists.arm.linux.org.uk
Subject: Re: Problem with amba-pl011 uart driver for console
Post by Manish RATHI
I am porting linux 2.6.16 on my ARM based target board.
My UART data sheet matches to pl011 driver so I am using
amba-pl011 driver as my serial and console driver.
Just create the necessary AMBA device structures, pass the right command
line (as you're already doing) and it should all work without _any_ code
modifications.
Post by Manish RATHI
When amba-pl011 driver is probed, it call uart_add_one_port() defined
In serial core framework. Even for UART0 (NON console port), my code
Go into register_console()->pl011_console_setup.., effectively accessing
amba_ports[1] which is uninitialized hence go into panic.
Not surprised - such modifications aren't necessary.


-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
Loading...