[PATCH 1/8] clk/qcom: move from mach-snapdragon

Sumit Garg sumit.garg at linaro.org
Thu Oct 26 12:19:23 CEST 2023


On Thu, 26 Oct 2023 at 15:45, Sumit Garg <sumit.garg at linaro.org> wrote:
>
> On Wed, 25 Oct 2023 at 01:54, Caleb Connolly <caleb.connolly at linaro.org> wrote:
> >
> > Clock drivers don't belong here, move them to the right place and
> > declutter mach-snapdragon a bit.
> >
> > Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
> > ---
> >  arch/arm/mach-snapdragon/Makefile                                | 5 -----
> >  drivers/clk/Makefile                                             | 1 +
> >  drivers/clk/qcom/Makefile                                        | 9 +++++++++
> >  {arch/arm/mach-snapdragon => drivers/clk/qcom}/clock-apq8016.c   | 2 +-
> >  {arch/arm/mach-snapdragon => drivers/clk/qcom}/clock-apq8096.c   | 3 ++-
> >  .../clock-snapdragon.c => drivers/clk/qcom/clock-qcom.c          | 2 +-
> >  .../clock-snapdragon.h => drivers/clk/qcom/clock-qcom.h          | 0
> >  {arch/arm/mach-snapdragon => drivers/clk/qcom}/clock-qcs404.c    | 2 +-
> >  {arch/arm/mach-snapdragon => drivers/clk/qcom}/clock-sdm845.c    | 2 +-
> >  9 files changed, 16 insertions(+), 10 deletions(-)
> >
> > diff --git a/arch/arm/mach-snapdragon/Makefile b/arch/arm/mach-snapdragon/Makefile
> > index cbaaf23f6b56..497ee35cf7d3 100644
> > --- a/arch/arm/mach-snapdragon/Makefile
> > +++ b/arch/arm/mach-snapdragon/Makefile
> > @@ -2,20 +2,15 @@
> >  #
> >  # (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski at gmail.com>
> >
> > -obj-$(CONFIG_SDM845) += clock-sdm845.o
> >  obj-$(CONFIG_SDM845) += sysmap-sdm845.o
> >  obj-$(CONFIG_SDM845) += init_sdm845.o
> > -obj-$(CONFIG_TARGET_DRAGONBOARD820C) += clock-apq8096.o
> >  obj-$(CONFIG_TARGET_DRAGONBOARD820C) += sysmap-apq8096.o
> > -obj-$(CONFIG_TARGET_DRAGONBOARD410C) += clock-apq8016.o
> >  obj-$(CONFIG_TARGET_DRAGONBOARD410C) += sysmap-apq8016.o
> >  obj-y += misc.o
> > -obj-y += clock-snapdragon.o
> >  obj-y += dram.o
> >  obj-y += pinctrl-snapdragon.o
> >  obj-y += pinctrl-apq8016.o
> >  obj-y += pinctrl-apq8096.o
> >  obj-y += pinctrl-qcs404.o
> >  obj-y += pinctrl-sdm845.o
> > -obj-$(CONFIG_TARGET_QCS404EVB) += clock-qcs404.o
> >  obj-$(CONFIG_TARGET_QCS404EVB) += sysmap-qcs404.o
> > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > index 26bf429acbc0..dd90c7672e1b 100644
> > --- a/drivers/clk/Makefile
> > +++ b/drivers/clk/Makefile
> > @@ -40,6 +40,7 @@ obj-$(CONFIG_CLK_MPFS) += microchip/
> >  obj-$(CONFIG_CLK_MVEBU) += mvebu/
> >  obj-$(CONFIG_CLK_OCTEON) += clk_octeon.o
> >  obj-$(CONFIG_CLK_OWL) += owl/
> > +obj-$(CONFIG_ARCH_SNAPDRAGON) += qcom/
> >  obj-$(CONFIG_CLK_RENESAS) += renesas/
> >  obj-$(CONFIG_$(SPL_TPL_)CLK_SCMI) += clk_scmi.o
> >  obj-$(CONFIG_CLK_SIFIVE) += sifive/
> > diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile
> > new file mode 100644
> > index 000000000000..5f0c7a79d2ab
> > --- /dev/null
> > +++ b/drivers/clk/qcom/Makefile
> > @@ -0,0 +1,9 @@
> > +# SPDX-License-Identifier: GPL-2.0+
> > +#
> > +# (C) Copyright 2023 Linaro
> > +
> > +obj-y += clock-qcom.o
> > +obj-$(CONFIG_SDM845) += clock-sdm845.o
> > +obj-$(CONFIG_TARGET_DRAGONBOARD410C) += clock-apq8016.o
> > +obj-$(CONFIG_TARGET_DRAGONBOARD820C) += clock-apq8096.o
> > +obj-$(CONFIG_TARGET_QCS404EVB) += clock-qcs404.o
>
> Similarly, I think here we should introduce here SoC specific config
> options like:
>
> CONFIG_CLK_SDM845
> CONFIG_CLK_APQ8016
> CONFIG_CLK_APQ8096
> CONFIG_CLK_QCS404
>

Please ignore these comments as I see the second patch doing that
exactly. Although, I would have preferred to merge the two patches but
I am fine either way.

-Sumit

>
> > diff --git a/arch/arm/mach-snapdragon/clock-apq8016.c b/drivers/clk/qcom/clock-apq8016.c
> > similarity index 98%
> > rename from arch/arm/mach-snapdragon/clock-apq8016.c
> > rename to drivers/clk/qcom/clock-apq8016.c
> > index 23a37a1714dc..90f2a93d9ed5 100644
> > --- a/arch/arm/mach-snapdragon/clock-apq8016.c
> > +++ b/drivers/clk/qcom/clock-apq8016.c
> > @@ -13,7 +13,7 @@
> >  #include <errno.h>
> >  #include <asm/io.h>
> >  #include <linux/bitops.h>
> > -#include "clock-snapdragon.h"
> > +#include "clock-qcom.h"
> >
> >  /* GPLL0 clock control registers */
> >  #define GPLL0_STATUS_ACTIVE BIT(17)
> > diff --git a/arch/arm/mach-snapdragon/clock-apq8096.c b/drivers/clk/qcom/clock-apq8096.c
> > similarity index 98%
> > rename from arch/arm/mach-snapdragon/clock-apq8096.c
> > rename to drivers/clk/qcom/clock-apq8096.c
> > index 66184596d562..d5388c69aefe 100644
> > --- a/arch/arm/mach-snapdragon/clock-apq8096.c
> > +++ b/drivers/clk/qcom/clock-apq8096.c
> > @@ -13,7 +13,8 @@
> >  #include <errno.h>
> >  #include <asm/io.h>
> >  #include <linux/bitops.h>
> > -#include "clock-snapdragon.h"
> > +
> > +#include "clock-qcom.h"
> >
> >  /* GPLL0 clock control registers */
> >  #define GPLL0_STATUS_ACTIVE            BIT(30)
> > diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.c b/drivers/clk/qcom/clock-qcom.c
> > similarity index 99%
> > rename from arch/arm/mach-snapdragon/clock-snapdragon.c
> > rename to drivers/clk/qcom/clock-qcom.c
> > index 0ac45dce9a92..5667abeb89a4 100644
> > --- a/arch/arm/mach-snapdragon/clock-snapdragon.c
> > +++ b/drivers/clk/qcom/clock-qcom.c
> > @@ -13,7 +13,7 @@
> >  #include <errno.h>
> >  #include <asm/io.h>
> >  #include <linux/bitops.h>
> > -#include "clock-snapdragon.h"
> > +#include "clock-qcom.h"
> >
> >  /* CBCR register fields */
> >  #define CBCR_BRANCH_ENABLE_BIT  BIT(0)
> > diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.h b/drivers/clk/qcom/clock-qcom.h
> > similarity index 100%
> > rename from arch/arm/mach-snapdragon/clock-snapdragon.h
> > rename to drivers/clk/qcom/clock-qcom.h
> > diff --git a/arch/arm/mach-snapdragon/clock-qcs404.c b/drivers/clk/qcom/clock-qcs404.c
> > similarity index 99%
> > rename from arch/arm/mach-snapdragon/clock-qcs404.c
> > rename to drivers/clk/qcom/clock-qcs404.c
> > index 3357b54c30c0..80218af73ef6 100644
> > --- a/arch/arm/mach-snapdragon/clock-qcs404.c
> > +++ b/drivers/clk/qcom/clock-qcs404.c
> > @@ -11,7 +11,7 @@
> >  #include <errno.h>
> >  #include <asm/io.h>
> >  #include <linux/bitops.h>
> > -#include "clock-snapdragon.h"
> > +#include "clock-qcom.h"
> >
> >  #include <dt-bindings/clock/qcom,gcc-qcs404.h>
> >
> > diff --git a/arch/arm/mach-snapdragon/clock-sdm845.c b/drivers/clk/qcom/clock-sdm845.c
> > similarity index 98%
> > rename from arch/arm/mach-snapdragon/clock-sdm845.c
> > rename to drivers/clk/qcom/clock-sdm845.c
> > index d6df0365afca..95a057b82986 100644
> > --- a/arch/arm/mach-snapdragon/clock-sdm845.c
> > +++ b/drivers/clk/qcom/clock-sdm845.c
> > @@ -15,7 +15,7 @@
> >  #include <asm/io.h>
> >  #include <linux/bitops.h>
> >  #include <dt-bindings/clock/qcom,gcc-sdm845.h>
> > -#include "clock-snapdragon.h"
> > +#include "clock-qcom.h"
> >
> >  #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
> >
> >
> > --
> > 2.42.0
> >


More information about the U-Boot mailing list