mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fixup! clk: at91: Port at91 DT clock code
@ 2017-03-20  3:08 Andrey Smirnov
  2017-03-20  7:51 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Smirnov @ 2017-03-20  3:08 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

---

Sascha:

Here's a a bunch of fixes for "clk: at91: Port at91 DT clock code"

 - arch/arm/Kconfig to prevent breaking the build for AT91
   targets that don't use DT based clock

 - arch/arm/mach-at91/Makefile is need to avoid building non DT clock
   code for targets that do use DT (I accidentaly put put that change
   into a differnet, not yet submitted, patch by mistake)

 - The rest is whitespace damage removal

Let me know if it'd be more convenient to drop the original patch and
re-spin a v2 of it.

Thanks,
Andrey Smirnov

 arch/arm/Kconfig                  |  2 +-
 arch/arm/mach-at91/Makefile       |  7 ++++++-
 drivers/clk/at91/Makefile         |  2 --
 drivers/clk/at91/clk-main.c       |  2 +-
 drivers/clk/at91/clk-peripheral.c |  1 -
 drivers/clk/at91/clk-pll.c        |  2 +-
 drivers/clk/at91/clk-smd.c        |  2 +-
 drivers/clk/at91/clk-utmi.c       |  2 +-
 drivers/clk/at91/sckc.c           | 10 +++++-----
 9 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e69ed9c..e9d96b7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -55,7 +55,7 @@ config ARCH_AT91
 	select HAVE_MACH_ARM_HEAD
 	select HAVE_CLK
 	select PINCTRL_AT91
-	select COMMON_CLK_AT91
+	select COMMON_CLK_AT91 if COMMON_CLK_OF_PROVIDER
 
 config ARCH_BCM2835
 	bool "Broadcom BCM2835 boards"
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 1f63b09..e207690 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -1,4 +1,9 @@
-obj-y += setup.o clock.o irq_fixup.o
+obj-y += setup.o irq_fixup.o
+
+ifeq ($(CONFIG_COMMON_CLK_OF_PROVIDER),)
+obj-y += clock.o
+endif
+
 obj-$(CONFIG_CMD_AT91_BOOT_TEST) += boot_test_cmd.o
 
 obj-$(CONFIG_AT91_BOOTSTRAP) += bootstrap.o
diff --git a/drivers/clk/at91/Makefile b/drivers/clk/at91/Makefile
index bfd06a4..13e67bd 100644
--- a/drivers/clk/at91/Makefile
+++ b/drivers/clk/at91/Makefile
@@ -11,5 +11,3 @@ obj-$(CONFIG_HAVE_AT91_USB_CLK)		+= clk-usb.o
 obj-$(CONFIG_HAVE_AT91_SMD)		+= clk-smd.o
 obj-$(CONFIG_HAVE_AT91_H32MX)		+= clk-h32mx.o
 obj-$(CONFIG_HAVE_AT91_GENERATED_CLK)	+= clk-generated.o
-
-
diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c
index c1f47c1..55bc618 100644
--- a/drivers/clk/at91/clk-main.c
+++ b/drivers/clk/at91/clk-main.c
@@ -530,7 +530,7 @@ at91_clk_register_sam9x5_main(struct regmap *regmap,
 	clkmain->clk.parent_names = xzalloc(parents_array_size);
 	memcpy(clkmain->clk.parent_names, parent_names, parents_array_size);
 	clkmain->clk.num_parents = num_parents;
-	
+
 	/* init.flags = CLK_SET_PARENT_GATE; */
 
 	clkmain->regmap = regmap;
diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-peripheral.c
index 4a76c46..bbe6ffa 100644
--- a/drivers/clk/at91/clk-peripheral.c
+++ b/drivers/clk/at91/clk-peripheral.c
@@ -427,4 +427,3 @@ static int of_at91sam9x5_clk_periph_setup(struct device_node *np)
 }
 CLK_OF_DECLARE(at91sam9x5_clk_periph, "atmel,at91sam9x5-clk-peripheral",
 	       of_at91sam9x5_clk_periph_setup);
-
diff --git a/drivers/clk/at91/clk-pll.c b/drivers/clk/at91/clk-pll.c
index cf38742..e0af4fe 100644
--- a/drivers/clk/at91/clk-pll.c
+++ b/drivers/clk/at91/clk-pll.c
@@ -483,7 +483,7 @@ of_at91_clk_pll_setup(struct device_node *np,
 		kfree(characteristics);
 		return PTR_ERR(clk);
 	}
-	
+
 	return of_clk_add_provider(np, of_clk_src_simple_get, clk);
 }
 
diff --git a/drivers/clk/at91/clk-smd.c b/drivers/clk/at91/clk-smd.c
index 0d72491..65c53ef 100644
--- a/drivers/clk/at91/clk-smd.c
+++ b/drivers/clk/at91/clk-smd.c
@@ -28,7 +28,7 @@
 struct at91sam9x5_clk_smd {
 	struct clk clk;
 	struct regmap *regmap;
-	const char *parent_names[SMD_SOURCE_MAX];	
+	const char *parent_names[SMD_SOURCE_MAX];
 };
 
 #define to_at91sam9x5_clk_smd(clk) \
diff --git a/drivers/clk/at91/clk-utmi.c b/drivers/clk/at91/clk-utmi.c
index 96ce35c..6a1c5e6 100644
--- a/drivers/clk/at91/clk-utmi.c
+++ b/drivers/clk/at91/clk-utmi.c
@@ -55,7 +55,7 @@ static int clk_utmi_enable(struct clk *clk)
 static int clk_utmi_is_enabled(struct clk *clk)
 {
 	struct clk_utmi *utmi = to_clk_utmi(clk);
-	
+
 	return clk_utmi_ready(utmi->regmap);
 }
 
diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c
index debaafb..bac2899 100644
--- a/drivers/clk/at91/sckc.c
+++ b/drivers/clk/at91/sckc.c
@@ -118,7 +118,7 @@ static const struct clk_ops slow_osc_ops = {
 	.is_enabled = clk_slow_osc_is_enabled,
 };
 
-static struct clk * 
+static struct clk *
 at91_clk_register_slow_osc(void __iomem *sckcr,
 			   const char *name,
 			   const char *parent_name,
@@ -155,7 +155,7 @@ at91_clk_register_slow_osc(void __iomem *sckcr,
 	return &osc->clk;
 }
 
-static void 
+static void
 of_at91sam9x5_clk_slow_osc_setup(struct device_node *np, void __iomem *sckcr)
 {
 	struct clk *clk;
@@ -219,7 +219,7 @@ static const struct clk_ops slow_rc_osc_ops = {
 	.recalc_rate = clk_slow_rc_osc_recalc_rate,
 };
 
-static struct clk * 
+static struct clk *
 at91_clk_register_slow_rc_osc(void __iomem *sckcr,
 			      const char *name,
 			      unsigned long frequency,
@@ -251,7 +251,7 @@ at91_clk_register_slow_rc_osc(void __iomem *sckcr,
 	return &osc->clk;
 }
 
-static void 
+static void
 of_at91sam9x5_clk_slow_rc_osc_setup(struct device_node *np, void __iomem *sckcr)
 {
 	struct clk *clk;
@@ -309,7 +309,7 @@ static const struct clk_ops sam9x5_slow_ops = {
 	.get_parent = clk_sam9x5_slow_get_parent,
 };
 
-static struct clk * 
+static struct clk *
 at91_clk_register_sam9x5_slow(void __iomem *sckcr,
 			      const char *name,
 			      const char **parent_names,
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fixup! clk: at91: Port at91 DT clock code
  2017-03-20  3:08 [PATCH] fixup! clk: at91: Port at91 DT clock code Andrey Smirnov
@ 2017-03-20  7:51 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2017-03-20  7:51 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: barebox

On Sun, Mar 19, 2017 at 08:08:02PM -0700, Andrey Smirnov wrote:
> ---
> 
> Sascha:
> 
> Here's a a bunch of fixes for "clk: at91: Port at91 DT clock code"
> 
>  - arch/arm/Kconfig to prevent breaking the build for AT91
>    targets that don't use DT based clock
> 
>  - arch/arm/mach-at91/Makefile is need to avoid building non DT clock
>    code for targets that do use DT (I accidentaly put put that change
>    into a differnet, not yet submitted, patch by mistake)
> 
>  - The rest is whitespace damage removal
> 
> Let me know if it'd be more convenient to drop the original patch and
> re-spin a v2 of it.

I like --fixup patches because they tell me (or git) exactly what to do.

And thanks for the fix before I was complaining. The autobuilder already
detected this build failure ;)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-20  7:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20  3:08 [PATCH] fixup! clk: at91: Port at91 DT clock code Andrey Smirnov
2017-03-20  7:51 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox