From patchwork Sun Nov 24 20:58:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 21725 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2F28223FD5 for ; Sun, 24 Nov 2013 20:59:03 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id lx4sf12031037iec.10 for ; Sun, 24 Nov 2013 12:59:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=sM9f1kNxve07KXE+/YD77NkDLDpiI7fm4gIToL3jtSU=; b=kIu84R9xMwgiNqumlWkCwQBKL/1Fszfokb/1a2qPzeLCjy/tQBmRYA5+cZKayvKEYS DopTdC6EKn4GAh9AfAGjsq2TUybeitIuKS47dOaf0BrnySuX9Cb9RB4Ic439L+HcO3m3 bLrTX7HHqmVPN84fCv6Ku6F2KWr/AXyrKbOhmmYwOYIDI+S10m9PeCDzjUVr487UEEjh pmafcYqo8OLQ2OwopyiGRv890MDRWENc7jmXa01PFa75QNteSgFjfwW+wyO3YltLkFhN fSjjt+qPSPJN6/KMgJWawF4RZ0dkgEjwxXLZNc9j7ieBltcbgzm6PuxCq9HW00ZZxlJL cEWw== X-Gm-Message-State: ALoCoQmlKZheIJYJhFjQf89/X2hyf5R59yDnidUcUchM96c5Jeo8woqoE6p6G7kcwn0iwHXfrHBK X-Received: by 10.50.117.3 with SMTP id ka3mr5033366igb.7.1385326742526; Sun, 24 Nov 2013 12:59:02 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.105.34 with SMTP id gj2ls1906043qeb.52.gmail; Sun, 24 Nov 2013 12:59:02 -0800 (PST) X-Received: by 10.220.95.139 with SMTP id d11mr18588vcn.21.1385326742381; Sun, 24 Nov 2013 12:59:02 -0800 (PST) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by mx.google.com with ESMTPS id vr9si16568830vcb.126.2013.11.24.12.59.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Nov 2013 12:59:02 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.46 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.46; Received: by mail-vb0-f46.google.com with SMTP id i12so2191329vbh.19 for ; Sun, 24 Nov 2013 12:59:01 -0800 (PST) X-Received: by 10.58.67.9 with SMTP id j9mr22628585vet.3.1385326741875; Sun, 24 Nov 2013 12:59:01 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp90654vcz; Sun, 24 Nov 2013 12:59:01 -0800 (PST) X-Received: by 10.180.11.37 with SMTP id n5mr10934918wib.25.1385326740908; Sun, 24 Nov 2013 12:59:00 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by mx.google.com with ESMTPS id uk10si16713520wjc.165.2013.11.24.12.59.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Nov 2013 12:59:00 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.181 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.212.181; Received: by mail-wi0-f181.google.com with SMTP id hq4so3174570wib.8 for ; Sun, 24 Nov 2013 12:59:00 -0800 (PST) X-Received: by 10.180.74.174 with SMTP id u14mr5219586wiv.45.1385326740071; Sun, 24 Nov 2013 12:59:00 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id f11sm23171157wic.4.2013.11.24.12.58.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Nov 2013 12:58:59 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Mike Turquette Cc: Linus Walleij Subject: [PATCH 1/2] clk: versatile: pass a name to ICST clock provider Date: Sun, 24 Nov 2013 21:58:52 +0100 Message-Id: <1385326732-16406-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.46 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When we have more than one of these clocks in a system (such as on the IM-PD1) we need a mechanism to pass a name for the clock. Refactor to add this as an argument. Signed-off-by: Linus Walleij --- Hi Mike, I'd like an ACK for this if you're OK with it, so I can take it through the ARM SoC tree with the rest of the Integrator patches. --- drivers/clk/versatile/clk-icst.c | 3 ++- drivers/clk/versatile/clk-icst.h | 1 + drivers/clk/versatile/clk-impd1.c | 4 ++-- drivers/clk/versatile/clk-integrator.c | 2 +- drivers/clk/versatile/clk-realview.c | 6 ++++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c index f5e4c21b301f..8cbfcf88fae3 100644 --- a/drivers/clk/versatile/clk-icst.c +++ b/drivers/clk/versatile/clk-icst.c @@ -119,6 +119,7 @@ static const struct clk_ops icst_ops = { struct clk *icst_clk_register(struct device *dev, const struct clk_icst_desc *desc, + const char *name, void __iomem *base) { struct clk *clk; @@ -130,7 +131,7 @@ struct clk *icst_clk_register(struct device *dev, pr_err("could not allocate ICST clock!\n"); return ERR_PTR(-ENOMEM); } - init.name = "icst"; + init.name = name; init.ops = &icst_ops; init.flags = CLK_IS_ROOT; init.parent_names = NULL; diff --git a/drivers/clk/versatile/clk-icst.h b/drivers/clk/versatile/clk-icst.h index dad51b6ffd00..be99dd0da785 100644 --- a/drivers/clk/versatile/clk-icst.h +++ b/drivers/clk/versatile/clk-icst.h @@ -15,4 +15,5 @@ struct clk_icst_desc { struct clk *icst_clk_register(struct device *dev, const struct clk_icst_desc *desc, + const char *name, void __iomem *base); diff --git a/drivers/clk/versatile/clk-impd1.c b/drivers/clk/versatile/clk-impd1.c index 369139af2a3b..b693a2bbf25a 100644 --- a/drivers/clk/versatile/clk-impd1.c +++ b/drivers/clk/versatile/clk-impd1.c @@ -66,8 +66,8 @@ void integrator_impd1_clk_init(void __iomem *base, unsigned int id) } imc = &impd1_clks[id]; - clk = icst_clk_register(NULL, &impd1_icst1_desc, base); - imc->vcoclk = clk; + clk = icst_clk_register(NULL, &impd1_icst1_desc, "icst1", base); + imc->vco1clk = clk; imc->clks[0] = clkdev_alloc(clk, NULL, "lm%x:01000", id); /* UART reference clock */ diff --git a/drivers/clk/versatile/clk-integrator.c b/drivers/clk/versatile/clk-integrator.c index 08593b4ee2c9..bda8967e09c2 100644 --- a/drivers/clk/versatile/clk-integrator.c +++ b/drivers/clk/versatile/clk-integrator.c @@ -78,7 +78,7 @@ void __init integrator_clk_init(bool is_cp) clk_register_clkdev(clk, NULL, "sp804"); /* ICST VCO clock used on the Integrator/CP CLCD */ - clk = icst_clk_register(NULL, &cp_icst_desc, + clk = icst_clk_register(NULL, &cp_icst_desc, "icst", __io_address(INTEGRATOR_HDR_BASE)); clk_register_clkdev(clk, NULL, "clcd"); } diff --git a/drivers/clk/versatile/clk-realview.c b/drivers/clk/versatile/clk-realview.c index cda07e70a408..747e7b31117c 100644 --- a/drivers/clk/versatile/clk-realview.c +++ b/drivers/clk/versatile/clk-realview.c @@ -84,9 +84,11 @@ void __init realview_clk_init(void __iomem *sysbase, bool is_pb1176) /* ICST VCO clock */ if (is_pb1176) - clk = icst_clk_register(NULL, &realview_osc0_desc, sysbase); + clk = icst_clk_register(NULL, &realview_osc0_desc, + "osc0", sysbase); else - clk = icst_clk_register(NULL, &realview_osc4_desc, sysbase); + clk = icst_clk_register(NULL, &realview_osc4_desc, + "osc4", sysbase); clk_register_clkdev(clk, NULL, "dev:clcd"); clk_register_clkdev(clk, NULL, "issp:clcd");