gate.c (d0034a7a4ac7fae708146ac0059b9c47a1543f0d) | gate.c (ed06099c5d0b329082cc19c58eace0b20bf7fe70) |
---|---|
1/* 2 * OMAP gate clock support 3 * 4 * Copyright (C) 2013 Texas Instruments, Inc. 5 * 6 * Tero Kristo <t-kristo@ti.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 124 unchanged lines hidden (view full) --- 133 134static void __init _of_ti_gate_clk_setup(struct device_node *node, 135 const struct clk_ops *ops, 136 const struct clk_hw_omap_ops *hw_ops) 137{ 138 struct clk *clk; 139 const char *parent_name; 140 struct clk_omap_reg reg; | 1/* 2 * OMAP gate clock support 3 * 4 * Copyright (C) 2013 Texas Instruments, Inc. 5 * 6 * Tero Kristo <t-kristo@ti.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 124 unchanged lines hidden (view full) --- 133 134static void __init _of_ti_gate_clk_setup(struct device_node *node, 135 const struct clk_ops *ops, 136 const struct clk_hw_omap_ops *hw_ops) 137{ 138 struct clk *clk; 139 const char *parent_name; 140 struct clk_omap_reg reg; |
141 const char *name; |
|
141 u8 enable_bit = 0; 142 u32 val; 143 u32 flags = 0; 144 u8 clk_gate_flags = 0; 145 146 if (ops != &omap_gate_clkdm_clk_ops) { 147 if (ti_clk_get_reg_addr(node, 0, ®)) 148 return; --- 10 unchanged lines hidden (view full) --- 159 parent_name = of_clk_get_parent_name(node, 0); 160 161 if (of_property_read_bool(node, "ti,set-rate-parent")) 162 flags |= CLK_SET_RATE_PARENT; 163 164 if (of_property_read_bool(node, "ti,set-bit-to-disable")) 165 clk_gate_flags |= INVERT_ENABLE; 166 | 142 u8 enable_bit = 0; 143 u32 val; 144 u32 flags = 0; 145 u8 clk_gate_flags = 0; 146 147 if (ops != &omap_gate_clkdm_clk_ops) { 148 if (ti_clk_get_reg_addr(node, 0, ®)) 149 return; --- 10 unchanged lines hidden (view full) --- 160 parent_name = of_clk_get_parent_name(node, 0); 161 162 if (of_property_read_bool(node, "ti,set-rate-parent")) 163 flags |= CLK_SET_RATE_PARENT; 164 165 if (of_property_read_bool(node, "ti,set-bit-to-disable")) 166 clk_gate_flags |= INVERT_ENABLE; 167 |
167 clk = _register_gate(NULL, node->name, parent_name, flags, ®, | 168 name = ti_dt_clk_name(node); 169 clk = _register_gate(NULL, name, parent_name, flags, ®, |
168 enable_bit, clk_gate_flags, ops, hw_ops); 169 170 if (!IS_ERR(clk)) 171 of_clk_add_provider(node, of_clk_src_simple_get, clk); 172} 173 174static void __init 175_of_ti_composite_gate_clk_setup(struct device_node *node, --- 94 unchanged lines hidden --- | 170 enable_bit, clk_gate_flags, ops, hw_ops); 171 172 if (!IS_ERR(clk)) 173 of_clk_add_provider(node, of_clk_src_simple_get, clk); 174} 175 176static void __init 177_of_ti_composite_gate_clk_setup(struct device_node *node, --- 94 unchanged lines hidden --- |