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: 9317725 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 6B383607D3 for ; Tue, 6 Sep 2016 17:26:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64FE428DA1 for ; Tue, 6 Sep 2016 17:26:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5981C28E29; Tue, 6 Sep 2016 17:26:22 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5473428DA1 for ; Tue, 6 Sep 2016 17:26:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhK7B-0000W8-Vo; Tue, 06 Sep 2016 17:24:53 +0000 Received: from mail-lf0-x234.google.com ([2a00:1450:4010:c07::234]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bhK6w-0000Nk-T4 for linux-arm-kernel@lists.infradead.org; Tue, 06 Sep 2016 17:24:39 +0000 Received: by mail-lf0-x234.google.com with SMTP id l131so57742645lfl.2 for ; Tue, 06 Sep 2016 10:24:18 -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=h2h73IwmfKsjWoiYbSHGtjgvbHXBtFrVZRopP6Y9giLQNVL+KjadIalRp5qJylFQ2e kn06Jeu4dWhDwlp2Q3GkI57vzKNJRhbBqa8L+r0gl3JOqjvHkw6jgLitpmfbrmmXJWDV ua4wNnRl9eotqoo4U+Bp4k32gGVC6tHogNsBndgg6c6hOj86Lyh6LpEsHtkKVv9J6Wtl /ZKgiL6toR8DsSnGEWqMW1+xZKpb+LB5RqB0tqjch4nkIQSZzBweKVFGo3ZwDv8vEJBA aMIWPnG/WkkOgoRKOMKjkAwiDlatJxPP5EdABAxLsstryuoJgVvU0uWUt+3COJCTmgjP dPeQ== X-Gm-Message-State: AE9vXwPxxh+9ioabHXozVSiIMhG9mWHGTcDDBq82SmWDozM/ldXvQQKECWe84zt2bLkyjQ== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160906_102439_189227_D5B53F8E X-CRM114-Status: GOOD ( 10.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, andrew@lunn.ch, jason@lakedaemon.net, tn@semihalf.com, stable@vger.kernel.org, nadavh@marvell.com, alior@marvell.com, jaz@semihalf.com, gregory.clement@free-electrons.com, Marcin Wojtas , sebastian.hesselbarth@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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;