mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
dev/uart: name uart_class_set DATA_SET macro UART_CLASS()
Use the macro "UART_CLASS()" for the newly created data set 'uart_class_set' as we do for other data sets. This further hides the data set name. Also add UART_CLASS for quicc, which was previously not done. MFC after: 1 week Improves:949670f8f4
dev/uart: Use a linker set to find uart classes Obtained from: jhb,269e99ac86
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D43981
This commit is contained in:
parent
89c1e54a71
commit
46a968ecfb
|
@ -70,6 +70,9 @@ struct uart_class {
|
|||
u_int uc_riowidth; /* Default reg io width for this device. */
|
||||
};
|
||||
|
||||
#define UART_CLASS(class) \
|
||||
DATA_SET(uart_class_set, class)
|
||||
|
||||
struct uart_softc {
|
||||
KOBJ_FIELDS;
|
||||
struct uart_class *sc_class;
|
||||
|
|
|
@ -451,7 +451,7 @@ struct uart_class uart_ns8250_class = {
|
|||
.uc_rclk = DEFAULT_RCLK,
|
||||
.uc_rshift = 0
|
||||
};
|
||||
DATA_SET(uart_class_set, uart_ns8250_class);
|
||||
UART_CLASS(uart_ns8250_class);
|
||||
|
||||
/*
|
||||
* XXX -- refactor out ACPI and FDT ifdefs
|
||||
|
|
|
@ -340,7 +340,7 @@ static struct uart_class uart_pl011_class = {
|
|||
.uc_rclk = 0,
|
||||
.uc_rshift = 2
|
||||
};
|
||||
DATA_SET(uart_class_set, uart_pl011_class);
|
||||
UART_CLASS(uart_pl011_class);
|
||||
|
||||
#ifdef FDT
|
||||
static struct ofw_compat_data fdt_compat_data[] = {
|
||||
|
|
|
@ -273,6 +273,7 @@ struct uart_class uart_quicc_class = {
|
|||
.uc_rclk = DEFAULT_RCLK,
|
||||
.uc_rshift = 0
|
||||
};
|
||||
UART_CLASS(uart_quicc_class);
|
||||
|
||||
#define SIGCHG(c, i, s, d) \
|
||||
if (c) { \
|
||||
|
|
|
@ -309,7 +309,7 @@ struct uart_class uart_z8530_class = {
|
|||
.uc_rclk = DEFAULT_RCLK,
|
||||
.uc_rshift = 0
|
||||
};
|
||||
DATA_SET(uart_class_set, uart_z8530_class);
|
||||
UART_CLASS(uart_z8530_class);
|
||||
|
||||
#define SIGCHG(c, i, s, d) \
|
||||
if (c) { \
|
||||
|
|
Loading…
Reference in a new issue