linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lubomir Rintel <lkundrak@v3.sk>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Stephen Boyd <sboyd@kernel.org>, James Cameron <quozl@laptop.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	Lubomir Rintel <lkundrak@v3.sk>
Subject: [PATCH v2 4/8] clk: mmp2: add SP clock
Date: Wed, 10 Oct 2018 16:25:00 +0200	[thread overview]
Message-ID: <20181010142504.233467-5-lkundrak@v3.sk> (raw)
In-Reply-To: <20181010142504.233467-1-lkundrak@v3.sk>

The "security processor", sometimes referred to as "wireless trusted
module" or "generic encrypt unit" is a low-power core present on MMP2,
that has nothing to do with security, wireless, trust or encryption.

On an OLPC machine it runs CForth and serves as a keyboard controller:
http://dev.laptop.org/git/users/wmb/cforth/tree/src/app/arm-xo-1.75/ps2.fth

The register address was obtained from the OLPC kernel, since the
datasheet seems to be the Marvell's most important business secret.

Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 drivers/clk/mmp/clk-of-mmp2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/clk/mmp/clk-of-mmp2.c b/drivers/clk/mmp/clk-of-mmp2.c
index 0fc75c395957..1da50f827a15 100644
--- a/drivers/clk/mmp/clk-of-mmp2.c
+++ b/drivers/clk/mmp/clk-of-mmp2.c
@@ -53,6 +53,7 @@
 #define APMU_DISP1	0x110
 #define APMU_CCIC0	0x50
 #define APMU_CCIC1	0xf4
+#define APMU_SP		0x68
 #define MPMU_UART_PLL	0x14
 
 struct mmp2_clk_unit {
@@ -209,6 +210,8 @@ static struct mmp_clk_mix_config ccic1_mix_config = {
 	.reg_info = DEFINE_MIX_REG_INFO(4, 16, 2, 6, 32),
 };
 
+static DEFINE_SPINLOCK(sp_lock);
+
 static struct mmp_param_mux_clk apmu_mux_clks[] = {
 	{MMP2_CLK_DISP0_MUX, "disp0_mux", disp_parent_names, ARRAY_SIZE(disp_parent_names), CLK_SET_RATE_PARENT, APMU_DISP0, 6, 2, 0, &disp0_lock},
 	{MMP2_CLK_DISP1_MUX, "disp1_mux", disp_parent_names, ARRAY_SIZE(disp_parent_names), CLK_SET_RATE_PARENT, APMU_DISP1, 6, 2, 0, &disp1_lock},
@@ -239,6 +242,7 @@ static struct mmp_param_gate_clk apmu_gate_clks[] = {
 	{MMP2_CLK_CCIC1, "ccic1_clk", "ccic1_mix_clk", CLK_SET_RATE_PARENT, APMU_CCIC1, 0x1b, 0x1b, 0x0, 0, &ccic1_lock},
 	{MMP2_CLK_CCIC1_PHY, "ccic1_phy_clk", "ccic1_mix_clk", CLK_SET_RATE_PARENT, APMU_CCIC1, 0x24, 0x24, 0x0, 0, &ccic1_lock},
 	{MMP2_CLK_CCIC1_SPHY, "ccic1_sphy_clk", "ccic1_sphy_div", CLK_SET_RATE_PARENT, APMU_CCIC1, 0x300, 0x300, 0x0, 0, &ccic1_lock},
+	{MMP2_CLK_SP, "sp_clk", NULL, CLK_SET_RATE_PARENT, APMU_SP, 0x1b, 0x1b, 0x0, 0, &sp_lock},
 };
 
 static void mmp2_axi_periph_clk_init(struct mmp2_clk_unit *pxa_unit)
-- 
2.19.0


  parent reply	other threads:[~2018-10-10 14:25 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 14:24 [PATCH v2 0/8] OLPC 1.75 Keyboard/Touchpad fixes Lubomir Rintel
2018-10-10 14:24 ` [PATCH v2 1/8] dt-bindings: olpc,ap-sp: add clock Lubomir Rintel
2018-11-04 11:41   ` Pavel Machek
2018-10-10 14:24 ` [PATCH v2 2/8] dt-bindings: olpc,ap-sp: add GPIO lines Lubomir Rintel
2018-11-04 11:49   ` Pavel Machek
2018-10-10 14:24 ` [PATCH v2 3/8] dt-bindings: marvell,mmp2: Add clock id for the SP clock Lubomir Rintel
2018-11-04 11:48   ` Pavel Machek
2018-10-10 14:25 ` Lubomir Rintel [this message]
2018-11-04 11:48   ` [PATCH v2 4/8] clk: mmp2: add " Pavel Machek
2018-10-10 14:25 ` [PATCH v2 5/8] Input: olpc_apsp: depend on CONFIG_OF Lubomir Rintel
2018-10-10 17:18   ` Dmitry Torokhov
2018-11-04 11:50   ` Pavel Machek
2018-10-10 14:25 ` [PATCH v2 6/8] Input: olpc_apsp: check FIFO status on open(), not probe() Lubomir Rintel
2018-10-10 14:25 ` [PATCH v2 7/8] Input: olpc_apsp: enable the SP clock Lubomir Rintel
2018-10-10 17:09   ` Dmitry Torokhov
2018-11-04 11:53   ` Pavel Machek
2018-10-10 14:25 ` [PATCH v2 8/8] Input: olpc_apsp: allocate the GPIOs used Lubomir Rintel
2018-10-10 17:10   ` Dmitry Torokhov
2018-10-10 17:11     ` Dmitry Torokhov
2018-10-11  8:38   ` Linus Walleij
2018-11-04 11:55   ` Pavel Machek
2018-10-15 19:56 ` [PATCH v2 0/8] OLPC 1.75 Keyboard/Touchpad fixes Pavel Machek
2018-10-16  9:44   ` Lubomir Rintel
2018-10-30 10:01     ` Pavel Machek
2018-10-30 10:26       ` Pavel Machek
2018-10-30 19:40         ` Lubomir Rintel
2018-10-31  3:37           ` James Cameron
2018-10-31 12:46             ` Pavel Machek
2018-10-31 11:54           ` Pavel Machek
2018-11-01 13:47           ` Pavel Machek
2018-10-30 23:54         ` James Cameron
2018-10-31 12:29           ` Pavel Machek

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=20181010142504.233467-5-lkundrak@v3.sk \
    --to=lkundrak@v3.sk \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=quozl@laptop.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.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;
as well as URLs for NNTP newsgroup(s).