From nobody Thu Feb 22 22:44:55 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tgp9z6Cjrz5Bb3b; Thu, 22 Feb 2024 22:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tgp9z5jp6z4FrK; Thu, 22 Feb 2024 22:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708641895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9cNSwx1WRBis7tQtkb5yukqOUUd893FQxM/pDOikeM=; b=TnrSkfrFMsJs3WFlKiu0cpy0p0ydh1TjIUrVMWqvv/XAQG1Uv6lmyxM4KgqmcXNSSK2DRj Gq4ZiN8bTN2Can2UMI8JHfI53Q0MujJUI1VWRCJTsEACSYkozeqL4ZY4+XvwtrBnGCVHK3 Tn8bjYKZxYZtown10A6rK+Ot9mDVirjsCalZoJ7vUppcdabU+t3fs1HFTR+3aGZ0p3qYQ3 nGAFtnwIKaFdaVli3XSg1brU82z5UU7k1ar3f09gkykwnljFbkeYq5r3jyCv0u+nxslvo5 +JpQ4T+wVb9H9lDzB8b7xCZxdxOybmiFgTYVLxqQZrsP3IHidhZjcnjeTai9zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708641895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9cNSwx1WRBis7tQtkb5yukqOUUd893FQxM/pDOikeM=; b=vU6m1A/kpJXLXKyKk5x/1Wad52Hvnsm/CFh03FEpXC9ce8IGvWmSzNsNg1YwGbsurOsfGU gn9G/msyDwlmtAUU9XUZHYjIuJLrIYI4otM/V4OE/gXPLGw0F6wh3msYq2kHYZU47XpcQT trTtLwqjdSvQSouHUdPEfNcUn90vDHMqIcYF1HgSiWlmpYg0GSoEsefuE4e2UdMXAcmzxH 4d07KlNihpI2skZJGGoqZ0b/316ps3/XNcAp4xSZxcgbioz+ySKyaNDgbh4nAlOoXuZXWh Gp5dp4QuOvnbManW7zPSOQHLh8G25z+lbgZGQoBvpB9G9Fs4KwtllO0bPZpYKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708641895; a=rsa-sha256; cv=none; b=RxGqvrxyH/HfeVbWDaqb5ohyPU+ZepxLvxGbNSH6Kr3/CmKvSNwI3UUcG/ikO2hDCa29Rx Zdp1aJg2Qr1iu3zzFjf3hj3idO4mNrAxTItk6hP0KBZqpxEDmpijLzKUi+EeKCcfqC1TYb 2Gz678GUNlzKG/dVeM3OBAWzW5BlYsmZOOD/YrzBBpMgvxueYmeHYCDTKPbctGS+he7QB+ tgRtBglZd+AgTd+J1xL1EvLcWKoMDqY7TyXmI6FuzN4PconWDiA7RIgfs1iJhg41iV3kUh Xw96B2OduvFbXerZyriq5LCtD8Dfz291klUYES5e7ndy+QnYAzlkcmYP6r7bfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tgp9z4ndfzqcd; Thu, 22 Feb 2024 22:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41MMit8v059869; Thu, 22 Feb 2024 22:44:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41MMit0n059866; Thu, 22 Feb 2024 22:44:55 GMT (envelope-from git) Date: Thu, 22 Feb 2024 22:44:55 GMT Message-Id: <202402222244.41MMit0n059866@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 46a968ecfb57 - main - dev/uart: name uart_class_set DATA_SET macro UART_CLASS() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46a968ecfb57ed3e7429c5ca9b184a8efe4e3d83 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=46a968ecfb57ed3e7429c5ca9b184a8efe4e3d83 commit 46a968ecfb57ed3e7429c5ca9b184a8efe4e3d83 Author: Bjoern A. Zeeb AuthorDate: 2024-02-19 20:40:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-02-22 22:43:22 +0000 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: 949670f8f466 dev/uart: Use a linker set to find uart classes Obtained from: jhb, https://github.com/freebsd/freebsd/commit/269e99ac86902127bfaee1500d8747a3c7be5912 Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D43981 --- sys/dev/uart/uart_bus.h | 3 +++ sys/dev/uart/uart_dev_ns8250.c | 2 +- sys/dev/uart/uart_dev_pl011.c | 2 +- sys/dev/uart/uart_dev_quicc.c | 1 + sys/dev/uart/uart_dev_z8530.c | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/uart/uart_bus.h b/sys/dev/uart/uart_bus.h index e42ab7f5f0ba..ccf8ad06a8ec 100644 --- a/sys/dev/uart/uart_bus.h +++ b/sys/dev/uart/uart_bus.h @@ -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; diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index f660639862ff..16c3cb2fc5a9 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -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 diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c index d91ae256f2a3..daba9d19704c 100644 --- a/sys/dev/uart/uart_dev_pl011.c +++ b/sys/dev/uart/uart_dev_pl011.c @@ -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[] = { diff --git a/sys/dev/uart/uart_dev_quicc.c b/sys/dev/uart/uart_dev_quicc.c index 444efb8c933d..bd735f2da6f4 100644 --- a/sys/dev/uart/uart_dev_quicc.c +++ b/sys/dev/uart/uart_dev_quicc.c @@ -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) { \ diff --git a/sys/dev/uart/uart_dev_z8530.c b/sys/dev/uart/uart_dev_z8530.c index 107fcb1eb4ba..2ca480a5690d 100644 --- a/sys/dev/uart/uart_dev_z8530.c +++ b/sys/dev/uart/uart_dev_z8530.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) { \