clock.h 572 B

12345678910111213141516171819202122232425262728
  1. #ifndef __MACH_COMMON_CLKDEV_H
  2. #define __MACH_COMMON_CLKDEV_H
  3. #include <linux/clk.h>
  4. struct clk_ops {
  5. unsigned long (*get_rate)(struct clk *clk);
  6. unsigned long (*round_rate)(struct clk *clk, unsigned long rate);
  7. int (*set_rate)(struct clk *clk, unsigned long rate);
  8. int (*enable)(struct clk *clk);
  9. int (*disable)(struct clk *clk);
  10. };
  11. struct clk {
  12. const char *name;
  13. unsigned long rate;
  14. spinlock_t lock;
  15. u32 flags;
  16. const struct clk_ops *ops;
  17. const struct params *params;
  18. void __iomem *reg;
  19. u32 mask;
  20. u32 shift;
  21. };
  22. #endif