Thread (31 messages) 31 messages, 4 authors, 2013-12-22
STALE4595d
Revisions (23)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v1 [diff vs current]
  6. v1 [diff vs current]
  7. v1 [diff vs current]
  8. v1 [diff vs current]
  9. v1 [diff vs current]
  10. v1 [diff vs current]
  11. v4 [diff vs current]
  12. v4 [diff vs current]
  13. v4 [diff vs current]
  14. v4 [diff vs current]
  15. v4 [diff vs current]
  16. v4 [diff vs current]
  17. v4 [diff vs current]
  18. v4 [diff vs current]
  19. v5 [diff vs current]
  20. v4 [diff vs current]
  21. v5 current
  22. v5 [diff vs current]
  23. v5 [diff vs current]

[RFC PATCH v5 1/4] cpufreq: Add a cpufreq driver for Marvell Dove

From: Jason Cooper <hidden>
Date: 2013-12-20 03:32:57
Also in: linux-pm

On Tue, Dec 17, 2013 at 10:41:10PM +0100, Andrew Lunn wrote:
quoted hunk ↗ jump to hunk
The Marvell Dove SoC can run the CPU at two frequencies. The high
frequencey is from a PLL, while the lower is the same as the DDR
clock. Add a cpufreq driver to swap between these frequences.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
Sort header files
Remove unneeded header files
Notify only on change
Use get_cpu_device(0), devm_clk_get()
Use platform_get_resource_byname()
Error check clk_prepare_enable()
Comment the interrupt handler

rebase onto 3.13-rc2 linux-next
use target_index
---
 .../devicetree/bindings/cpufreq/cpufreq-dove.txt   |  23 ++
 drivers/cpufreq/Kconfig.arm                        |   5 +
 drivers/cpufreq/Makefile                           |   1 +
 drivers/cpufreq/dove-cpufreq.c                     | 265 +++++++++++++++++++++
 4 files changed, 294 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-dove.txt
 create mode 100644 drivers/cpufreq/dove-cpufreq.c
diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-dove.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-dove.txt
new file mode 100644
index 000000000000..f95cc2234fc1
--- /dev/null
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-dove.txt
@@ -0,0 +1,23 @@
+Dove cpufreq driver
+-------------------
+
+The Dove cpufreq driver makes use of the pmu node in the device tree.
I would prefer to reword this to make it OS-agnostic.  The cpufreq
driver is Linux-specific.
+
+Required properties:
+- compatibility: Must be "marvell,dove-pmu"
+- interrupts:	 Interrupt to know the completion of cpu frequency change.
+- clocks:	 phandles and clock specifiers pairs for CPU and DDR clock
+- clock-names: 	 "cpu" and "ddr"
+- reg: 		 Address ranges of the PMU. Two ranges are expected.
Shall we define the two ranges?
+
+Example:
+
+	pmu: pmu at d0000 {
+		compatible = "marvell,dove-pmu";
+		reg = <0xd0000 0x0700>,
+		      <0xd8000 0x0140>;
+		clocks = <&core_clk 1>, <&core_clk 3>;
+		clock-names = "cpu", "ddr";
+		interrupt-parent = <&pmu_intc>;
+		interrupts = <0>;
+	};
thx,

Jason.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help