[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250324062456-GYB18687@gentoo>
Date: Mon, 24 Mar 2025 06:24:56 +0000
From: Yixun Lan <dlan@...too.org>
To: Alex Elder <elder@...cstar.com>
Cc: p.zabel@...gutronix.de, mturquette@...libre.com, sboyd@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
heylenay@....org, guodong@...cstar.com, paul.walmsley@...ive.com,
palmer@...belt.com, aou@...s.berkeley.edu, spacemit@...ts.linux.dev,
devicetree@...r.kernel.org, linux-clk@...r.kernel.org,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND 4/7] clk: spacemit: define existing syscon resets
Hi Alex:
On 08:23 Sun 23 Mar , Alex Elder wrote:
> On 3/22/25 11:29 AM, Yixun Lan wrote:
> > On 10:18 Fri 21 Mar , Alex Elder wrote:
> >> Define reset controls associated with the MPMU, APBC, and APMU
> >> SpacemiT K1 CCUs. These already have clocks associated with them.
> >>
> >> Signed-off-by: Alex Elder <elder@...cstar.com>
> >> ---
> >> drivers/clk/spacemit/ccu-k1.c | 132 ++++++++++++++++++++++++++++++++++
> >> 1 file changed, 132 insertions(+)
> >>
> >> diff --git a/drivers/clk/spacemit/ccu-k1.c b/drivers/clk/spacemit/ccu-k1.c
> >> index 6d879411c6c05..be8abd27753cb 100644
> >> --- a/drivers/clk/spacemit/ccu-k1.c
> >> +++ b/drivers/clk/spacemit/ccu-k1.c
> > ..
> >> +static const struct ccu_reset_data apmu_reset_data[] = {
> >> + [RST_CCIC_4X] = RST_DATA(APMU_CCIC_CLK_RES_CTRL, 0, BIT(1)),
> >> + [RST_CCIC1_PHY] = RST_DATA(APMU_CCIC_CLK_RES_CTRL, 0, BIT(2)),
> >> + [RST_SDH_AXI] = RST_DATA(APMU_SDH0_CLK_RES_CTRL, 0, BIT(0)),
> >> + [RST_SDH0] = RST_DATA(APMU_SDH0_CLK_RES_CTRL, 0, BIT(1)),
> >> + [RST_SDH1] = RST_DATA(APMU_SDH1_CLK_RES_CTRL, 0, BIT(1)),
> >> + [RST_SDH2] = RST_DATA(APMU_SDH2_CLK_RES_CTRL, 0, BIT(1)),
> >> + [RST_USBP1_AXI] = RST_DATA(APMU_USB_CLK_RES_CTRL, 0, BIT(4)),
> >> + [RST_USB_AXI] = RST_DATA(APMU_USB_CLK_RES_CTRL, 0, BIT(0)),
> > ..
> >> + [RST_USB3_0] = RST_DATA(APMU_USB_CLK_RES_CTRL, 0,
> >> + BIT(9)|BIT(10)|BIT(11)),
> > 100 column if possible, also add one space between "BIT(9) | BIT(10) .."
> > continuous bits can just use GENMASK for short?
>
> You'll notice that every place that has multiple bits in the mask
> also have a line break. I kind of liked that as a way to highlight
> that fact (i.e., it goes beyond my preference for 80 columns).
>
ok
> I will definitely add spaces, that was a mistake not to.
>
> I will not define this with GENMASK(). In this case each bit
> represents a single reset, and so each one is significant on
> its own. It is *not* a mask of contiguous bits, it's a set
> of bits that happen to have consecutive positions.
>
ok
--
Yixun Lan (dlan)
Gentoo Linux Developer
GPG Key ID AABEFD55
Powered by blists - more mailing lists