summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-05-23 19:57:44 +0000
committerian <ian@FreeBSD.org>2015-05-23 19:57:44 +0000
commit446930c903da0e661ec3358fe3105c9d0b3a9ab0 (patch)
tree4a0080b7cfbf7d40aa1d09786b08d83d06771955 /sys/arm
parente9db1ba7b7e7a1a2d2104b4bef2aba479f2c86a4 (diff)
downloadFreeBSD-src-446930c903da0e661ec3358fe3105c9d0b3a9ab0.zip
FreeBSD-src-446930c903da0e661ec3358fe3105c9d0b3a9ab0.tar.gz
MFC r277132: Rename Exynos UART driver functions. No functional change.
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/samsung/exynos/exynos_uart.c124
1 files changed, 62 insertions, 62 deletions
diff --git a/sys/arm/samsung/exynos/exynos_uart.c b/sys/arm/samsung/exynos/exynos_uart.c
index 78bc085..0b3c7f7 100644
--- a/sys/arm/samsung/exynos/exynos_uart.c
+++ b/sys/arm/samsung/exynos/exynos_uart.c
@@ -50,17 +50,17 @@ __FBSDID("$FreeBSD$");
#define DEF_CLK 100000000
static int sscomspeed(long, long);
-static int s3c24x0_uart_param(struct uart_bas *, int, int, int, int);
+static int exynos4210_uart_param(struct uart_bas *, int, int, int, int);
/*
* Low-level UART interface.
*/
-static int s3c2410_probe(struct uart_bas *bas);
-static void s3c2410_init(struct uart_bas *bas, int, int, int, int);
-static void s3c2410_term(struct uart_bas *bas);
-static void s3c2410_putc(struct uart_bas *bas, int);
-static int s3c2410_rxready(struct uart_bas *bas);
-static int s3c2410_getc(struct uart_bas *bas, struct mtx *mtx);
+static int exynos4210_probe(struct uart_bas *bas);
+static void exynos4210_init(struct uart_bas *bas, int, int, int, int);
+static void exynos4210_term(struct uart_bas *bas);
+static void exynos4210_putc(struct uart_bas *bas, int);
+static int exynos4210_rxready(struct uart_bas *bas);
+static int exynos4210_getc(struct uart_bas *bas, struct mtx *mtx);
extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs;
@@ -76,7 +76,7 @@ sscomspeed(long speed, long frequency)
}
static int
-s3c24x0_uart_param(struct uart_bas *bas, int baudrate, int databits,
+exynos4210_uart_param(struct uart_bas *bas, int baudrate, int databits,
int stopbits, int parity)
{
int brd, ulcon;
@@ -127,38 +127,38 @@ s3c24x0_uart_param(struct uart_bas *bas, int baudrate, int databits,
return (0);
}
-struct uart_ops uart_s3c2410_ops = {
- .probe = s3c2410_probe,
- .init = s3c2410_init,
- .term = s3c2410_term,
- .putc = s3c2410_putc,
- .rxready = s3c2410_rxready,
- .getc = s3c2410_getc,
+struct uart_ops uart_exynos4210_ops = {
+ .probe = exynos4210_probe,
+ .init = exynos4210_init,
+ .term = exynos4210_term,
+ .putc = exynos4210_putc,
+ .rxready = exynos4210_rxready,
+ .getc = exynos4210_getc,
};
static int
-s3c2410_probe(struct uart_bas *bas)
+exynos4210_probe(struct uart_bas *bas)
{
return (0);
}
static void
-s3c2410_init(struct uart_bas *bas, int baudrate, int databits, int stopbits,
+exynos4210_init(struct uart_bas *bas, int baudrate, int databits, int stopbits,
int parity)
{
if (bas->rclk == 0)
bas->rclk = DEF_CLK;
- KASSERT(bas->rclk != 0, ("s3c2410_init: Invalid rclk"));
+ KASSERT(bas->rclk != 0, ("exynos4210_init: Invalid rclk"));
uart_setreg(bas, SSCOM_UCON, 0);
uart_setreg(bas, SSCOM_UFCON,
UFCON_TXTRIGGER_8 | UFCON_RXTRIGGER_8 |
UFCON_TXFIFO_RESET | UFCON_RXFIFO_RESET |
UFCON_FIFO_ENABLE);
- s3c24x0_uart_param(bas, baudrate, databits, stopbits, parity);
+ exynos4210_uart_param(bas, baudrate, databits, stopbits, parity);
/* Enable UART. */
uart_setreg(bas, SSCOM_UCON, UCON_TXMODE_INT | UCON_RXMODE_INT |
@@ -167,13 +167,13 @@ s3c2410_init(struct uart_bas *bas, int baudrate, int databits, int stopbits,
}
static void
-s3c2410_term(struct uart_bas *bas)
+exynos4210_term(struct uart_bas *bas)
{
/* XXX */
}
static void
-s3c2410_putc(struct uart_bas *bas, int c)
+exynos4210_putc(struct uart_bas *bas, int c)
{
while ((bus_space_read_4(bas->bst, bas->bsh, SSCOM_UFSTAT) &
@@ -184,7 +184,7 @@ s3c2410_putc(struct uart_bas *bas, int c)
}
static int
-s3c2410_rxready(struct uart_bas *bas)
+exynos4210_rxready(struct uart_bas *bas)
{
return ((uart_getreg(bas, SSCOM_UTRSTAT) & UTRSTAT_RXREADY) ==
@@ -192,7 +192,7 @@ s3c2410_rxready(struct uart_bas *bas)
}
static int
-s3c2410_getc(struct uart_bas *bas, struct mtx *mtx)
+exynos4210_getc(struct uart_bas *bas, struct mtx *mtx)
{
int utrstat;
@@ -205,34 +205,34 @@ s3c2410_getc(struct uart_bas *bas, struct mtx *mtx)
return (bus_space_read_1(bas->bst, bas->bsh, SSCOM_URXH));
}
-static int s3c2410_bus_probe(struct uart_softc *sc);
-static int s3c2410_bus_attach(struct uart_softc *sc);
-static int s3c2410_bus_flush(struct uart_softc *, int);
-static int s3c2410_bus_getsig(struct uart_softc *);
-static int s3c2410_bus_ioctl(struct uart_softc *, int, intptr_t);
-static int s3c2410_bus_ipend(struct uart_softc *);
-static int s3c2410_bus_param(struct uart_softc *, int, int, int, int);
-static int s3c2410_bus_receive(struct uart_softc *);
-static int s3c2410_bus_setsig(struct uart_softc *, int);
-static int s3c2410_bus_transmit(struct uart_softc *);
-
-static kobj_method_t s3c2410_methods[] = {
- KOBJMETHOD(uart_probe, s3c2410_bus_probe),
- KOBJMETHOD(uart_attach, s3c2410_bus_attach),
- KOBJMETHOD(uart_flush, s3c2410_bus_flush),
- KOBJMETHOD(uart_getsig, s3c2410_bus_getsig),
- KOBJMETHOD(uart_ioctl, s3c2410_bus_ioctl),
- KOBJMETHOD(uart_ipend, s3c2410_bus_ipend),
- KOBJMETHOD(uart_param, s3c2410_bus_param),
- KOBJMETHOD(uart_receive, s3c2410_bus_receive),
- KOBJMETHOD(uart_setsig, s3c2410_bus_setsig),
- KOBJMETHOD(uart_transmit, s3c2410_bus_transmit),
+static int exynos4210_bus_probe(struct uart_softc *sc);
+static int exynos4210_bus_attach(struct uart_softc *sc);
+static int exynos4210_bus_flush(struct uart_softc *, int);
+static int exynos4210_bus_getsig(struct uart_softc *);
+static int exynos4210_bus_ioctl(struct uart_softc *, int, intptr_t);
+static int exynos4210_bus_ipend(struct uart_softc *);
+static int exynos4210_bus_param(struct uart_softc *, int, int, int, int);
+static int exynos4210_bus_receive(struct uart_softc *);
+static int exynos4210_bus_setsig(struct uart_softc *, int);
+static int exynos4210_bus_transmit(struct uart_softc *);
+
+static kobj_method_t exynos4210_methods[] = {
+ KOBJMETHOD(uart_probe, exynos4210_bus_probe),
+ KOBJMETHOD(uart_attach, exynos4210_bus_attach),
+ KOBJMETHOD(uart_flush, exynos4210_bus_flush),
+ KOBJMETHOD(uart_getsig, exynos4210_bus_getsig),
+ KOBJMETHOD(uart_ioctl, exynos4210_bus_ioctl),
+ KOBJMETHOD(uart_ipend, exynos4210_bus_ipend),
+ KOBJMETHOD(uart_param, exynos4210_bus_param),
+ KOBJMETHOD(uart_receive, exynos4210_bus_receive),
+ KOBJMETHOD(uart_setsig, exynos4210_bus_setsig),
+ KOBJMETHOD(uart_transmit, exynos4210_bus_transmit),
{0, 0 }
};
int
-s3c2410_bus_probe(struct uart_softc *sc)
+exynos4210_bus_probe(struct uart_softc *sc)
{
sc->sc_txfifosz = 16;
@@ -242,7 +242,7 @@ s3c2410_bus_probe(struct uart_softc *sc)
}
static int
-s3c2410_bus_attach(struct uart_softc *sc)
+exynos4210_bus_attach(struct uart_softc *sc)
{
sc->sc_hwiflow = 0;
@@ -252,7 +252,7 @@ s3c2410_bus_attach(struct uart_softc *sc)
}
static int
-s3c2410_bus_transmit(struct uart_softc *sc)
+exynos4210_bus_transmit(struct uart_softc *sc)
{
int i;
int reg;
@@ -260,7 +260,7 @@ s3c2410_bus_transmit(struct uart_softc *sc)
uart_lock(sc->sc_hwmtx);
for (i = 0; i < sc->sc_txdatasz; i++) {
- s3c2410_putc(&sc->sc_bas, sc->sc_txbuf[i]);
+ exynos4210_putc(&sc->sc_bas, sc->sc_txbuf[i]);
uart_barrier(&sc->sc_bas);
}
@@ -277,14 +277,14 @@ s3c2410_bus_transmit(struct uart_softc *sc)
}
static int
-s3c2410_bus_setsig(struct uart_softc *sc, int sig)
+exynos4210_bus_setsig(struct uart_softc *sc, int sig)
{
return (0);
}
static int
-s3c2410_bus_receive(struct uart_softc *sc)
+exynos4210_bus_receive(struct uart_softc *sc)
{
struct uart_bas *bas;
@@ -297,7 +297,7 @@ s3c2410_bus_receive(struct uart_softc *sc)
}
static int
-s3c2410_bus_param(struct uart_softc *sc, int baudrate, int databits,
+exynos4210_bus_param(struct uart_softc *sc, int baudrate, int databits,
int stopbits, int parity)
{
int error;
@@ -305,10 +305,10 @@ s3c2410_bus_param(struct uart_softc *sc, int baudrate, int databits,
if (sc->sc_bas.rclk == 0)
sc->sc_bas.rclk = DEF_CLK;
- KASSERT(sc->sc_bas.rclk != 0, ("s3c2410_init: Invalid rclk"));
+ KASSERT(sc->sc_bas.rclk != 0, ("exynos4210_init: Invalid rclk"));
uart_lock(sc->sc_hwmtx);
- error = s3c24x0_uart_param(&sc->sc_bas, baudrate, databits, stopbits,
+ error = exynos4210_uart_param(&sc->sc_bas, baudrate, databits, stopbits,
parity);
uart_unlock(sc->sc_hwmtx);
@@ -316,7 +316,7 @@ s3c2410_bus_param(struct uart_softc *sc, int baudrate, int databits,
}
static int
-s3c2410_bus_ipend(struct uart_softc *sc)
+exynos4210_bus_ipend(struct uart_softc *sc)
{
uint32_t ints;
uint32_t txempty, rxready;
@@ -352,31 +352,31 @@ s3c2410_bus_ipend(struct uart_softc *sc)
}
static int
-s3c2410_bus_flush(struct uart_softc *sc, int what)
+exynos4210_bus_flush(struct uart_softc *sc, int what)
{
return (0);
}
static int
-s3c2410_bus_getsig(struct uart_softc *sc)
+exynos4210_bus_getsig(struct uart_softc *sc)
{
return (0);
}
static int
-s3c2410_bus_ioctl(struct uart_softc *sc, int request, intptr_t data)
+exynos4210_bus_ioctl(struct uart_softc *sc, int request, intptr_t data)
{
return (EINVAL);
}
-struct uart_class uart_s3c2410_class = {
- "s3c2410 class",
- s3c2410_methods,
+struct uart_class uart_exynos4210_class = {
+ "exynos4210 class",
+ exynos4210_methods,
1,
- .uc_ops = &uart_s3c2410_ops,
+ .uc_ops = &uart_exynos4210_ops,
.uc_range = 8,
.uc_rclk = 0,
};
OpenPOWER on IntegriCloud