Re: [linux-sunxi] [PATCH v4 13/13] ARM: sunxi: Add Kconfig for sunxi clocks
From: Priit Laes
Date: Wed Mar 16 2016 - 13:20:54 EST
On Thu, 2016-03-17 at 00:04 +0800, Vishnu Patekar wrote:
> This patch adds Kconfig for sunxi clocks.
> Currently, only sun8i-apb0 and sun9i-cpus clocks are added.
> It'll help to use common clocks across different SOCs.
> We can switch to kconfig for other clocks in future.
>
> Signed-off-by: Vishnu Patekar <vishnupatekar0510@xxxxxxxxx>
> ---
> Âdrivers/clk/KconfigÂÂÂÂÂÂÂÂ| 1 +
> Âdrivers/clk/sunxi/KconfigÂÂ| 5 +++++
> Âdrivers/clk/sunxi/Makefile | 4 ++--
> Â3 files changed, 8 insertions(+), 2 deletions(-)
> Âcreate mode 100644 drivers/clk/sunxi/Kconfig
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index eca8e01..f9f42e6 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -210,3 +210,4 @@ source "drivers/clk/mvebu/Kconfig"
> Â
> Âsource "drivers/clk/samsung/Kconfig"
> Âsource "drivers/clk/tegra/Kconfig"
> +source "drivers/clk/sunxi/Kconfig"
Should be in alphabetic order?
> diff --git a/drivers/clk/sunxi/Kconfig b/drivers/clk/sunxi/Kconfig
> new file mode 100644
> index 0000000..3e8ede4
> --- /dev/null
> +++ b/drivers/clk/sunxi/Kconfig
> @@ -0,0 +1,5 @@
> +config CLK_SUN8I_APB0
> + def_bool MACH_SUN9I || MACH_SUN8I
> +
> +config CLK_SUN9I_CPUS
> + def_bool MACH_SUN9I || MACH_SUN8I
> diff --git a/drivers/clk/sunxi/Makefile b/drivers/clk/sunxi/Makefile
> index 3fd7901..38dfca8 100644
> --- a/drivers/clk/sunxi/Makefile
> +++ b/drivers/clk/sunxi/Makefile
> @@ -17,8 +17,8 @@ obj-y += clk-sun9i-core.o
> Âobj-y += clk-sun9i-mmc.o
> Âobj-y += clk-usb.o
> Â
> -obj-$(CONFIG_MACH_SUN9I) += clk-sun8i-apb0.o
> -obj-$(CONFIG_MACH_SUN9I) += clk-sun9i-cpus.o
> +obj-$(CONFIG_CLK_SUN8I_APB0) += clk-sun8i-apb0.o
> +obj-$(CONFIG_CLK_SUN9I_CPUS) += clk-sun9i-cpus.o
> Â
> Âobj-$(CONFIG_MFD_SUN6I_PRCM) += \
> Â clk-sun6i-ar100.o clk-sun6i-apb0.o clk-sun6i-apb0-gates.o \
> --Â
> 1.9.1
>