Skip to contentSkip to conversation

msm: Dummy 8960 clock driver

PATCH New David Brown 1 participant 1 message Mar 9, 2011

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

PATCH 1/1 msm: Dummy 8960 clock driver

The clock driver for 8960 is still under development. Current hardware has all clocks enabled by default. To allow other driver development to continue, we have been using this dummy clock driver as a placeholder.

Since I've noticed a few RFC drivers sent out that mentioned this dummy driver in context, I thought it best to send it out.

This is not intended to be merged, but is merely a placeholder for other drivers to be able to make clock calls. This patch will be replaced with the real 8960 clock driver when that is ready.

---
 arch/arm/mach-msm/Makefile          |    1 +
 arch/arm/mach-msm/board-msm8960.c   |    2 +
 arch/arm/mach-msm/clock-dummy.c     |   90 +++++++++++++++++++
 arch/arm/mach-msm/clock-dummy.h     |   26 ++++++
 arch/arm/mach-msm/devices-msm8960.c |  168 ++++++++++++++++++++++++++++++++++-
 arch/arm/mach-msm/devices.h         |    3 +
 6 files changed, 289 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-msm/clock-dummy.c
 create mode 100644 arch/arm/mach-msm/clock-dummy.h
arch/arm/mach-msm/Makefile +1 -0
index 9519fd2..86acfa3 100644
@@ -8,6 +8,7 @@ obj-$(CONFIG_MSM_IOMMU) += iommu.o iommu_dev.o devices-iommu.o
 obj-$(CONFIG_ARCH_MSM7X00A) += dma.o irq.o acpuclock-arm11.o
 obj-$(CONFIG_ARCH_MSM7X30) += dma.o
 obj-$(CONFIG_ARCH_QSD8X50) += dma.o sirc.o
+obj-$(CONFIG_ARCH_MSM8960) += clock-dummy.o
 
 obj-$(CONFIG_MSM_PROC_COMM) += proc_comm.o clock-pcom.o vreg.o
 
arch/arm/mach-msm/board-msm8960.c +2 -0
index 1993721..052cb35 100644
@@ -67,11 +67,13 @@ static struct platform_device *rumi3_devices[] __initdata = {
 
 static void __init msm8960_sim_init(void)
 {
+	msm_clock_init(msm_clocks_8960, msm_num_clocks_8960);
 	platform_add_devices(sim_devices, ARRAY_SIZE(sim_devices));
 }
 
 static void __init msm8960_rumi3_init(void)
 {
+	msm_clock_init(msm_clocks_8960, msm_num_clocks_8960);
 	platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices));
 }
 
arch/arm/mach-msm/clock-dummy.c new file +90 -0

90 lines not on this page · raw message

arch/arm/mach-msm/clock-dummy.h new file +26 -0
new file mode 100644
index 0000000..109495f
@@ -0,0 +1,26 @@
+/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ARCH_ARM_MACH_MSM_CLOCK_DUMMY_H
+#define __ARCH_ARM_MACH_MSM_CLOCK_DUMMY_H
+
+extern struct clk_ops clk_ops_dummy;
+#define CLK_DUMMY(clk_name, clk_id, clk_dev, clk_flags) {	\
+	.con_id = clk_name, \
+	.dev_id = clk_dev, \
+	.clk = &(struct clk){ \
+		.dbg_name = #clk_id, \
+		.flags = clk_flags, \
+		.ops = &clk_ops_dummy, \
+	}, \
+	}
+#endif
arch/arm/mach-msm/devices-msm8960.c +167 -1

182 lines not on this page · raw message

arch/arm/mach-msm/devices.h +3 -0
index 9545c19..e7a0cb0 100644
@@ -55,4 +55,7 @@ extern unsigned msm_num_clocks_7x30;
 extern struct clk_lookup msm_clocks_8x50[];
 extern unsigned msm_num_clocks_8x50;
 
+extern struct clk_lookup msm_clocks_8960[];
+extern unsigned msm_num_clocks_8960;
+
 #endif
Signature · 4 lines
1.7.2.3

Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.