mcfclk.h 812 B

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