Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964878AbbEVACw (ORCPT ); Thu, 21 May 2015 20:02:52 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:16687 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964851AbbEVACu (ORCPT ); Thu, 21 May 2015 20:02:50 -0400 From: Ezequiel Garcia To: , , "Mike Turquette" , CC: Andrew Bresticker , James Hartley , , , , James Hogan , Ezequiel Garcia Subject: [PATCH 5/9] clk: pistachio: Add a MUX_F macro to pass clk_flags Date: Thu, 21 May 2015 20:57:39 -0300 Message-ID: <1432252663-31318-6-git-send-email-ezequiel.garcia@imgtec.com> X-Mailer: git-send-email 2.3.3 In-Reply-To: <1432252663-31318-1-git-send-email-ezequiel.garcia@imgtec.com> References: <1432252663-31318-1-git-send-email-ezequiel.garcia@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.100.200.44] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2389 Lines: 66 As preparation work to support MIPS PLL rate change propagation, this commit adds a MUX_F macro to pass clk_flags. Signed-off-by: Govindraj Raja Signed-off-by: Ezequiel Garcia --- drivers/clk/pistachio/clk.c | 2 +- drivers/clk/pistachio/clk.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/clk/pistachio/clk.c b/drivers/clk/pistachio/clk.c index 380879b..c9228e3 100644 --- a/drivers/clk/pistachio/clk.c +++ b/drivers/clk/pistachio/clk.c @@ -82,7 +82,7 @@ void pistachio_clk_register_mux(struct pistachio_clk_provider *p, for (i = 0; i < num; i++) { clk = clk_register_mux(NULL, mux[i].name, mux[i].parents, mux[i].num_parents, - CLK_SET_RATE_NO_REPARENT, + mux[i].clk_flags, p->base + mux[i].reg, mux[i].shift, get_count_order(mux[i].num_parents), 0, NULL); diff --git a/drivers/clk/pistachio/clk.h b/drivers/clk/pistachio/clk.h index 1589227..3bb6bbe 100644 --- a/drivers/clk/pistachio/clk.h +++ b/drivers/clk/pistachio/clk.h @@ -32,6 +32,7 @@ struct pistachio_mux { unsigned int id; unsigned long reg; unsigned int shift; + unsigned int clk_flags; unsigned int num_parents; const char *name; const char **parents; @@ -44,11 +45,22 @@ struct pistachio_mux { .id = _id, \ .reg = _reg, \ .shift = _shift, \ + .clk_flags = CLK_SET_RATE_NO_REPARENT, \ .name = _name, \ .parents = _pnames, \ .num_parents = ARRAY_SIZE(_pnames) \ } +#define MUX_F(_id, _name, _pnames, _reg, _shift, _clkf) \ +{ \ + .id = _id, \ + .reg = _reg, \ + .shift = _shift, \ + .name = _name, \ + .parents = _pnames, \ + .num_parents = ARRAY_SIZE(_pnames), \ + .clk_flags = _clkf, \ +} struct pistachio_div { unsigned int id; -- 2.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/