mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: Mike Turquette <mturquette@linaro.org>,
	<linux-arm-kernel@lists.infradead.org>
Cc: <linux-kernel@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	James Hogan <james.hogan@imgtec.com>
Subject: [PATCH RFC 0/2] clk: add metag specific gate/mux clocks
Date: Fri, 10 May 2013 16:02:05 +0100	[thread overview]
Message-ID: <1368198127-1295-4-git-send-email-james.hogan@imgtec.com> (raw)
In-Reply-To: <1368198127-1295-1-git-send-email-james.hogan@imgtec.com>

This adds a metag architecture specific clk-gate and clk-mux which
extends the generic ones to use global lock2 to protect the register
fields. It is common with metag to have an RTOS running on a different
thread or core with access to different bits in the same register (which
contain clock gate/switch bits for other clocks). Access to such
registers must be serialised with a global lock such as the one provided
by the metag architecture port in <asm/global_lock.h>

RFC because despite extending the generic clocks there's still a bit of
duplicated code necessary. One alternative is to add special cases to
the generic clock components for when a global or callback function
based lock is desired instead of a spinlock, but I wasn't sure if that
sort of hack would really be appreciated in the generic drivers.

Comments?

James Hogan (2):
  clk: metag/clk-gate: add metag specific clock gate
  clk: metag/clk-mux: add metag specific clk-mux

 .../bindings/clock/img,meta-gate-clock.txt         |  28 +++
 .../bindings/clock/img,meta-mux-clock.txt          |  33 ++++
 drivers/clk/Makefile                               |   1 +
 drivers/clk/metag/Makefile                         |   3 +
 drivers/clk/metag/clk-gate.c                       | 179 +++++++++++++++++
 drivers/clk/metag/clk-mux.c                        | 211 +++++++++++++++++++++
 6 files changed, 455 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/img,meta-gate-clock.txt
 create mode 100644 Documentation/devicetree/bindings/clock/img,meta-mux-clock.txt
 create mode 100644 drivers/clk/metag/Makefile
 create mode 100644 drivers/clk/metag/clk-gate.c
 create mode 100644 drivers/clk/metag/clk-mux.c

-- 
1.8.1.2



  parent reply	other threads:[~2013-05-10 15:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 15:02 James Hogan
2013-05-10 15:02 ` [PATCH RFC 1/2] clk: metag/clk-gate: add metag specific clock gate James Hogan
2013-05-10 15:02 ` [PATCH RFC 2/2] clk: metag/clk-mux: add metag specific clk-mux James Hogan
2013-05-10 15:02 ` James Hogan [this message]
2013-05-10 15:09   ` [PATCH RFC 0/2] clk: add metag specific gate/mux clocks James Hogan
2013-05-10 15:02 ` [PATCH RFC 1/2] clk: metag/clk-gate: add metag specific clock gate James Hogan
2013-05-10 15:02 ` [PATCH RFC 2/2] clk: metag/clk-mux: add metag specific clk-mux James Hogan
2013-05-15 22:31 ` [PATCH RFC 0/2] clk: add metag specific gate/mux clocks Stephen Boyd
2013-05-16  9:56   ` James Hogan
2013-05-16 22:22     ` Stephen Boyd
2013-05-17  8:18       ` James Hogan
2013-05-29 17:58   ` Mike Turquette
2013-05-29 18:38 ` Mike Turquette

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=1368198127-1295-4-git-send-email-james.hogan@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®