From patchwork Mon Jan 20 20:55:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 23416 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A70BC203C6 for ; Mon, 20 Jan 2014 20:55:30 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id 1sf5113355qee.9 for ; Mon, 20 Jan 2014 12:55:29 -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=H/GnYg2XKE3E5V1Auh3NMk1h1NPLhQnaSmatxIiVLGI=; b=SfY95j8z88PTgzcpjl1VCwtFgk7YKqcSOC8LJwmkGcUCW89IxoLtgfLZ28xzCVgtcU vkbr1RnRgYKPWVQaS90B45Ehf1KO7tN+9iaXZAJgc5EPO8/CzjvpQBv4nVLLIw/5LDdz tmJbwMQ+saM1EU5zdx0FIiNPOOjBa2fX2oDSY5R3NDeXa6pwws5kQIl+JxAjspFllYg7 gtTYb8r357BE4/iedvS+LSggFn7Xf7cMhQLFmc04xrfiIdW7YANu0HcQ0YwZCefpTGkX /M+1+s+c+dlh8DIHueP7vM4Ocgxkcc+gkM+q2cc4L+N13T1KX+TUy6egKJ/j7kQl9wuh 7uyg== X-Gm-Message-State: ALoCoQmE3c86FBLowK/0AqvgcuEXwvZ83sq1N+SkuDWsOUIJH86eRihbw9Vkc5sY6TxxAW9Y/291 X-Received: by 10.58.171.135 with SMTP id au7mr7605897vec.22.1390251329868; Mon, 20 Jan 2014 12:55:29 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.121.72 with SMTP id li8ls149350qeb.32.gmail; Mon, 20 Jan 2014 12:55:29 -0800 (PST) X-Received: by 10.52.253.75 with SMTP id zy11mr9804427vdc.22.1390251329749; Mon, 20 Jan 2014 12:55:29 -0800 (PST) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id lz6si763032vcb.106.2014.01.20.12.55.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Jan 2014 12:55:29 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.45 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.45; Received: by mail-vb0-f45.google.com with SMTP id m10so3003968vbh.4 for ; Mon, 20 Jan 2014 12:55:29 -0800 (PST) X-Received: by 10.52.251.68 with SMTP id zi4mr2326389vdc.25.1390251329444; Mon, 20 Jan 2014 12:55:29 -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 u4csp76168vcz; Mon, 20 Jan 2014 12:55:28 -0800 (PST) X-Received: by 10.194.23.201 with SMTP id o9mr37925wjf.67.1390251328454; Mon, 20 Jan 2014 12:55:28 -0800 (PST) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mx.google.com with ESMTPS id d7si11393745wiy.3.2014.01.20.12.55.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Jan 2014 12:55:28 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.42 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.42; Received: by mail-wg0-f42.google.com with SMTP id l18so4343084wgh.5 for ; Mon, 20 Jan 2014 12:55:28 -0800 (PST) X-Received: by 10.180.36.101 with SMTP id p5mr11657498wij.15.1390251328031; Mon, 20 Jan 2014 12:55:28 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id uq2sm3526329wjc.5.2014.01.20.12.55.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jan 2014 12:55:27 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, Mike Turquette Cc: Linus Walleij Subject: [PATCH 4/5] clk: versatile: pass a parent to the ICST clock Date: Mon, 20 Jan 2014 21:55:24 +0100 Message-Id: <1390251324-6369-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.4.2 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.45 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: , As we want to actually define the parent frequency in the device tree for the ICST clocks, modify the clock registration function to take a parent argument. Cc: Mike Turquette Signed-off-by: Linus Walleij --- Hi Mike, looking for an ACK to take this through the Integrator and ARM SOC tree. --- drivers/clk/versatile/clk-icst.c | 1 + drivers/clk/versatile/clk-icst.h | 1 + drivers/clk/versatile/clk-impd1.c | 6 ++++-- drivers/clk/versatile/clk-integrator.c | 4 +++- drivers/clk/versatile/clk-realview.c | 4 ++-- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c index 8cbfcf88fae3..c98adbe62733 100644 --- a/drivers/clk/versatile/clk-icst.c +++ b/drivers/clk/versatile/clk-icst.c @@ -120,6 +120,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, + const char *parent_name, void __iomem *base) { struct clk *clk; diff --git a/drivers/clk/versatile/clk-icst.h b/drivers/clk/versatile/clk-icst.h index be99dd0da785..04e6f0aef588 100644 --- a/drivers/clk/versatile/clk-icst.h +++ b/drivers/clk/versatile/clk-icst.h @@ -16,4 +16,5 @@ struct clk_icst_desc { struct clk *icst_clk_register(struct device *dev, const struct clk_icst_desc *desc, const char *name, + const char *parent_name, void __iomem *base); diff --git a/drivers/clk/versatile/clk-impd1.c b/drivers/clk/versatile/clk-impd1.c index 844f8d711a12..6d8b8e1a080a 100644 --- a/drivers/clk/versatile/clk-impd1.c +++ b/drivers/clk/versatile/clk-impd1.c @@ -93,13 +93,15 @@ void integrator_impd1_clk_init(void __iomem *base, unsigned int id) imc = &impd1_clks[id]; imc->vco1name = kasprintf(GFP_KERNEL, "lm%x-vco1", id); - clk = icst_clk_register(NULL, &impd1_icst1_desc, imc->vco1name, base); + clk = icst_clk_register(NULL, &impd1_icst1_desc, imc->vco1name, NULL, + base); imc->vco1clk = clk; imc->clks[0] = clkdev_alloc(clk, NULL, "lm%x:01000", id); /* VCO2 is also called "CLK2" */ imc->vco2name = kasprintf(GFP_KERNEL, "lm%x-vco2", id); - clk = icst_clk_register(NULL, &impd1_icst2_desc, imc->vco2name, base); + clk = icst_clk_register(NULL, &impd1_icst2_desc, imc->vco2name, NULL, + base); imc->vco2clk = clk; /* MMCI uses CLK2 right off */ diff --git a/drivers/clk/versatile/clk-integrator.c b/drivers/clk/versatile/clk-integrator.c index 19864b5690e9..5d36a719fefb 100644 --- a/drivers/clk/versatile/clk-integrator.c +++ b/drivers/clk/versatile/clk-integrator.c @@ -43,6 +43,7 @@ static void __init of_integrator_cm_osc_setup(struct device_node *np) struct clk *clk = ERR_PTR(-EINVAL); const char *clk_name = np->name; const struct clk_icst_desc *desc = &cm_auxosc_desc; + const char *parent_name; if (!cm_base) { /* Remap the core module base if not done yet */ @@ -60,7 +61,8 @@ static void __init of_integrator_cm_osc_setup(struct device_node *np) } } - clk = icst_clk_register(NULL, desc, clk_name, cm_base); + parent_name = of_clk_get_parent_name(np, 0); + clk = icst_clk_register(NULL, desc, clk_name, parent_name, cm_base); if (!IS_ERR(clk)) of_clk_add_provider(np, of_clk_src_simple_get, clk); } diff --git a/drivers/clk/versatile/clk-realview.c b/drivers/clk/versatile/clk-realview.c index 747e7b31117c..c8b523117fb7 100644 --- a/drivers/clk/versatile/clk-realview.c +++ b/drivers/clk/versatile/clk-realview.c @@ -85,10 +85,10 @@ 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, - "osc0", sysbase); + "osc0", NULL, sysbase); else clk = icst_clk_register(NULL, &realview_osc4_desc, - "osc4", sysbase); + "osc4", NULL, sysbase); clk_register_clkdev(clk, NULL, "dev:clcd"); clk_register_clkdev(clk, NULL, "issp:clcd");