clk.h 1018 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright 2015 Linaro Ltd.
  3. * Copyright (C) 2014 ZTE Corporation.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef __ZTE_CLK_H
  10. #define __ZTE_CLK_H
  11. #include <linux/clk-provider.h>
  12. #include <linux/spinlock.h>
  13. struct zx_pll_config {
  14. unsigned long rate;
  15. u32 cfg0;
  16. u32 cfg1;
  17. };
  18. struct clk_zx_pll {
  19. struct clk_hw hw;
  20. void __iomem *reg_base;
  21. const struct zx_pll_config *lookup_table; /* order by rate asc */
  22. int count;
  23. spinlock_t *lock;
  24. };
  25. struct clk *clk_register_zx_pll(const char *name, const char *parent_name,
  26. unsigned long flags, void __iomem *reg_base,
  27. const struct zx_pll_config *lookup_table, int count, spinlock_t *lock);
  28. struct clk_zx_audio {
  29. struct clk_hw hw;
  30. void __iomem *reg_base;
  31. };
  32. struct clk *clk_register_zx_audio(const char *name,
  33. const char * const parent_name,
  34. unsigned long flags, void __iomem *reg_base);
  35. #endif