From nobody Wed Oct 18 14:34:25 2023 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 4S9YJd4MHsz4x6Tx; Wed, 18 Oct 2023 14:34:25 +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 4S9YJd2vcZz3Tkj; Wed, 18 Oct 2023 14:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639665; 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=AFsh0/9LqS8Db+KmDd4TrBYhK+R6yiFQdtZ3Xmj751U=; b=pLXWIKRFY8BRurm6OdOlzmXEoBQTrrN7HZp9V1BuBKFXKPwko7URkp6pXjWBW+vjkNKVpQ NK5cUxHAXeQ+AbDAFf17TPXRnTvW6cryd0JO2IjsXd3VHUPhnhJLvZxuTBt36EC5FOW/hy jVYMY2oMSw0WPrWklPR/Ye/+nfLNAOsK+HrzEZd6bQJLn7k+UaIe5flF/ooHiVby1JSWgI /OCW4HdOrtbxeeYYqq5CBNslX10IGVImiQ1TyKi++huIxR8yz1xVYIvS6vZBa6ph7cHbzu gIi8xSHEKF5JFIj3WPJUIlE90Hxa4HEg6VV8V4du8AlG/rm+gUDIY73VSgwDYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697639665; a=rsa-sha256; cv=none; b=VSG1ZAO5Ff/iWGnURX5Nii22nvIzaGsj1cMny4HTnOtCNTwAy1aIrSryaudxw9g6pWZidx ouUtKXq7Sf9HdbCAJdpLDpuXYz5tEfjSOnpKEwVRZjhFpwQ8WbAwaLFFW9S0mzbWjsfY5O wiWefbVYMm2KcUlCDOivYoIu2dqGnKfNfiDQRdnbRjEBOLuKdAdFoy3qRqEkUtanAlS6hz QZ2X9GSr3qZuMIClcHs52w3jfsok9iJP+K5d97SZNZMC4ACBDISqU+uMXc4J7F9pa0Yqx7 w8XVH2F/ZuR4tkGvy3XEvn9v7oHQAeUwh2Mvt6VYtfNowbKYUkbAIlHdy+OdyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697639665; 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=AFsh0/9LqS8Db+KmDd4TrBYhK+R6yiFQdtZ3Xmj751U=; b=hXm5V77O+VRIjnBE20K7LN/XtIuZvF0LE1Pnrl0UwykUl0giGUrcF+aXAG6va72TiDMFg6 n4gj+FXXxZe9DAGnppyzpaKXKrP8idwCw+VFM2zXJNnPqvtPXtP0tr5thqoZ2MMrfGFEGG +cgPmpi0s0Hr/6H5FdBFLMp0mljq7TDP/RyDILQRjIq4OlnVlRl9WI8kjMZbKTKcuqilSb byZmaxROunsKKtgTe+KCwkmGhSey0VUe9j+/RXymt10GWOwbcBti4HA67rifPDGblgtQC8 YTcd2JzlCO/Y6sSbrbjQSUQZW4Gc2ctXOY2LI3T6dnZPqAA7tBmxDYvm1uZlZQ== 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 4S9YJd1YJmz19GP; Wed, 18 Oct 2023 14:34:25 +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 39IEYPwx092560; Wed, 18 Oct 2023 14:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39IEYPuY092557; Wed, 18 Oct 2023 14:34:25 GMT (envelope-from git) Date: Wed, 18 Oct 2023 14:34:25 GMT Message-Id: <202310181434.39IEYPuY092557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 1469218c9ca2 - stable/14 - arm64: rockchip: rk3399_pmucru: Use GATE macro 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1469218c9ca2bd137ae978d5ae93ebbedefc52bb Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1469218c9ca2bd137ae978d5ae93ebbedefc52bb commit 1469218c9ca2bd137ae978d5ae93ebbedefc52bb Author: Emmanuel Vadot AuthorDate: 2023-09-21 10:58:48 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-18 14:33:31 +0000 arm64: rockchip: rk3399_pmucru: Use GATE macro It make it easier to read the code and the register number (cherry picked from commit 3d2ccc352db54b9fb11c4c1373a577e3e9d25114) --- sys/arm64/rockchip/clk/rk3399_pmucru.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk3399_pmucru.c b/sys/arm64/rockchip/clk/rk3399_pmucru.c index 64df47468efd..9af438254a02 100644 --- a/sys/arm64/rockchip/clk/rk3399_pmucru.c +++ b/sys/arm64/rockchip/clk/rk3399_pmucru.c @@ -46,6 +46,8 @@ #include +#define CRU_CLKGATE_CON(x) (0x100 + (x) * 0x4) + /* GATES */ #define PCLK_PMU 20 @@ -58,13 +60,13 @@ static struct rk_cru_gate rk3399_pmu_gates[] = { /* PMUCRU_CLKGATE_CON1 */ - CRU_GATE(PCLK_PMU, "pclk_pmu", "pclk_pmu_src", 0x104, 0) - CRU_GATE(PCLK_GPIO0_PMU, "pclk_gpio0_pmu", "pclk_pmu_src", 0x104, 3) - CRU_GATE(PCLK_GPIO1_PMU, "pclk_gpio1_pmu", "pclk_pmu_src", 0x104, 4) - CRU_GATE(PCLK_I2C0_PMU, "pclk_i2c0_pmu", "pclk_pmu_src", 0x104, 7) - CRU_GATE(PCLK_I2C4_PMU, "pclk_i2c4_pmu", "pclk_pmu_src", 0x104, 8) - CRU_GATE(PCLK_I2C8_PMU, "pclk_i2c8_pmu", "pclk_pmu_src", 0x104, 9) - CRU_GATE(PCLK_RKPWM_PMU, "pclk_rkpwm_pmu", "pclk_pmu_src", 0x104, 10) + GATE(PCLK_PMU, "pclk_pmu", "pclk_pmu_src", 1, 0), + GATE(PCLK_GPIO0_PMU, "pclk_gpio0_pmu", "pclk_pmu_src", 1, 3), + GATE(PCLK_GPIO1_PMU, "pclk_gpio1_pmu", "pclk_pmu_src", 1, 4), + GATE(PCLK_I2C0_PMU, "pclk_i2c0_pmu", "pclk_pmu_src", 1, 7), + GATE(PCLK_I2C4_PMU, "pclk_i2c4_pmu", "pclk_pmu_src", 1, 8), + GATE(PCLK_I2C8_PMU, "pclk_i2c8_pmu", "pclk_pmu_src", 1, 9), + GATE(PCLK_RKPWM_PMU, "pclk_rkpwm_pmu", "pclk_pmu_src", 1, 10) }; /*