git: 1469218c9ca2 - stable/14 - arm64: rockchip: rk3399_pmucru: Use GATE macro
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 18 Oct 2023 14:34:25 UTC
The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1469218c9ca2bd137ae978d5ae93ebbedefc52bb commit 1469218c9ca2bd137ae978d5ae93ebbedefc52bb Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2023-09-21 10:58:48 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> 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 <arm64/rockchip/clk/rk_cru.h> +#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) }; /*