[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5221cd020bc60513df6a1c1859e1acc.sboyd@kernel.org>
Date: Tue, 28 Mar 2023 19:46:10 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Jacky Huang <ychuang570808@...il.com>, gregkh@...uxfoundation.org,
jirislaby@...nel.org, krzysztof.kozlowski+dt@...aro.org,
lee@...nel.org, mturquette@...libre.com, p.zabel@...gutronix.de,
robh+dt@...nel.org
Cc: devicetree@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
arnd@...db.de, schung@...oton.com, mjchen@...oton.com,
Jacky Huang <ychuang3@...oton.com>
Subject: Re: [PATCH v6 08/12] arm64: dts: nuvoton: Add initial ma35d1 device tree
Quoting Jacky Huang (2023-03-28 19:39:36)
> On 2023/3/29 上午 10:19, Stephen Boyd wrote:
> > What do you use the syscon for then? The clock driver must want to use
> > the syscon for something, implying that they are the same device.
>
> The register lock mechanism is applied to protect many critical
> registers from false written.
> The register lock control register is one register in system controller.
> Some registers of the clock controller are lock protected. Not only
> clock controller, but other
> IP such as RTC, PWM, ADC, etc, also have lock protected registers. All
> these IP requires
> syscon to access the lock/unlock control register in the system controller.
> That's why we add a <&sys> to the clock controller.
>
> Should we implement a ma35d1-sysctl driver to protect register_lock()
> and register_unlock()
> and export to those drivers? If yes, we can remove the <&sys> from
> clock controller.
>
You can implement the lock and unlock in the hwspinlock framework. See
drivers/hwspinlock.
Powered by blists - more mailing lists