From patchwork Wed Sep 21 09:05:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 9343097 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 9D8E4607D0 for ; Wed, 21 Sep 2016 09:08:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BFB62A392 for ; Wed, 21 Sep 2016 09:08:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 802242A3D3; Wed, 21 Sep 2016 09:08:42 +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 1B8612A392 for ; Wed, 21 Sep 2016 09:08:42 +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 1bmdUh-0001ns-K9; Wed, 21 Sep 2016 09:07:07 +0000 Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bmdUI-0001Xb-Gt for linux-arm-kernel@lists.infradead.org; Wed, 21 Sep 2016 09:06:46 +0000 Received: by mail-lf0-x230.google.com with SMTP id l131so35061298lfl.2 for ; Wed, 21 Sep 2016 02:06:21 -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=some5lPVp6a/L1R6Ze78FMeMgNfCmq7gufQBl+XPmffpHGk9dqCNISn3VejPZqxNTP COeHv7rtsjG/2j8waiCrggvEuh/6pNlAr6fyyrWOTqnJqcItpcoVeLFe7hBQZH/3vC2J G5riLA6WvOuMZWe88lW7NALb4j/cimENjHU/aMNSKCpySaxdMM79ySDQfFmixKpoSER7 WC+cQAjMszgJwEDai+9EzJvbQIJHTXW593gcL5l6rilztbYDh7LJbqEnme2/kqAfDKDh 52Ua3U+BWUGkNqcoDMS3FGPJmtnrzugTKF+kgmNfTJV4Kqo38uI70J/ez1QX5MBz0zzG vSuw== 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=NcBrMNOKBERzYH3MNtpEKeiaz5fiLNzT8mj3MiYL+5zDZsKV1ddmK0wX/CeGFKjVng ZLFSXyLa+NyR8FhcrtVUuAKzt8+6kgmmkZDMo70CSiqj/fY+3xEozT5ahqKJwQaSBFOr lnghgZVEyhzQq1CgpyxE6aJMAruG0huSRfcfrG62qr7liE7K6uJf1T51XH77ApOE4W/m vF1rpvuFzzpWCTrzzi0E0+QOImKsHlZlcileD0UOdwCQGpH4HZFDnYoowa0i2sLyqiOu AFg0+ouAt2t4eD5sXm9KdIwyt0WtmcLegY9Lp9ezuGT0PebZDd/QPfY0dyp9wAYUnY+G bE0w== X-Gm-Message-State: AE9vXwP/ZzEk2YjalokexXkT/S0zkd51AGcupBF34ql1HZjq6g3R7BnVVynCkHesbp9NoA== X-Received: by 10.46.69.193 with SMTP id s184mr13683319lja.42.1474448780202; Wed, 21 Sep 2016 02:06:20 -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 n14sm6547294lfn.7.2016.09.21.02.06.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Sep 2016 02:06:19 -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 v3 1/3] clk: mvebu: fix setting unwanted flags in CP110 gate clock Date: Wed, 21 Sep 2016 11:05:57 +0200 Message-Id: <1474448759-24482-2-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1474448759-24482-1-git-send-email-mw@semihalf.com> References: <1474448759-24482-1-git-send-email-mw@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160921_020642_780342_C7EAC151 X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. 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;