[PATCH 1/2] clk: Move clk-gate2 to clock driver directory

Sean Anderson seanga2 at gmail.com
Mon Jan 27 02:16:54 CET 2020


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 <seanga2 at gmail.com>
>> ---
>>  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.



More information about the U-Boot mailing list