From: Jiri Slaby <jirislaby@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-serial@vger.kernel.org,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] serial: 8250: RT288x/Au1xxx code away from core
Date: Fri, 6 Jan 2023 08:36:39 +0100 [thread overview]
Message-ID: <d5c3269e-b91b-087f-6b85-f5d55a9f7185@kernel.org> (raw)
In-Reply-To: <20230105124744.105950-2-ilpo.jarvinen@linux.intel.com>
On 05. 01. 23, 13:47, Ilpo Järvinen wrote:
> A non-trivial amount of RT288x/Au1xxx code is encapsulated into
> ifdeffery in 8250_port / 8250_early and some if UPIO_AU blocks.
>
> Create a separate file from them. Add mapsize, bugs, and divisor latch
> read/write functions into plat_serial8250_port to carry the setup
> necessary for these devices over to uart port.
>
> Also handle errors properly in the cases where RT288x/Au1xxx code is
> not configured.
>
> It seems that 0x1000 mapsize is likely overkill but I've kept it the
> same as previously (the value was shrunk to that value in b2b13cdfd05e
> ("SERIAL 8250: Fixes for Alchemy UARTs.")). Seemingly, the driver only
> needs to access register at 0x28 for the divisor latch.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
...
> --- a/include/linux/serial_8250.h
> +++ b/include/linux/serial_8250.h
...
> @@ -28,8 +32,11 @@ struct plat_serial8250_port {
> unsigned char has_sysrq; /* supports magic SysRq */
> upf_t flags; /* UPF_* flags */
> unsigned int type; /* If UPF_FIXED_TYPE */
> + unsigned short bugs; /* port bugs */
> unsigned int (*serial_in)(struct uart_port *, int);
> void (*serial_out)(struct uart_port *, int, int);
> + int (*dl_read)(struct uart_8250_port *);
> + void (*dl_write)(struct uart_8250_port *, int);
int sounds very weird in the write-to-HW context. Even though both the
others and the original are ints. They all should be simply u32.
> void (*set_termios)(struct uart_port *,
> struct ktermios *new,
> const struct ktermios *old);
Could you document the new ones in the kernel-doc manner above the
structure (but so far without the kernel-doc tag /**). So that:
1) they are documented
2) once someone decides to document them all, they can simply stick the
kernel-doc tag and document only the rest.
thanks,
--
js
suse labs
next prev parent reply other threads:[~2023-01-06 7:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 12:47 [PATCH v2 0/3] serial: Separate RT288x/Au1xxx code into own file Ilpo Järvinen
2023-01-05 12:47 ` [PATCH v2 1/3] serial: 8250: RT288x/Au1xxx code away from core Ilpo Järvinen
2023-01-06 7:36 ` Jiri Slaby [this message]
2023-01-05 12:47 ` [PATCH v2 2/3] serial: 8250_rt288x: Name non-standard divisor latch reg Ilpo Järvinen
2023-01-05 12:47 ` [PATCH v2 3/3] serial: 8250_rt288x: Remove unnecessary UART_REG_UNMAPPED Ilpo Järvinen
2023-01-06 8:16 ` Jiri Slaby
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=d5c3269e-b91b-087f-6b85-f5d55a9f7185@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=philmd@linaro.org \
--cc=tsbogend@alpha.franken.de \
/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
all inboxes | Powered by JetHome®