1 /* 2 * mcfclk.h -- coldfire specific clock structure 3 */ 4 5 6 #ifndef mcfclk_h 7 #define mcfclk_h 8 9 struct clk; 10 11 #ifdef MCFPM_PPMCR0 12 struct clk_ops { 13 void (*enable)(struct clk *); 14 void (*disable)(struct clk *); 15 }; 16 17 struct clk { 18 const char *name; 19 struct clk_ops *clk_ops; 20 unsigned long rate; 21 unsigned long enabled; 22 u8 slot; 23 }; 24 25 extern struct clk *mcf_clks[]; 26 extern struct clk_ops clk_ops0; 27 #ifdef MCFPM_PPMCR1 28 extern struct clk_ops clk_ops1; 29 #endif /* MCFPM_PPMCR1 */ 30 31 #define DEFINE_CLK(clk_bank, clk_name, clk_slot, clk_rate) \ 32 static struct clk __clk_##clk_bank##_##clk_slot = { \ 33 .name = clk_name, \ 34 .clk_ops = &clk_ops##clk_bank, \ 35 .rate = clk_rate, \ 36 .slot = clk_slot, \ 37 } 38 39 void __clk_init_enabled(struct clk *); 40 void __clk_init_disabled(struct clk *); 41 #endif /* MCFPM_PPMCR0 */ 42 43 #endif /* mcfclk_h */ 44