[PATCH 5/9] clk: pistachio: Add a MUX_F macro to pass clk_flags

From: Ezequiel Garcia
Date: Thu May 21 2015 - 20:02:55 EST


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 <Govindraj.Raja@xxxxxxxxxx>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@xxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/