From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/1] drivers: introduce ARM SBSA generic UART driver
Date: Fri, 29 Aug 2014 20:59:31 +0200 [thread overview]
Message-ID: <8453809.d9xRztN9Sq@wuerfel> (raw)
In-Reply-To: <1409328803-1953-2-git-send-email-andre.przywara@arm.com>
On Friday 29 August 2014 17:13:23 Andre Przywara wrote:
> The ARM Server Base System Architecture (SBSA) describes a generic
> UART which all compliant level 1 systems should implement. This is
> actually a PL011 subset, so a full PL011 implementation will satisfy
> this requirement.
> However if a system does not have a PL011, a very stripped down
> implementation complying to the SBSA defined specification will
> suffice. The Linux PL011 driver is not guaranteed to drive this
> limited device (and indeed the fast model implentation hangs the
> kernel if driven by the PL011 driver).
> So introduce a new driver just implementing the part specified by the
> SBSA (which lacks DMA, the modem control signals and many of the
> registers including baud rate control). This driver has been derived
> by the actual PL011 one, removing all unnecessary code.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Hi Andre,
Thanks for getting this driver ready. There is one high-level comment
I have: As mentioned in the discussion in
https://lkml.org/lkml/2014/7/28/386 , I think this should really be
a tty driver using tty_port, not a serial driver using uart_port.
What is the reason you chose to do a uart_port driver?
A few more details below:
> +}
> +EARLYCON_DECLARE(pl011, sbsa_uart_early_console_setup);
> +OF_EARLYCON_DECLARE(pl011, "arm,sbsa-uart", sbsa_uart_early_console_setup);
Stray 'pl011' left from copying the code?
> +static struct uart_driver sbsa_uart_reg = {
> + .owner = THIS_MODULE,
> + .driver_name = "sbsa_uart",
> + .dev_name = "ttyAMA",
> + .nr = UART_NR,
> + .cons = SBSA_UART_CONSOLE,
> +};
I don't think we should overload the ttyAMA name.
> +#ifdef CONFIG_OF
> +
> +static int dt_probe_serial_alias(int index, struct device *dev)
> +{
> + struct device_node *np;
> + static bool seen_dev_with_alias;
> + static bool seen_dev_without_alias;
> + int ret = index;
> +
> + if (!IS_ENABLED(CONFIG_OF))
> + return ret;
The #ifdef should go away since you already have the if
(!IS_ENABLED(CONFIG_OF)) logic here.
Arnd
next prev parent reply other threads:[~2014-08-29 18:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 16:13 [RFC PATCH 0/1] ARM SBSA UART driver Andre Przywara
2014-08-29 16:13 ` [RFC PATCH 1/1] drivers: introduce ARM SBSA generic " Andre Przywara
2014-08-29 18:59 ` Arnd Bergmann [this message]
2014-08-29 23:10 ` Andre Przywara
2014-09-02 19:51 ` Arnd Bergmann
2014-09-05 14:11 ` Andre Przywara
2014-09-02 3:06 ` Rob Herring
2014-09-02 10:06 ` Andre Przywara
2014-09-02 10:46 ` Mark Rutland
2014-09-02 13:20 ` Rob Herring
2014-09-02 13:48 ` Arnd Bergmann
2014-09-02 17:38 ` Rob Herring
2014-09-02 19:34 ` Arnd Bergmann
2014-09-05 14:27 ` Andre Przywara
2014-09-05 14:37 ` Andre Przywara
2014-09-02 18:19 ` Peter Hurley
2014-09-05 14:44 ` Andre Przywara
2014-09-05 15:24 ` Peter Hurley
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=8453809.d9xRztN9Sq@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).