devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/7] Clocksource changes for Pistachio CPUFreq.
@ 2015-07-27 14:00 Govindraj Raja
  2015-07-27 14:00 ` [PATCH v4 1/7] clocksource: mips-gic: Enable the clock before using it Govindraj Raja
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Govindraj Raja @ 2015-07-27 14:00 UTC (permalink / raw)
  To: linux-kernel, linux-mips, Daniel Lezcano, devicetree
  Cc: Thomas Gleixner, Andrew Bresticker, James Hartley, Govindraj Raja,
	Damien Horsley, James Hogan, Ezequiel Garcia, Ezequiel Garcia

From: Ezequiel Garcia <ezequiel.garcia@imgtec.com>

The purpose of this patchset is to support CPUFreq on Pistachio SoC.
However, given Pistachio uses the MIPS GIC clocksource and clockevent drivers
(clocked from the CPU), adding CPUFreq support needs some work.

This patchset changes the MIPS GIC clockevent driver to update the frequency of
the per-cpu clockevents using a clock notifier.

Then, we add a clocksource driver for IMG Pistachio SoC, based on the 
general purpose timers. The SoC only provides four timers, so we can't
use them to implement the four clockevents and the clocksource.

However, we can use one of these timers to provide a clocksource and a
sched clock. Given the general purpose timers are clocked from the peripheral
system clock tree, they are not affected by CPU rate changes.

Patches 1 to 3 are just style cleaning and preparation work.
Patch 4 adds the clockevent frequency update.
Patches 5 and 6 add the new clocksource driver.
Patch 7 introduces an option to enable the timer based clocksource on Pistachio.

For CPUFreq to really work, clk driver changes are needed to support MIPS PLL
clock rate change. Patches for this will be posted soon.

This series apply on v4.2-rc3. As always, comments and feedback are welcome!

Tested on Pistachio-Bring-up-Board.
Patch series based on 4.2-rc3.

Changes from v3:
---------------
No Changes from v2 re-posting the series again.

Changes from v2:
---------------
   * Fix spacing for consistency as pointed out by Sergei.

Changes since v1
----------------

Addressed review comments by Andrew:
   * Fix typo
   * Fix style issues
   * Use readl/writel accessors instead of raw variants
   * Drop spurious comment and of_device_id table
   * Add a pistachio_ prefix to clocksource functions


Ezequiel Garcia (7):
  clocksource: mips-gic: Enable the clock before using it
  clocksource: mips-gic: Add missing error returns checks
  clocksource: mips-gic: Split clocksource and clockevent initialization
  clocksource: mips-gic: Update clockevent frequency on clock rate
    changes
  clocksource: Add Pistachio SoC general purpose timer binding document
  clocksource: Add Pistachio clocksource-only driver
  mips: pistachio: Allow to enable the external timer based clocksource

 .../bindings/timer/img,pistachio-gptimer.txt       |  28 +++
 arch/mips/Kconfig                                  |   1 +
 arch/mips/pistachio/Kconfig                        |  13 ++
 drivers/clocksource/Kconfig                        |   4 +
 drivers/clocksource/Makefile                       |   1 +
 drivers/clocksource/mips-gic-timer.c               |  65 ++++++-
 drivers/clocksource/time-pistachio.c               | 194 +++++++++++++++++++++
 7 files changed, 297 insertions(+), 9 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/img,pistachio-gptimer.txt
 create mode 100644 arch/mips/pistachio/Kconfig
 create mode 100644 drivers/clocksource/time-pistachio.c

-- 
1.9.1

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

end of thread, other threads:[~2015-08-04  9:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 14:00 [PATCH v4 0/7] Clocksource changes for Pistachio CPUFreq Govindraj Raja
2015-07-27 14:00 ` [PATCH v4 1/7] clocksource: mips-gic: Enable the clock before using it Govindraj Raja
2015-08-04  9:23   ` Daniel Lezcano
     [not found] ` <1438005618-27003-1-git-send-email-govindraj.raja-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2015-07-27 14:00   ` [PATCH v4 2/7] clocksource: mips-gic: Add missing error returns checks Govindraj Raja
2015-07-27 14:00 ` [PATCH v4 3/7] clocksource: mips-gic: Split clocksource and clockevent initialization Govindraj Raja
2015-07-27 14:00 ` [PATCH v4 4/7] clocksource: mips-gic: Update clockevent frequency on clock rate changes Govindraj Raja
2015-07-28  9:51 ` [PATCH v4 0/7] Clocksource changes for Pistachio CPUFreq Ralf Baechle
2015-08-04  9:48   ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).