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:
Bjoern A. Zeeb 2024-02-19 20:40:03 +00:00
parent 89c1e54a71
commit 46a968ecfb
5 changed files with 7 additions and 3 deletions

View file

@ -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;

View file

@ -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

View file

@ -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[] = {

View file

@ -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) { \

View file

@ -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) { \