Skip to contentSkip to conversation

ARM: nomadik: convert to generic clock

PATCH New Linus Walleij 2 participants 2 messages Jun 6, 2012 – Jun 12, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 4/7 ARM: nomadik: convert to generic clock

Remove more custom stuff by simply converting the Nomadik machine to use generic clocks and move the driver to drivers/clk.

---
 arch/arm/Kconfig                          |    2 +-
 arch/arm/mach-nomadik/Makefile            |    2 -
 arch/arm/mach-nomadik/clock.c             |   75 -----------------------------
 arch/arm/mach-nomadik/clock.h             |   15 ------
 arch/arm/mach-nomadik/cpu-8815.c          |    4 +-
 drivers/clk/Makefile                      |    1 +
 drivers/clk/clk-nomadik.c                 |   47 ++++++++++++++++++
 include/linux/platform_data/clk-nomadik.h |    2 +
 8 files changed, 53 insertions(+), 95 deletions(-)
 delete mode 100644 arch/arm/mach-nomadik/clock.c
 delete mode 100644 arch/arm/mach-nomadik/clock.h
 create mode 100644 drivers/clk/clk-nomadik.c
 create mode 100644 include/linux/platform_data/clk-nomadik.h
arch/arm/Kconfig +1 -1
index b649c59..e58bda6 100644
@@ -912,7 +912,7 @@ config ARCH_NOMADIK
 	select ARM_AMBA
 	select ARM_VIC
 	select CPU_ARM926T
-	select CLKDEV_LOOKUP
+	select COMMON_CLK
 	select GENERIC_CLOCKEVENTS
 	select PINCTRL
 	select MIGHT_HAVE_CACHE_L2X0
arch/arm/mach-nomadik/Makefile +0 -2
index a6bbd1a..a42c9a3 100644
@@ -7,8 +7,6 @@
 
 # Object file lists.
 
-obj-y			+= clock.o
-
 # Cpu revision
 obj-$(CONFIG_NOMADIK_8815) += cpu-8815.o
 
arch/arm/mach-nomadik/clock.c deleted +0 -75

75 lines not on this page · raw message

arch/arm/mach-nomadik/clock.h deleted +0 -15
deleted file mode 100644
index 78da2e7..0000000
@@ -1,15 +0,0 @@
-
-/*
- *  linux/arch/arm/mach-nomadik/clock.h
- *
- *  Copyright (C) 2009 Alessandro Rubini
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-struct clk {
-	unsigned long		rate;
-};
-
-int __init clk_init(void);
arch/arm/mach-nomadik/cpu-8815.c +2 -2
index 88511fe..6fd8e46 100644
@@ -25,6 +25,7 @@
 #include <linux/slab.h>
 #include <linux/irq.h>
 #include <linux/dma-mapping.h>
+#include <linux/platform_data/clk-nomadik.h>
 
 #include <plat/gpio-nomadik.h>
 #include <mach/hardware.h>
@@ -35,7 +36,6 @@
 #include <asm/cacheflush.h>
 #include <asm/hardware/cache-l2x0.h>
 
-#include "clock.h"
 #include "cpu-8815.h"
 
 /* The 8815 has 4 GPIO blocks, let's register them immediately */
@@ -123,7 +123,7 @@ void __init cpu8815_init_irq(void)
 	 * Init clocks here so that they are available for system timer
 	 * initialization.
 	 */
-	clk_init();
+	nomadik_clk_init();
 }
 
 /*
drivers/clk/Makefile +1 -0
index b9a5158..26b6b92 100644
@@ -3,5 +3,6 @@ obj-$(CONFIG_CLKDEV_LOOKUP)	+= clkdev.o
 obj-$(CONFIG_COMMON_CLK)	+= clk.o clk-fixed-rate.o clk-gate.o \
 				   clk-mux.o clk-divider.o clk-fixed-factor.o
 # SoCs specific
+obj-$(CONFIG_ARCH_NOMADIK)	+= clk-nomadik.o
 obj-$(CONFIG_ARCH_MXS)		+= mxs/
 obj-$(CONFIG_PLAT_SPEAR)	+= spear/
drivers/clk/clk-nomadik.c new file +47 -0

47 lines not on this page · raw message

include/linux/platform_data/clk-nomadik.h new file +2 -0
new file mode 100644
index 0000000..5713c87
@@ -0,0 +1,2 @@
+/* Minimal platform data header */
+void nomadik_clk_init(void);
Signature · 1 line
1.7.7.6
#1 lore raw

PATCH 4/7 ARM: nomadik: convert to generic clock

Quoted 5 lines · Linus Walleij

Remove more custom stuff by simply converting the Nomadik machine to use generic clocks and move the driver to drivers/clk.

Looks like you've already sent a pull request for this to arm-soc. FWIW you can add my Acked-by for this patch.

Regards,
Mike