From patchwork Wed May 14 01:11:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 4171851 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3C1119F271 for ; Wed, 14 May 2014 01:17:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EFA520306 for ; Wed, 14 May 2014 01:17:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65159202E5 for ; Wed, 14 May 2014 01:17:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WkNlq-0001cP-RM; Wed, 14 May 2014 01:14:10 +0000 Received: from mail-pb0-x22e.google.com ([2607:f8b0:400e:c01::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WkNkK-0008N0-0R for linux-arm-kernel@lists.infradead.org; Wed, 14 May 2014 01:12:36 +0000 Received: by mail-pb0-f46.google.com with SMTP id rq2so954336pbb.19 for ; Tue, 13 May 2014 18:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gpXKQdL2XWN5W6h8uW5gdJmy04qTyNt2KcsaUucDThQ=; b=PvRP8k5lhLvI3ZlnBbzEup+J7W/TCU1pm0Scjvcwdr07uQlneF79Ml5igaRCk3bOe8 +zxMthSxGoCuvzn7BVSIg/LKAFS3uBqBR2WgQVg/ff376sUqqiacc4+8Uu4D4mDPQvVz +wHJZ+Y6sUv9ME4qLcOp095h3rnmHVYp30d90pMMvZ+W5I+HSBuUomkZttBA7GMeqRZj miUfMIophrTWorhKTJDffL+sa7Ga/O48zkyshMJ5QpnIsXyjUOP6vdq32u7/+bul20pw 0vD7jhYcfLfTteeNBOkeX0To4axNGbJh+Bt2fTD7VJEamMtY/h62axLNqc55UiIXq7XI sLxw== X-Received: by 10.69.19.225 with SMTP id gx1mr582675pbd.34.1400029934793; Tue, 13 May 2014 18:12:14 -0700 (PDT) Received: from localhost.localdomain ([117.213.250.141]) by mx.google.com with ESMTPSA id tg9sm303528pbc.29.2014.05.13.18.12.05 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 13 May 2014 18:12:13 -0700 (PDT) X-Google-Original-From: Thomas Abraham From: Thomas Abraham To: cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 2/8] clk: samsung: change scope of samsung clock lock to global Date: Wed, 14 May 2014 06:41:10 +0530 Message-Id: <1400029876-5830-3-git-send-email-thomas.ab@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1400029876-5830-1-git-send-email-thomas.ab@samsung.com> References: <1400029876-5830-1-git-send-email-thomas.ab@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140513_181236_085312_E2941737 X-CRM114-Status: GOOD ( 12.13 ) X-Spam-Score: -0.1 (/) Cc: devicetree@vger.kernel.org, l.majewski@samsung.com, kgene.kim@samsung.com, mturquette@linaro.org, heiko@sntech.de, viresh.kumar@linaro.org, t.figa@samsung.com, rjw@rjwysocki.net, linux-samsung-soc@vger.kernel.org, thomas.ab@samsung.com, shawn.guo@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thomas Abraham Access to samsung clock lock is required to support newer samsung specific clock types. So change the scope of the samsung clock lock to global. And prefix 'samsung_clk_' to the existing name of the lock to prevent name space pollution. Cc: Tomasz Figa Signed-off-by: Thomas Abraham --- drivers/clk/samsung/clk.c | 13 ++++++++----- drivers/clk/samsung/clk.h | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c index 91bec3e..c86c28c 100644 --- a/drivers/clk/samsung/clk.c +++ b/drivers/clk/samsung/clk.c @@ -14,7 +14,7 @@ #include #include "clk.h" -static DEFINE_SPINLOCK(lock); +DEFINE_SPINLOCK(samsung_clk_lock); static struct clk **clk_table; static void __iomem *reg_base; #ifdef CONFIG_OF @@ -173,7 +173,8 @@ void __init samsung_clk_register_mux(struct samsung_mux_clock *list, for (idx = 0; idx < nr_clk; idx++, list++) { clk = clk_register_mux(NULL, list->name, list->parent_names, list->num_parents, list->flags, reg_base + list->offset, - list->shift, list->width, list->mux_flags, &lock); + list->shift, list->width, list->mux_flags, + &samsung_clk_lock); if (IS_ERR(clk)) { pr_err("%s: failed to register clock %s\n", __func__, list->name); @@ -206,12 +207,13 @@ void __init samsung_clk_register_div(struct samsung_div_clock *list, list->parent_name, list->flags, reg_base + list->offset, list->shift, list->width, list->div_flags, - list->table, &lock); + list->table, &samsung_clk_lock); else clk = clk_register_divider(NULL, list->name, list->parent_name, list->flags, reg_base + list->offset, list->shift, - list->width, list->div_flags, &lock); + list->width, list->div_flags, + &samsung_clk_lock); if (IS_ERR(clk)) { pr_err("%s: failed to register clock %s\n", __func__, list->name); @@ -241,7 +243,8 @@ void __init samsung_clk_register_gate(struct samsung_gate_clock *list, for (idx = 0; idx < nr_clk; idx++, list++) { clk = clk_register_gate(NULL, list->name, list->parent_name, list->flags, reg_base + list->offset, - list->bit_idx, list->gate_flags, &lock); + list->bit_idx, list->gate_flags, + &samsung_clk_lock); if (IS_ERR(clk)) { pr_err("%s: failed to register clock %s\n", __func__, list->name); diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h index c7141ba..951bc85 100644 --- a/drivers/clk/samsung/clk.h +++ b/drivers/clk/samsung/clk.h @@ -21,6 +21,8 @@ #include #include "clk-pll.h" +extern spinlock_t samsung_clk_lock; + /** * struct samsung_clock_alias: information about mux clock * @id: platform specific id of the clock.