summaryrefslogtreecommitdiff
path: root/drivers/clk/ti/clock.h
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2017-02-09 12:24:37 +0300
committerTero Kristo <t-kristo@ti.com>2017-03-08 14:06:15 +0300
commit6c0afb503937a12a8d20a805fcf263e31afa9871 (patch)
tree4e0d29a53aae87a587dc802be0697facf90703e8 /drivers/clk/ti/clock.h
parent473adbf4e02857a6b78dfb3d9fcf752638bbadb9 (diff)
downloadlinux-6c0afb503937a12a8d20a805fcf263e31afa9871.tar.xz
clk: ti: convert to use proper register definition for all accesses
Currently, TI clock driver uses an encapsulated struct that is cast into a void pointer to store all register addresses. This can be considered as rather nasty hackery, and prevents from expanding the register address field also. Instead, replace all the code to use proper struct in place for this, which contains all the previously used data. This patch is rather large as it is touching multiple files, but this can't be split up as we need to avoid any boot breakage. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/clk/ti/clock.h')
-rw-r--r--drivers/clk/ti/clock.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h
index 437ea768f837..3f7b26540be8 100644
--- a/drivers/clk/ti/clock.h
+++ b/drivers/clk/ti/clock.h
@@ -18,7 +18,7 @@
struct clk_omap_divider {
struct clk_hw hw;
- void __iomem *reg;
+ struct clk_omap_reg reg;
u8 shift;
u8 width;
u8 flags;
@@ -29,7 +29,7 @@ struct clk_omap_divider {
struct clk_omap_mux {
struct clk_hw hw;
- void __iomem *reg;
+ struct clk_omap_reg reg;
u32 *table;
u32 mask;
u8 shift;
@@ -228,7 +228,8 @@ void ti_clk_patch_legacy_clks(struct ti_clk **patch);
struct clk *ti_clk_register_clk(struct ti_clk *setup);
int ti_clk_register_legacy_clks(struct ti_clk_alias *clks);
-void __iomem *ti_clk_get_reg_addr(struct device_node *node, int index);
+int ti_clk_get_reg_addr(struct device_node *node, int index,
+ struct clk_omap_reg *reg);
void ti_dt_clocks_register(struct ti_dt_clk *oclks);
int ti_clk_retry_init(struct device_node *node, struct clk_hw *hw,
ti_of_clk_init_cb_t func);
@@ -263,10 +264,10 @@ int omap2_dflt_clk_enable(struct clk_hw *hw);
void omap2_dflt_clk_disable(struct clk_hw *hw);
int omap2_dflt_clk_is_enabled(struct clk_hw *hw);
void omap2_clk_dflt_find_companion(struct clk_hw_omap *clk,
- void __iomem **other_reg,
+ struct clk_omap_reg *other_reg,
u8 *other_bit);
void omap2_clk_dflt_find_idlest(struct clk_hw_omap *clk,
- void __iomem **idlest_reg,
+ struct clk_omap_reg *idlest_reg,
u8 *idlest_bit, u8 *idlest_val);
void omap2_clkt_iclk_allow_idle(struct clk_hw_omap *clk);