All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Langlais <philippe.langlais@stericsson.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"gregkh@suse.de" <gregkh@suse.de>,
	"alan@lxorguk.ukuu.org.uk" <alan@lxorguk.ukuu.org.uk>,
	Ludovic BARRE <ludovic.barre@stericsson.com>,
	Vincent GUITTOT <vincent.guittot@stericsson.com>
Subject: Re: [PATCH] U6715 16550A serial driver support
Date: Thu, 5 Aug 2010 09:14:40 +0200	[thread overview]
Message-ID: <4C5A64E0.5060807@stericsson.com> (raw)
In-Reply-To: <20100804125253.3977b0d7.akpm@linux-foundation.org>



On 08/04/10 21:52, Andrew Morton wrote:
> On Mon, 2 Aug 2010 10:58:39 +0200
> Philippe Langlais<philippe.langlais@stericsson.com>  wrote:
>
>    
>> UART Features extract from STEricsson U6715 data-sheet (arm926 SoC for mobile phone):
>> * Fully compatible with industry standard 16C550 and 16C450 from various
>> manufacturers
>> * RX and TX 64 byte FIFO reduces CPU interrupts
>> * Full double buffering
>> * Modem control signals include CTS, RTS, (and DSR, DTR on UART1 only)
>> * Automatic baud rate selection
>> * Manual or automatic RTS/CTS smart hardware flow control
>> * Programmable serial characteristics:
>> ___ Baud rate generation (50 to 3.25M baud)
>> ___ 5, 6, 7 or 8-bit characters
>> ___ Even, odd or no-parity bit generation and detection
>> ___ 1, 1.5 or 2 stop bit generation
>> * Independent control of transmit, receive, line status, data set interrupts and FIFOs
>> * Full status-reporting capabilities
>> * Separate DMA signaling for RX and TX
>> * Timed interrupt to spread receive interrupt on known duration
>> * DMA time-out interrupt to allow detection of end of reception
>> * Carkit pulse coding and decoding compliant with USB carkit control interface [40]
>>
>> In 16550A auto-configuration, if the fifo size is 64 then it's an U6 16550A port
>> Add set_termios hook&  export serial8250_do_set_termios to change uart
>> clock following baudrate
>>      
> Confused.
>
>    
>> ...
>>
>> --- a/include/linux/serial_8250.h
>> +++ b/include/linux/serial_8250.h
>> @@ -32,6 +32,9 @@ struct plat_serial8250_port {
>>   	unsigned int	type;		/* If UPF_FIXED_TYPE */
>>   	unsigned int	(*serial_in)(struct uart_port *, int);
>>   	void		(*serial_out)(struct uart_port *, int, int);
>> +	void		(*set_termios)(struct uart_port *,
>> +			               struct ktermios *new,
>> +			               struct ktermios *old);
>>   };
>>
>> ...
>>
>> --- a/include/linux/serial_core.h
>> +++ b/include/linux/serial_core.h
>> @@ -279,6 +279,9 @@ struct uart_port {
>>   	unsigned char __iomem	*membase;		/* read/write[bwl] */
>>   	unsigned int		(*serial_in)(struct uart_port *, int);
>>   	void			(*serial_out)(struct uart_port *, int, int);
>> +	void			(*set_termios)(struct uart_port *,
>> +				               struct ktermios *new,
>> +				               struct ktermios *old);
>>   	unsigned int		irq;			/* irq number */
>>   	unsigned long		irqflags;		/* irq flags  */
>>   	unsigned int		uartclk;		/* base uart clock */
>>      
> The patch adds these .set_termios hooks but doesn't actually use them
> for anything.
>
> The changelog doesn't tell us _why_ this was done (it should) and
> lacking any code to look at it's all a bit mysterious.
>
>    
This feature is used in our U6715 8250 platform serial driver, to avoid
hack in 8250.c set_termios (Alan Cox requirement).
In this driver the input uart clock frequency depends on baud rate and
is computed in our set_termios override function.
The U6715 paltform serial patch has been submitted on linux-arm mailing 
list,
and is ready to enter Russell King Linux tree.

More things to do ?

Philippe

  reply	other threads:[~2010-08-05  7:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02  8:58 [PATCH] U6715 16550A serial driver support Philippe Langlais
2010-08-04 19:52 ` Andrew Morton
2010-08-05  7:14   ` Philippe Langlais [this message]
2010-08-05  7:22     ` Andrew Morton
2010-08-05  8:51       ` Philippe Langlais
2010-08-05  9:00         ` Andrew Morton
2010-08-05 23:04       ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2010-07-29 15:13 Philippe Langlais
2010-07-29 15:31 ` Alan Cox
2010-07-29 13:32 New U6715 8250 serial patch Philippe Langlais
2010-07-29 13:32 ` [PATCH] U6715 16550A serial driver support Philippe Langlais
2010-07-29 13:53   ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C5A64E0.5060807@stericsson.com \
    --to=philippe.langlais@stericsson.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.barre@stericsson.com \
    --cc=vincent.guittot@stericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.