LKML Archive on
 help / color / Atom feed
From: Alexandre Belloni <>
To: Rob Herring <>,
	Daniel Lezcano <>
Cc: Nicolas Ferre <>,
	Mark Rutland <>,
	Thomas Gleixner <>,,,,
	Alexandre Belloni <>
Subject: [PATCH 0/3] clocksource/drivers: introduce DT based selection
Date: Wed, 13 Dec 2017 19:53:10 +0100
Message-ID: <> (raw)


Currently, many drivers implement their own strategy when trying to find
which timer to use as the clocksource or the clockevent.

The main issue is that this selection is happen early in the boot
process and the kernel doesn't always have all the information to take
that decision.

So we end up with suboptimal solutions, especially in a multiplatform
kernel setting, as the MXC_USE_EPIT or ATMEL_TCB_CLKSRC_BLOCK kernel
config option.

There is also the clocksource kernel parameter only implemented in

Other drivers are registering the first seen timer as a clockevent, the
other one as a clocksource.

Also, this will help in the goal of separating clocksource and
clockevent drivers (see 376bc27150f180d9f5eddec6a14117780177589d)

Patch 1 documents the binding, patch 2 implements the parsing of the
chosen node and finally, patch 3 makes use of the parsing in a driver to
give an overview of how it is working.

Alexandre Belloni (3):
  dt-bindings: chosen: Add clocksource and clockevent selection
  clocksource/drivers: timer-of: parse the chosen node
  clocksource/drivers: integrator-ap: parse the chosen node

 Documentation/devicetree/bindings/chosen.txt | 20 ++++++++++++++++++++
 drivers/clocksource/Kconfig                  |  1 +
 drivers/clocksource/timer-integrator-ap.c    | 11 +++++++++++
 drivers/clocksource/timer-of.c               | 22 ++++++++++++++++++++++
 drivers/clocksource/timer-of.h               |  3 +++
 5 files changed, 57 insertions(+)


             reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13 18:53 Alexandre Belloni [this message]
2017-12-13 18:53 ` [PATCH 1/3] dt-bindings: chosen: Add clocksource and clockevent selection Alexandre Belloni
2017-12-13 22:57   ` Rob Herring
2017-12-14 20:01     ` Boris Brezillon
2017-12-14 20:37       ` Boris Brezillon
2017-12-15 11:40       ` Mark Rutland
2017-12-15 12:30         ` Boris Brezillon
2017-12-15 11:32   ` Mark Rutland
2017-12-18 19:46     ` Boris Brezillon
2017-12-16  1:57   ` Grygorii Strashko
2017-12-18 17:12     ` Tony Lindgren
2017-12-19 23:20     ` Rob Herring
2017-12-13 18:53 ` [PATCH 2/3] clocksource/drivers: timer-of: parse the chosen node Alexandre Belloni
2017-12-13 18:53 ` [PATCH 3/3] clocksource/drivers: integrator-ap: " Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone