[Top] [All Lists]

Re: [PATCH] serial_txx9: forcibly init the spinlock for PCI UART used as

To: Russell King <>
Subject: Re: [PATCH] serial_txx9: forcibly init the spinlock for PCI UART used as a console
From: Sergei Shtylylov <>
Date: Tue, 27 Dec 2005 21:54:10 +0300
Cc: Atsushi Nemoto <>,,
In-reply-to: <>
Organization: MostaVista Software Inc.
Original-recipient: rfc822;
References: <> <> <> <> <>
User-agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.2) Gecko/20040803

Russell King wrote:

On Wed, Dec 28, 2005 at 12:34:57AM +0900, Atsushi Nemoto wrote:

Thanks for your comment.

On Tue, 27 Dec 2005 16:38:54 +0300, Sergei Shtylylov <> 

The problem is not just only spin_lock_init.  The parameters of
"console=" option (baudrate, etc.) are not passed for PCI UART.

sshtylyov>     They are -- uart_add_one_port() calls console setup
sshtylyov> once more when registering PCI UART with serial code.

Yes, you are right.  I missed the register_console call in
uart_add_one_port().  So your patch will fix the problem.  But I
suppose the spinlock should be initialized in serial_core.  How about

I think you're layering work-around on top of work-around on top of
work-around here.

I think the first thing you need to resolve is the way you're
registering your ports.  Firstly, if you're solely PCI-based, there's

No, this is not the case. The driver serves Toshiba TX39xx/49xx SOC UARTs as well as the compatible PCI UART (GOKU-S).

no need to pre-register all the uart ports at driver initialisation
time.  Consequently, there's no need to remove them all when you
remove the module.

Hm, then the driver would need to keep track of which ports it has registered and which it has not...

> Secondly, the upshot of this is that you only call uart_add_one_port()
> when you initialise a PCI card.

Not the case as I've said; uart_add_one_port() should be called on driver startup anyway...

This should result in a cleaner implementation, and the console will
not be started until you detect the PCI card.

It will still be started with the console_initcall() in this driver, if that code is not also deleted...

WBR, Sergei

<Prev in Thread] Current Thread [Next in Thread>