From: mw@semihalf.com (Marcin Wojtas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/3] clk: mvebu: fix setting unwanted flags in CP110 gate clock
Date: Wed, 21 Sep 2016 11:05:57 +0200 [thread overview]
Message-ID: <1474448759-24482-2-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1474448759-24482-1-git-send-email-mw@semihalf.com>
Armada CP110 system controller comprises its own routine responsble
for registering gate clocks. Among others 'flags' field in
struct clk_init_data was not set, using a random values, which
may cause an unpredicted behavior.
This patch fixes the problem by resetting all fields of clk_init_data
before assigning values for all gated clocks of Armada 7k/8k SoCs family.
Fixes: d3da3eaef7f4 ("clk: mvebu: new driver for Armada CP110 system ...")
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
CC: <stable@vger.kernel.org>
---
drivers/clk/mvebu/cp110-system-controller.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mvebu/cp110-system-controller.c
index 7fa42d6..59fe76e 100644
--- a/drivers/clk/mvebu/cp110-system-controller.c
+++ b/drivers/clk/mvebu/cp110-system-controller.c
@@ -142,6 +142,8 @@ static struct clk *cp110_register_gate(const char *name,
if (!gate)
return ERR_PTR(-ENOMEM);
+ memset(&init, 0, sizeof(init));
+
init.name = name;
init.ops = &cp110_gate_ops;
init.parent_names = &parent_name;
--
1.8.3.1
next prev parent reply other threads:[~2016-09-21 9:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 9:05 [PATCH v3 0/3] Armada 7k/8k CP110 system controller fixes Marcin Wojtas
2016-09-21 9:05 ` Marcin Wojtas [this message]
2016-09-23 21:44 ` [PATCH v3 1/3] clk: mvebu: fix setting unwanted flags in CP110 gate clock Stephen Boyd
2016-09-21 9:05 ` [PATCH v3 2/3] clk: mvebu: dynamically allocate resources in Armada CP110 system controller Marcin Wojtas
2016-09-23 21:44 ` Stephen Boyd
2016-09-21 9:05 ` [PATCH v3 3/3] clk: mvebu: migrate CP110 system controller to clk_hw API and registration Marcin Wojtas
2016-09-23 21:47 ` Stephen Boyd
2016-09-23 22:00 ` Marcin Wojtas
2016-09-23 22:06 ` Stephen Boyd
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=1474448759-24482-2-git-send-email-mw@semihalf.com \
--to=mw@semihalf.com \
--cc=linux-arm-kernel@lists.infradead.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).