clk-factors.h 545 B

1234567891011121314151617181920212223242526272829
  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. };
  16. struct clk_factors {
  17. struct clk_hw hw;
  18. void __iomem *reg;
  19. struct clk_factors_config *config;
  20. void (*get_factors) (u32 *rate, u32 parent, u8 *n, u8 *k, u8 *m, u8 *p);
  21. spinlock_t *lock;
  22. };
  23. extern const struct clk_ops clk_factors_ops;
  24. #endif