public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: andre.przywara@arm•com (Andre Przywara)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 00/10] drivers: PL011: add ARM SBSA Generic UART support
Date: Tue, 20 Jan 2015 14:33:00 +0000	[thread overview]
Message-ID: <54BE671C.4050300@arm.com> (raw)
In-Reply-To: <20150120142612.GB6858@xora-yoga-13.xora.org.uk>



On 20/01/15 14:26, Graeme Gregory wrote:
> On Tue, Jan 20, 2015 at 01:55:01PM +0000, Andre Przywara wrote:
>> Hi Graeme,
>>
>> On 20/01/15 13:08, Graeme Gregory wrote:
>>> On Fri, Jan 16, 2015 at 05:22:56PM +0000, Andre Przywara wrote:
>>>> The ARM Server Base System Architecture[1] document describes a
>>>> generic UART which is a subset of the PL011 UART.
>>>> It lacks DMA support, baud rate control and modem status line
>>>> control, among other things.
>>>> The idea is to move the UART initialization and setup into the
>>>> firmware (which does this job today already) and let the kernel just
>>>> use the UART for sending and receiving characters.
>>>>
>>>> This patchset integrates support for this UART subset into the
>>>> existing PL011 driver - basically by refactoring some
>>>> functions and providing a new uart_ops structure for it. It also has
>>>> a separate probe function to be not dependent on AMBA/PrimeCell.
>>>> It provides a device tree binding, but can easily be adapted to other
>>>> device configuration systems.
>>>> Beside the obvious effect of code sharing reusing most of the PL011
>>>> code has the advantage of not introducing another serial device
>>>> prefix, so it can go with ttyAMA, which seems to be pretty common.
>>>>
>>>> This series relies on Dave's recent PL011 fix[2], which gets rid of
>>>> the loopback trick to get the UART going. There is a repo at [3]
>>>> (branch sbsa-uart/v1), which has this patch already integrated.
>>>>
>>>> Patch 1/10 contains a bug fix which applies to the PL011 part also,
>>>> it should be considered regardless of the rest of the series.
>>>> Patch 2-7 refactor some PL011 functions by splitting them up into
>>>> smaller pieces, so that most of the code can be reused later by the
>>>> SBSA part.
>>>> Patch 8 and 9 introduce two new properties for the vendor structure,
>>>> this is for SBSA functionality which cannot be controlled by
>>>> separate uart_ops members only.
>>>> Patch 10 then finally drops in the SBSA specific code, by providing
>>>> a new uart_ops, vendor struct and probe function for it. Also the new
>>>> device tree binding is documented.
>>>>
>>>> For testing you should be able to take any hardware which has a PL011
>>>> and change the DT to use a "arm,sbsa-uart" compatible string.
>>>> Of course testing with a real SBSA Generic UART is welcomed!
>>>>
>>> I have tested this series on Juno where it seems to work and also on FVP
>>> model where there are some issues.
>>>
>>> On the FVP when we enter usespace a couple of 32 character strings are
>>> printed then nothing else. 32 Characters is a suspicious number.
>>
>> Can you try to add:
>> -C bp.pl011_uart0.untimed_fifos=0
>> to your model command line? (given that your model supports this option)
>>
>> We discovered that lately, also not sure how the default for this
>> setting is handled these days in the various model versions.
>>
>> We are about to investigate this here atm.
>> This issue seems to be introduced by Dave's FIFO patch.
>>
> 
> With this setting userspace functions better but loses characters
> fairly regularly.

Are you using arm,sbsa-uart in the DT, but a default PL011 in the model
config? In my model the default PL011 version has a 16 byte FIFO only,
specifying:
-C bp.pl011_uart0.revision="r1p5"
upgrades this to the SBSA specified 32 byte FIFO size.
With this setting I don't see any character loses.

Cheers,
Andre.

  reply	other threads:[~2015-01-20 14:33 UTC|newest]

Thread overview: 32+ 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 ` [PATCH 01/10] drivers: PL011: avoid potential unregister_driver call Andre Przywara
2015-01-16 17:22 ` [PATCH 02/10] drivers: PL011: refactor pl011_startup() Andre Przywara
2015-01-16 17:22 ` [PATCH 03/10] drivers: PL011: refactor pl011_shutdown() Andre Przywara
2015-01-16 17:23 ` [PATCH 04/10] drivers: PL011: refactor pl011_set_termios() Andre Przywara
2015-01-16 17:23 ` [PATCH 05/10] drivers: PL011: refactor pl011_probe() 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 ` [PATCH 07/10] drivers: PL011: move cts_event workaround into separate function Andre Przywara
2015-01-16 17:23 ` [PATCH 08/10] drivers: PL011: allow avoiding UART enabling/disabling 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 ` [PATCH 10/10] drivers: PL011: add support for the ARM SBSA generic UART Andre Przywara
2015-01-16 17:34   ` Mark Rutland
2015-01-16 18:07     ` Andre Przywara
2015-01-16 18:12       ` Mark Rutland
2015-01-16 18:33         ` Andre Przywara
2015-01-16 18:37           ` Mark Rutland
2015-01-19 13:31             ` Arnd Bergmann
2015-01-19 13:44               ` Andre Przywara
2015-01-19 13:56                 ` Arnd Bergmann
2015-02-17 15:55   ` Philip Elcan
2015-02-17 16:16     ` Dave Martin
2015-03-04 17:47       ` Andre Przywara
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:53   ` Andre Przywara
2015-01-20 13:08 ` Graeme Gregory
2015-01-20 13:55   ` Andre Przywara
2015-01-20 14:26     ` Graeme Gregory
2015-01-20 14:33       ` Andre Przywara [this message]
2015-01-20 14:52         ` Graeme Gregory
2015-01-21  9:26           ` Graeme Gregory
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=54BE671C.4050300@arm.com \
    --to=andre.przywara@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox