From patchwork Tue Sep 6 17:31:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 9317723 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C055607D3 for ; Tue, 6 Sep 2016 17:25:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85ED728DA1 for ; Tue, 6 Sep 2016 17:25:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A10028E29; Tue, 6 Sep 2016 17:25:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24C4428DA1 for ; Tue, 6 Sep 2016 17:25:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936532AbcIFRZU (ORCPT ); Tue, 6 Sep 2016 13:25:20 -0400 Received: from mail-lf0-f43.google.com ([209.85.215.43]:34551 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937716AbcIFRYS (ORCPT ); Tue, 6 Sep 2016 13:24:18 -0400 Received: by mail-lf0-f43.google.com with SMTP id u14so28704368lfd.1 for ; Tue, 06 Sep 2016 10:24:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=D1l3HOxpDqaZHXmn/k1nYJHSBApXmLQPQP9ZpTf285c=; b=RgGElPMscxTgVpJZO/PKOgaBiPofpwpJXM/GFBWt/7khcoyHMYjH+VDRIrAeMO88bA nviK0/aG0YoKpKLs0+e7LyOV5N4JHYg68l1S/Ggls8cYdrvLxcr26hXzkLQ1hPf33XYe 2MaN7sz5WRWwFCGihS0+bU6t0SooEKggHWZeaOdfzDRB79qcRImrYUyOMMPQLAL2crNc N2ToidRIVp/Sgyp3eDj7kbVq+gWGFbZe9qt7ufPERzELZB8m3wWF4KyYEShosCB9Iv1F bjmG9Yj2mWiRKnBLl6cTy2ruOip7zxoDpfpX6R9R602MixBOsrhKzJA+us/uEc4KMI7B gpJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=D1l3HOxpDqaZHXmn/k1nYJHSBApXmLQPQP9ZpTf285c=; b=ZadO9Q1XPysaMDp2jTvOtOKePWl/sOIFyeDWqMhytFp3NUrC/G75k4SPopjhWabHf6 wBLLbAtYsk3KV4w5O11Xjfwk6n2lCuVumm2o1ZlU2fHDy6bS7SIE+ys6Zr8SrNuRX3WM PW5Y00rBFnssSrqq7pc9c57larEVsvrCBXpRHFOBv8FXA+qxy+tHeRRdvEdbTRrF5u6O mxlTD1EXJeuDG/igLzWwd9PukcnORLcguAINvWbL4NWW2ndRck1jRZtf70MRWmqZZHk0 q4oJEgToXcqTWKAUuEVs53WQmefwg4i3uhvP4+1v7jYNQwifriqBv/575JhAwVoXL5OC StkQ== X-Gm-Message-State: AE9vXwO1qnCsaZcfljjvCePjC9rrmrPhQuRrHgB0RTbA0roay6zhTkUPgv78hI662/YI/w== X-Received: by 10.46.1.162 with SMTP id f34mr58772lji.80.1473182656743; Tue, 06 Sep 2016 10:24:16 -0700 (PDT) Received: from enkidu.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id 4sm5398990ljf.33.2016.09.06.10.24.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Sep 2016 10:24:16 -0700 (PDT) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, sboyd@codeaurora.org, mturquette@baylibre.com Cc: sebastian.hesselbarth@gmail.com, andrew@lunn.ch, jason@lakedaemon.net, thomas.petazzoni@free-electrons.com, gregory.clement@free-electrons.com, nadavh@marvell.com, alior@marvell.com, tn@semihalf.com, jaz@semihalf.com, Marcin Wojtas , Subject: [PATCH v2 1/3] clk: mvebu: fix setting unwanted flags in CP110 gate clock Date: Tue, 6 Sep 2016 19:31:55 +0200 Message-Id: <1473183117-11889-2-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1473183117-11889-1-git-send-email-mw@semihalf.com> References: <1473183117-11889-1-git-send-email-mw@semihalf.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 CC: --- 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;