From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-serial@vger.kernel.org,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: inux-kernel@vger.kernel.org,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH 2/3] serial: 8250_rt288x: Name non-standard divisor latch reg
Date: Fri, 30 Dec 2022 13:46:02 +0200 [thread overview]
Message-ID: <20221230114603.16946-3-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20221230114603.16946-1-ilpo.jarvinen@linux.intel.com>
Instead of a literal, add proper name for the non-standard divisor
latch register.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/tty/serial/8250/8250_rt288x.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_rt288x.c b/drivers/tty/serial/8250/8250_rt288x.c
index cb9a86bd3a07..3015afb99722 100644
--- a/drivers/tty/serial/8250/8250_rt288x.c
+++ b/drivers/tty/serial/8250/8250_rt288x.c
@@ -12,6 +12,8 @@
#include "8250.h"
+#define RT288X_DL 0x28
+
#define UART_REG_UNMAPPED -1
/* Au1x00/RT288x UART hardware has a weird register layout */
@@ -60,12 +62,12 @@ static void au_serial_out(struct uart_port *p, int offset, int value)
/* Au1x00 haven't got a standard divisor latch */
static int au_serial_dl_read(struct uart_8250_port *up)
{
- return __raw_readl(up->port.membase + 0x28);
+ return __raw_readl(up->port.membase + RT288X_DL);
}
static void au_serial_dl_write(struct uart_8250_port *up, int value)
{
- __raw_writel(value, up->port.membase + 0x28);
+ __raw_writel(value, up->port.membase + RT288X_DL);
}
int au_platform_setup(struct plat_serial8250_port *p)
--
2.30.2
next prev parent reply other threads:[~2022-12-30 11:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-30 11:46 [PATCH 0/3] serial: Separate RT288x/Au1xxx code into own file Ilpo Järvinen
2022-12-30 11:46 ` [PATCH 1/3] serial: 8250: RT288x/Au1xxx code away from core Ilpo Järvinen
2022-12-30 11:46 ` Ilpo Järvinen [this message]
2022-12-30 13:04 ` [PATCH 2/3] serial: 8250_rt288x: Name non-standard divisor latch reg Philippe Mathieu-Daudé
2022-12-30 11:46 ` [PATCH 3/3] serial: 8250_rt288x: Remove unnecessary UART_REG_UNMAPPED Ilpo Järvinen
2022-12-30 13:14 ` Philippe Mathieu-Daudé
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=20221230114603.16946-3-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=inux-kernel@vger.kernel.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-serial@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).