clk-factors.h 558 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __MACH_SUNXI_CLK_FACTORS_H
  2. #define __MACH_SUNXI_CLK_FACTORS_H
  3. #include <linux/clk-provider.h>
  4. #include <linux/clkdev.h>
  5. #define SUNXI_FACTORS_NOT_APPLICABLE (0)
  6. struct clk_factors_config {
  7. u8 nshift;
  8. u8 nwidth;
  9. u8 kshift;
  10. u8 kwidth;
  11. u8 mshift;
  12. u8 mwidth;
  13. u8 pshift;
  14. u8 pwidth;
  15. u8 n_start;
  16. };
  17. struct clk_factors {
  18. struct clk_hw hw;
  19. void __iomem *reg;
  20. struct clk_factors_config *config;
  21. void (*get_factors) (u32 *rate, u32 parent, u8 *n, u8 *k, u8 *m, u8 *p);
  22. spinlock_t *lock;
  23. };
  24. extern const struct clk_ops clk_factors_ops;
  25. #endif