diff options
author | rrs <rrs@FreeBSD.org> | 2009-10-29 21:14:10 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2009-10-29 21:14:10 +0000 |
commit | 73703ef8b35b29b605d67a1ee49503613fc9bf51 (patch) | |
tree | 485b801a303cd0b2bb03a373f9aabde6cbb4fe9e /sys/mips/rmi/uart_cpu_mips_xlr.c | |
parent | ff7cff02171b73dfd2f97383360251775b58438b (diff) | |
download | FreeBSD-src-73703ef8b35b29b605d67a1ee49503613fc9bf51.zip FreeBSD-src-73703ef8b35b29b605d67a1ee49503613fc9bf51.tar.gz |
White space changes
> Description of fields to fill in above: 76 columns --|
> PR: If a GNATS PR is affected by the change.
> Submitted by: If someone else sent in the change.
> Reviewed by: If someone else reviewed your modification.
> Approved by: If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email.
> Security: Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.
M rmi/xls_ehci.c
M rmi/clock.h
M rmi/xlr_pci.c
M rmi/perfmon.h
M rmi/uart_bus_xlr_iodi.c
M rmi/perfmon_percpu.c
M rmi/iodi.c
M rmi/pcibus.c
M rmi/perfmon_kern.c
M rmi/perfmon_xlrconfig.h
M rmi/pcibus.h
M rmi/tick.c
M rmi/xlr_boot1_console.c
M rmi/debug.h
M rmi/uart_cpu_mips_xlr.c
M rmi/xlrconfig.h
M rmi/interrupt.h
M rmi/xlr_i2c.c
M rmi/shared_structs.h
M rmi/msgring.c
M rmi/iomap.h
M rmi/ehcireg.h
M rmi/msgring.h
M rmi/shared_structs_func.h
M rmi/on_chip.c
M rmi/pic.h
M rmi/xlr_machdep.c
M rmi/ehcivar.h
M rmi/board.c
M rmi/clock.c
M rmi/shared_structs_offsets.h
M rmi/perfmon_utils.h
M rmi/board.h
M rmi/msgring_xls.c
M rmi/intr_machdep.c
Diffstat (limited to 'sys/mips/rmi/uart_cpu_mips_xlr.c')
-rw-r--r-- | sys/mips/rmi/uart_cpu_mips_xlr.c | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/sys/mips/rmi/uart_cpu_mips_xlr.c b/sys/mips/rmi/uart_cpu_mips_xlr.c index 6cbea14..221f411 100644 --- a/sys/mips/rmi/uart_cpu_mips_xlr.c +++ b/sys/mips/rmi/uart_cpu_mips_xlr.c @@ -30,7 +30,7 @@ * code written by Olivier Houchard. */ /* - * XLRMIPS: This file is hacked from arm/... + * XLRMIPS: This file is hacked from arm/... */ #include "opt_uart.h" @@ -55,9 +55,10 @@ static int xlr_uart_probe(struct uart_bas *bas); static void xlr_uart_init(struct uart_bas *bas, int, int, int, int); static void xlr_uart_term(struct uart_bas *bas); static void xlr_uart_putc(struct uart_bas *bas, int); + /*static int xlr_uart_poll(struct uart_bas *bas);*/ static int xlr_uart_getc(struct uart_bas *bas, struct mtx *hwmtx); -struct mtx xlr_uart_mtx; /*UartLock*/ +struct mtx xlr_uart_mtx; /* UartLock */ extern struct uart_ops uart_ns8250_ops; @@ -66,61 +67,68 @@ struct uart_ops xlr_uart_ns8250_ops = { .init = xlr_uart_init, .term = xlr_uart_term, .putc = xlr_uart_putc, - /* .poll = xlr_uart_poll, ?? */ + /* .poll = xlr_uart_poll, ?? */ .getc = xlr_uart_getc, }; bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; -static __inline void xlr_uart_lock(struct mtx *hwmtx) +static __inline void +xlr_uart_lock(struct mtx *hwmtx) { - if(!mtx_initialized(hwmtx)) + if (!mtx_initialized(hwmtx)) return; - if(!kdb_active && hwmtx != NULL) - mtx_lock_spin(hwmtx); + if (!kdb_active && hwmtx != NULL) + mtx_lock_spin(hwmtx); } -static __inline void xlr_uart_unlock(struct mtx *hwmtx) +static __inline void +xlr_uart_unlock(struct mtx *hwmtx) { - if(!mtx_initialized(hwmtx)) + if (!mtx_initialized(hwmtx)) return; - if(!kdb_active && hwmtx != NULL) - mtx_unlock_spin(hwmtx); + if (!kdb_active && hwmtx != NULL) + mtx_unlock_spin(hwmtx); } -static int xlr_uart_probe(struct uart_bas *bas) +static int +xlr_uart_probe(struct uart_bas *bas) { int res; + xlr_uart_lock(&xlr_uart_mtx); res = uart_ns8250_ops.probe(bas); xlr_uart_unlock(&xlr_uart_mtx); return res; } -static void xlr_uart_init(struct uart_bas *bas, int baudrate, int databits, - int stopbits, int parity) - +static void +xlr_uart_init(struct uart_bas *bas, int baudrate, int databits, + int stopbits, int parity) { xlr_uart_lock(&xlr_uart_mtx); - uart_ns8250_ops.init(bas,baudrate,databits,stopbits,parity); + uart_ns8250_ops.init(bas, baudrate, databits, stopbits, parity); xlr_uart_unlock(&xlr_uart_mtx); } -static void xlr_uart_term(struct uart_bas *bas) +static void +xlr_uart_term(struct uart_bas *bas) { xlr_uart_lock(&xlr_uart_mtx); uart_ns8250_ops.term(bas); xlr_uart_unlock(&xlr_uart_mtx); } -static void xlr_uart_putc(struct uart_bas *bas, int c) +static void +xlr_uart_putc(struct uart_bas *bas, int c) { xlr_uart_lock(&xlr_uart_mtx); - uart_ns8250_ops.putc(bas,c); + uart_ns8250_ops.putc(bas, c); xlr_uart_unlock(&xlr_uart_mtx); } + /* static int xlr_uart_poll(struct uart_bas *bas) { @@ -132,7 +140,8 @@ static int xlr_uart_poll(struct uart_bas *bas) } */ -static int xlr_uart_getc(struct uart_bas *bas, struct mtx *hwmtx) +static int +xlr_uart_getc(struct uart_bas *bas, struct mtx *hwmtx) { return uart_ns8250_ops.getc(bas, hwmtx); } @@ -151,7 +160,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) di->bas.chan = 0; di->bas.bst = uart_bus_space_mem; /* TODO Need to call bus_space_map() here */ - di->bas.bsh = 0xbef14000; /* Try with UART0 */ + di->bas.bsh = 0xbef14000; /* Try with UART0 */ di->bas.regshft = 2; /* divisor = rclk / (baudrate * 16); */ di->bas.rclk = 66000000; @@ -166,9 +175,10 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) return (0); } -static void xlr_uart_mtx_init(void *dummy __unused) +static void +xlr_uart_mtx_init(void *dummy __unused) { - mtx_init(&xlr_uart_mtx, "uart lock",NULL,MTX_SPIN); + mtx_init(&xlr_uart_mtx, "uart lock", NULL, MTX_SPIN); } -SYSINIT(xlr_init_uart_mtx, SI_SUB_LOCK, SI_ORDER_ANY, xlr_uart_mtx_init, NULL); +SYSINIT(xlr_init_uart_mtx, SI_SUB_LOCK, SI_ORDER_ANY, xlr_uart_mtx_init, NULL); |