All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Arnd Bergmann <arnd@arndb.de>, Mark Rutland <Mark.Rutland@arm.com>
Cc: "rob.herring@linaro.org" <rob.herring@linaro.org>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"jslaby@suse.cz" <jslaby@suse.cz>,
	Dave P Martin <Dave.Martin@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 10/10] drivers: PL011: add support for the ARM SBSA generic UART
Date: Mon, 19 Jan 2015 13:44:41 +0000	[thread overview]
Message-ID: <54BD0A49.8030107@arm.com> (raw)
In-Reply-To: <5407007.ZAjCvvOzus@wuerfel>

Hi,

On 19/01/15 13:31, Arnd Bergmann wrote:
> On Friday 16 January 2015 18:37:17 Mark Rutland wrote:
>>
>>> Makes some sense, so what about:
>>> -----------------------
>>> Required properties:
>>> - compatible: must be "arm,sbsa-uart"
>>> - reg: exactly one register range
>>> - interrupts: exactly one interrupt specifier
>>>
>>> Optional properties:
>>> - current-speed : the current active speed of the UART
>>> - fifo-size : always 32 as per the SBSA specification
>>> - word-size : the number of payload bits per word
>>> - parity : used parity method, can be:
>>>       "n": no parity
>>>       "e": even parity
>>>       "o": odd parity
>>>       "m": always mark (logical 1)
>>>       "s": always space (logical 0)
>>> - stop-bits : the number of stop bits after the payload
>>
>> Generally those look fine, though someone more familiar with serial
>> should take a look.
>>
>> We can drop fifo-size given it's fixed. Anything that we know outright
>> doesn't need to be described.
>>
>> We might want to make them mandatory. I don't see any value in not
>> knowing.
> 
> I think making them optional is useless, so either make them mandatory or
> drop them if we can avoid it. Unfortunately, LCR is not part of SBSA,
> that would let us drop the properties and still report the correct settings.
> 
> Would we be better off documenting that 8-n-1 is the only allowed settting?
> I can't think of a reason why anyone would use something else.

Reading the spec again I see that 8-bit word len is mandated:
"The generic UART uses 8-bit words, equivalent to UARTLCR_H.WLEN == b11."
So given this I guess anything other than (8)n1 is pretty useless and
wouldn't probably be used anyways. This means that we can get rid of the
optional properties altogether and just add "current-speed" to the list
of required ones. I am about to implement this.

Cheers,
Andre.

WARNING: multiple messages have this Message-ID (diff)
From: andre.przywara@arm.com (Andre Przywara)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/10] drivers: PL011: add support for the ARM SBSA generic UART
Date: Mon, 19 Jan 2015 13:44:41 +0000	[thread overview]
Message-ID: <54BD0A49.8030107@arm.com> (raw)
In-Reply-To: <5407007.ZAjCvvOzus@wuerfel>

Hi,

On 19/01/15 13:31, Arnd Bergmann wrote:
> On Friday 16 January 2015 18:37:17 Mark Rutland wrote:
>>
>>> Makes some sense, so what about:
>>> -----------------------
>>> Required properties:
>>> - compatible: must be "arm,sbsa-uart"
>>> - reg: exactly one register range
>>> - interrupts: exactly one interrupt specifier
>>>
>>> Optional properties:
>>> - current-speed : the current active speed of the UART
>>> - fifo-size : always 32 as per the SBSA specification
>>> - word-size : the number of payload bits per word
>>> - parity : used parity method, can be:
>>>       "n": no parity
>>>       "e": even parity
>>>       "o": odd parity
>>>       "m": always mark (logical 1)
>>>       "s": always space (logical 0)
>>> - stop-bits : the number of stop bits after the payload
>>
>> Generally those look fine, though someone more familiar with serial
>> should take a look.
>>
>> We can drop fifo-size given it's fixed. Anything that we know outright
>> doesn't need to be described.
>>
>> We might want to make them mandatory. I don't see any value in not
>> knowing.
> 
> I think making them optional is useless, so either make them mandatory or
> drop them if we can avoid it. Unfortunately, LCR is not part of SBSA,
> that would let us drop the properties and still report the correct settings.
> 
> Would we be better off documenting that 8-n-1 is the only allowed settting?
> I can't think of a reason why anyone would use something else.

Reading the spec again I see that 8-bit word len is mandated:
"The generic UART uses 8-bit words, equivalent to UARTLCR_H.WLEN == b11."
So given this I guess anything other than (8)n1 is pretty useless and
wouldn't probably be used anyways. This means that we can get rid of the
optional properties altogether and just add "current-speed" to the list
of required ones. I am about to implement this.

Cheers,
Andre.

  reply	other threads:[~2015-01-19 13:44 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 17:22 [PATCH 00/10] drivers: PL011: add ARM SBSA Generic UART support Andre Przywara
2015-01-16 17:22 ` Andre Przywara
2015-01-16 17:22 ` [PATCH 01/10] drivers: PL011: avoid potential unregister_driver call Andre Przywara
2015-01-16 17:22   ` Andre Przywara
2015-01-16 17:22 ` [PATCH 02/10] drivers: PL011: refactor pl011_startup() Andre Przywara
2015-01-16 17:22   ` Andre Przywara
2015-01-16 17:22 ` [PATCH 03/10] drivers: PL011: refactor pl011_shutdown() Andre Przywara
2015-01-16 17:22   ` Andre Przywara
2015-01-16 17:23 ` [PATCH 04/10] drivers: PL011: refactor pl011_set_termios() Andre Przywara
2015-01-16 17:23   ` Andre Przywara
2015-01-16 17:23 ` [PATCH 05/10] drivers: PL011: refactor pl011_probe() Andre Przywara
2015-01-16 17:23   ` Andre Przywara
2015-01-16 17:23 ` [PATCH 06/10] drivers: PL011: replace UART_MIS reading with _RIS & _IMSC Andre Przywara
2015-01-16 17:23   ` Andre Przywara
2015-01-16 17:23 ` [PATCH 07/10] drivers: PL011: move cts_event workaround into separate function Andre Przywara
2015-01-16 17:23   ` Andre Przywara
2015-01-16 17:23 ` [PATCH 08/10] drivers: PL011: allow avoiding UART enabling/disabling Andre Przywara
2015-01-16 17:23   ` Andre Przywara
2015-01-16 17:23 ` [PATCH 09/10] drivers: PL011: allow to supply fixed option string Andre Przywara
2015-01-16 17:23   ` Andre Przywara
2015-01-16 17:23 ` [PATCH 10/10] drivers: PL011: add support for the ARM SBSA generic UART Andre Przywara
2015-01-16 17:23   ` Andre Przywara
2015-01-16 17:34   ` Mark Rutland
2015-01-16 17:34     ` Mark Rutland
2015-01-16 18:07     ` Andre Przywara
2015-01-16 18:07       ` Andre Przywara
2015-01-16 18:12       ` Mark Rutland
2015-01-16 18:12         ` Mark Rutland
2015-01-16 18:33         ` Andre Przywara
2015-01-16 18:33           ` Andre Przywara
2015-01-16 18:37           ` Mark Rutland
2015-01-16 18:37             ` Mark Rutland
2015-01-19 13:31             ` Arnd Bergmann
2015-01-19 13:31               ` Arnd Bergmann
2015-01-19 13:44               ` Andre Przywara [this message]
2015-01-19 13:44                 ` Andre Przywara
2015-01-19 13:56                 ` Arnd Bergmann
2015-01-19 13:56                   ` Arnd Bergmann
2015-02-17 15:55   ` Philip Elcan
2015-02-17 15:55     ` Philip Elcan
2015-02-17 16:16     ` Dave Martin
2015-02-17 16:16       ` Dave Martin
2015-03-04 17:47       ` Andre Przywara
2015-03-04 17:47         ` Andre Przywara
2015-03-05 11:15         ` Dave Martin
2015-03-05 11:15           ` Dave Martin
2015-01-16 17:31 ` [PATCH 00/10] drivers: PL011: add ARM SBSA Generic UART support Arnd Bergmann
2015-01-16 17:31   ` Arnd Bergmann
2015-01-16 17:53   ` Andre Przywara
2015-01-16 17:53     ` Andre Przywara
2015-01-20 13:08 ` Graeme Gregory
2015-01-20 13:08   ` Graeme Gregory
2015-01-20 13:55   ` Andre Przywara
2015-01-20 13:55     ` Andre Przywara
2015-01-20 14:26     ` Graeme Gregory
2015-01-20 14:26       ` Graeme Gregory
2015-01-20 14:33       ` Andre Przywara
2015-01-20 14:33         ` Andre Przywara
2015-01-20 14:52         ` Graeme Gregory
2015-01-20 14:52           ` Graeme Gregory
2015-01-21  9:26           ` Graeme Gregory
2015-01-21  9:26             ` Graeme Gregory
2015-01-20 14:32   ` Dave P Martin
2015-01-20 14:32     ` Dave P Martin

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=54BD0A49.8030107@arm.com \
    --to=andre.przywara@arm.com \
    --cc=Dave.Martin@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=rob.herring@linaro.org \
    /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.