uart: clean up empty lines in .c and .h files

This commit is contained in:
mjg 2020-09-01 21:50:00 +00:00
parent 6608404494
commit 638bbdba04
10 changed files with 14 additions and 23 deletions

View File

@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
#include <contrib/dev/acpica/include/accommon.h>
#include <dev/acpica/acpivar.h>
static int uart_acpi_probe(device_t dev);
static device_method_t uart_acpi_methods[] = {

View File

@ -53,7 +53,6 @@ static device_method_t uart_pccard_methods[] = {
DEVMETHOD(device_probe, uart_pccard_probe),
DEVMETHOD(device_attach, uart_pccard_attach),
DEVMETHOD(device_detach, uart_bus_detach),
{ 0, 0 }
};

View File

@ -99,7 +99,7 @@ ofw_get_console_phandle_path(phandle_t node, phandle_t *result,
output = OF_finddevice(field.buf);
if (output == -1 && size == 4)
output = OF_instance_to_package(field.ref);
if (output != -1) {
*result = output;
return (0);
@ -202,4 +202,3 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
di->parity = UART_PARITY_NONE;
return (0);
}

View File

@ -217,5 +217,4 @@
#define DIS(_bas, _r, _b) CLR((_bas), REG(_r), FLD(_r, _b))
#define IS(_bas, _r, _b) IS_SET((_bas), REG(_r), FLD(_r, _b))
#endif /* _UART_DEV_IMX5XX_H */

View File

@ -101,7 +101,7 @@ __FBSDID("$FreeBSD$");
#define AUX_MU_MCR_REG 0x04
#define AUX_MCR_RTS (1<<1)
#define AUX_MU_LSR_REG 0x05
#define LSR_RXREADY (1)
#define LSR_OVRRUN (1<<1)
@ -153,7 +153,7 @@ static struct uart_ops uart_mu_ops = {
static int
uart_mu_probe(struct uart_bas *bas)
{
return (0);
}
@ -169,7 +169,7 @@ uart_mu_param(struct uart_bas *bas, int baudrate, int databits, int stopbits,
{
uint32_t line;
uint32_t baud;
/*
* Zero all settings to make sure
* UART is disabled and not configured
@ -199,7 +199,7 @@ uart_mu_param(struct uart_bas *bas, int baudrate, int databits, int stopbits,
*/
__uart_setreg(bas, AUX_MU_BAUD_REG, ((uint32_t)(baud & 0xFFFF)));
}
/* re-enable UART */
__uart_setreg(bas, AUX_MU_CNTL_REG, CNTL_RXENAB|CNTL_TXENAB);
}
@ -283,7 +283,6 @@ static kobj_method_t uart_mu_methods[] = {
KOBJMETHOD(uart_transmit, uart_mu_bus_transmit),
KOBJMETHOD(uart_grab, uart_mu_bus_grab),
KOBJMETHOD(uart_ungrab, uart_mu_bus_ungrab),
{ 0, 0 }
};
@ -319,7 +318,7 @@ uart_mu_bus_attach(struct uart_softc *sc)
psc->aux_ier = (IER_RXENABLE|IER_TXENABLE|IER_REQUIRED);
__uart_setreg(bas, AUX_MU_IER_REG, psc->aux_ier);
sc->sc_txbusy = 0;
return (0);
}
@ -375,7 +374,7 @@ uart_mu_bus_ipend(struct uart_softc *sc)
struct uart_bas *bas;
uint32_t ints;
int ipend;
psc = (struct uart_mu_softc *)sc;
bas = &sc->sc_bas;
@ -436,11 +435,11 @@ uart_mu_bus_receive(struct uart_softc *sc)
struct uart_bas *bas;
uint32_t lsr, xc;
int rx;
bas = &sc->sc_bas;
uart_lock(sc->sc_hwmtx);
psc = (struct uart_mu_softc *)sc;
lsr = __uart_getreg(bas, AUX_MU_LSR_REG);
while (lsr & LSR_RXREADY) {
xc = __uart_getreg(bas, AUX_MU_IO_REG);
@ -470,7 +469,7 @@ uart_mu_bus_transmit(struct uart_softc *sc)
struct uart_mu_softc *psc;
struct uart_bas *bas;
int i;
psc = (struct uart_mu_softc *)sc;
bas = &sc->sc_bas;
uart_lock(sc->sc_hwmtx);

View File

@ -614,4 +614,3 @@ uart_mvebu_bus_ungrab(struct uart_softc *sc)
uart_barrier(bas);
uart_unlock(sc->sc_hwmtx);
}

View File

@ -514,19 +514,19 @@ ns8250_bus_attach(struct uart_softc *sc)
ns8250->fcr |= FCR_RX_MEDH;
} else
ns8250->fcr |= FCR_RX_MEDH;
/* Get IER mask */
ivar = 0xf0;
resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_mask",
&ivar);
ns8250->ier_mask = (uint8_t)(ivar & 0xff);
/* Get IER RX interrupt bits */
ivar = IER_EMSC | IER_ERLS | IER_ERXRDY;
resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_rxbits",
&ivar);
ns8250->ier_rxbits = (uint8_t)(ivar & 0xff);
uart_setreg(bas, REG_FCR, ns8250->fcr);
uart_barrier(bas);
ns8250_bus_flush(sc, UART_FLUSH_RECEIVER|UART_FLUSH_TRANSMITTER);

View File

@ -39,7 +39,7 @@ struct ns8250_softc {
uint8_t fcr;
uint8_t ier;
uint8_t mcr;
uint8_t ier_mask;
uint8_t ier_rxbits;
uint8_t busy_detect;

View File

@ -317,7 +317,6 @@ static kobj_method_t uart_pl011_methods[] = {
KOBJMETHOD(uart_transmit, uart_pl011_bus_transmit),
KOBJMETHOD(uart_grab, uart_pl011_bus_grab),
KOBJMETHOD(uart_ungrab, uart_pl011_bus_ungrab),
{ 0, 0 }
};
@ -331,7 +330,6 @@ static struct uart_class uart_pl011_class = {
.uc_rshift = 2
};
#ifdef FDT
static struct ofw_compat_data fdt_compat_data[] = {
{"arm,pl011", (uintptr_t)&uart_pl011_class},

View File

@ -522,4 +522,3 @@ quicc_bus_ungrab(struct uart_softc *sc)
quicc_write2(bas, rb, st | 0x9000);
uart_unlock(sc->sc_hwmtx);
}