From: Sean Anderson Date: Sun, 26 Jan 2020 20:16:54 -0500 Subject: [PATCH 1/2] clk: Move clk-gate2 to clock driver directory In-Reply-To: <20200126215553.4f81afa4@jawa> References: <11be51b3-3f69-22af-1fbd-83ad7497ff44@gmail.com> <20200126215553.4f81afa4@jawa> Message-ID: <38ea716e-3a97-b895-f182-b4f94506fcaf@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 1/26/20 3:55 PM, Lukasz Majewski wrote: > Hi Sean > >> Make clk-gate2 available for use outside of imx. >> >> Signed-off-by: Sean Anderson >> --- >> drivers/clk/Makefile | 1 + >> drivers/clk/{imx => }/clk-gate2.c | 20 ++++---------------- >> drivers/clk/imx/Makefile | 2 +- >> drivers/clk/imx/clk.h | 5 ----- >> include/linux/clk-provider.h | 24 ++++++++++++++++++++---- >> 5 files changed, 26 insertions(+), 26 deletions(-) >> rename drivers/clk/{imx => }/clk-gate2.c (85%) >> > > This patch is OK. > > Unfortunately, it causes buildman errors for sandbox: > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/641984485 > > The problem is with local sandbox copy of struct clk_gate2 > > In the clk_sandbox_ccf.c file we can re-use the 'flags' member (instead > of defined for sandbox 'state') of now widely exposed struct clk_gate2 > (@ clk-provider.h) and > > #define SANDBOX_CCF_ENABLE (1UL << 31) > #define SANDBOX_CCF_DISABLE (0UL << 31) > > and remove the local sandbox copy. > > > How to reproduce: > > make mrproper; make sandbox_defconfig; make -j4 > ./u-boot -i -d arch/sandbox/dts/test.dtb > => ut dm clk > > > (I'm going to drop this patch from PR which I'm preparing now and > depending on it "clk: Add option to restrict clk-gate2 to one bit > toggle"). That's fine. This may be a bit of duplicate effort wrt the patches I submitted regarding clk_composite. I originally used clk_gate2 in my k210 patch series, but I switched over to using clk_composite because it could function in the same manner.