clk-dfll.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * clk-dfll.h - prototypes and macros for the Tegra DFLL clocksource driver
  3. * Copyright (C) 2013 NVIDIA Corporation. All rights reserved.
  4. *
  5. * Aleksandr Frid <afrid@nvidia.com>
  6. * Paul Walmsley <pwalmsley@nvidia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but WITHOUT
  13. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  15. * more details.
  16. */
  17. #ifndef __DRIVERS_CLK_TEGRA_CLK_DFLL_H
  18. #define __DRIVERS_CLK_TEGRA_CLK_DFLL_H
  19. #include <linux/platform_device.h>
  20. #include <linux/reset.h>
  21. #include <linux/types.h>
  22. /**
  23. * struct tegra_dfll_soc_data - SoC-specific hooks/integration for the DFLL driver
  24. * @dev: struct device * that holds the OPP table for the DFLL
  25. * @max_freq: maximum frequency supported on this SoC
  26. * @cvb: CPU frequency table for this SoC
  27. * @init_clock_trimmers: callback to initialize clock trimmers
  28. * @set_clock_trimmers_high: callback to tune clock trimmers for high voltage
  29. * @set_clock_trimmers_low: callback to tune clock trimmers for low voltage
  30. */
  31. struct tegra_dfll_soc_data {
  32. struct device *dev;
  33. unsigned long max_freq;
  34. const struct cvb_table *cvb;
  35. void (*init_clock_trimmers)(void);
  36. void (*set_clock_trimmers_high)(void);
  37. void (*set_clock_trimmers_low)(void);
  38. };
  39. int tegra_dfll_register(struct platform_device *pdev,
  40. struct tegra_dfll_soc_data *soc);
  41. int tegra_dfll_unregister(struct platform_device *pdev);
  42. int tegra_dfll_runtime_suspend(struct device *dev);
  43. int tegra_dfll_runtime_resume(struct device *dev);
  44. #endif /* __DRIVERS_CLK_TEGRA_CLK_DFLL_H */