summaryrefslogtreecommitdiffstats
path: root/include/linux/clk.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-04-15 14:06:28 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-06-20 08:44:22 +0200
commitc7e41dac4fdb297be6a542389f017d725947649f (patch)
treec2a95c4353c936db51242b54060756a2cb8dd51d /include/linux/clk.h
parent7c3603a199873319cbff82fe07a887ccf3452b9b (diff)
downloadbarebox-c7e41dac4fdb297be6a542389f017d725947649f.tar.gz
barebox-c7e41dac4fdb297be6a542389f017d725947649f.tar.xz
clk: divider: Add onebased divider support
In some dividers the register value matches the divider value. This patch adds support for them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux/clk.h')
-rw-r--r--include/linux/clk.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 37a4813ba5..9c41cb8994 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -188,8 +188,23 @@ struct clk_div_table {
};
struct clk *clk_fixed(const char *name, int rate);
+
+struct clk_divider {
+ struct clk clk;
+ u8 shift;
+ u8 width;
+ void __iomem *reg;
+ const char *parent;
+#define CLK_DIVIDER_ONE_BASED (1 << 0)
+ unsigned flags;
+};
+
+extern struct clk_ops clk_divider_ops;
+
struct clk *clk_divider(const char *name, const char *parent,
void __iomem *reg, u8 shift, u8 width);
+struct clk *clk_divider_one_based(const char *name, const char *parent,
+ void __iomem *reg, u8 shift, u8 width);
struct clk *clk_divider_table(const char *name,
const char *parent, void __iomem *reg, u8 shift, u8 width,
const struct clk_div_table *table);