From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-serial@vger.kernel.org
Cc: devicetree@vger.kernel.org, mbizon@freebox.fr, jogo@openwrt.org,
gregkh@linuxfoundation.org,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH 2/4] tty: serial: bcm63xx_uart: define UART_REG_SIZE constant
Date: Wed, 19 Feb 2014 15:22:45 -0800 [thread overview]
Message-ID: <1392852167-26243-3-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1392852167-26243-1-git-send-email-f.fainelli@gmail.com>
The bcm63xx_uart driver uses RSET_UART_SIZE which is a constant defined
for MIPS-based BCM63xx platforms, pull this constant value from the
MIPS-specific header and put it in include/linux/serial_bcm63xx.h to
make the driver platform agnostic.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/tty/serial/bcm63xx_uart.c | 4 ++--
include/linux/serial_bcm63xx.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index d71143e..37e7e33 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -589,7 +589,7 @@ static int bcm_uart_request_port(struct uart_port *port)
{
unsigned int size;
- size = RSET_UART_SIZE;
+ size = UART_REG_SIZE;
if (!request_mem_region(port->mapbase, size, "bcm63xx")) {
dev_err(port->dev, "Memory region busy\n");
return -EBUSY;
@@ -609,7 +609,7 @@ static int bcm_uart_request_port(struct uart_port *port)
*/
static void bcm_uart_release_port(struct uart_port *port)
{
- release_mem_region(port->mapbase, RSET_UART_SIZE);
+ release_mem_region(port->mapbase, UART_REG_SIZE);
iounmap(port->membase);
}
diff --git a/include/linux/serial_bcm63xx.h b/include/linux/serial_bcm63xx.h
index 570e964..a80aa1a 100644
--- a/include/linux/serial_bcm63xx.h
+++ b/include/linux/serial_bcm63xx.h
@@ -116,4 +116,6 @@
UART_FIFO_PARERR_MASK | \
UART_FIFO_BRKDET_MASK)
+#define UART_REG_SIZE 24
+
#endif /* _LINUX_SERIAL_BCM63XX_H */
--
1.8.3.2
next prev parent reply other threads:[~2014-02-19 23:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 23:22 [PATCH 0/4] Device Tree probing for bcm63xx-uart Florian Fainelli
2014-02-19 23:22 ` [PATCH 1/4] tty: serial: bcm63xx_uart: include linux/io.h Florian Fainelli
2014-02-19 23:22 ` Florian Fainelli [this message]
2014-02-19 23:22 ` [PATCH 3/4] tty: serial: bcm63xx_uart: add support for DT probing Florian Fainelli
2014-02-20 0:00 ` Jonas Gorski
2014-02-20 1:29 ` Florian Fainelli
2014-02-20 10:59 ` Jonas Gorski
2014-02-20 12:16 ` Arnd Bergmann
2014-02-20 16:18 ` Florian Fainelli
2014-02-20 12:21 ` Mark Rutland
2014-02-19 23:22 ` [PATCH 4/4] Documentation: devicetree: add bindings documentation for bcm63xx-uart Florian Fainelli
2014-02-20 9:45 ` Mark Rutland
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=1392852167-26243-3-git-send-email-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jogo@openwrt.org \
--cc=linux-serial@vger.kernel.org \
--cc=mbizon@freebox.fr \
/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).