clk.h 861 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright 2013 Broadcom Corporation.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. /* This API file is loosely based on u-boot/drivers/video/ipu.h and linux */
  7. #ifndef __KONA_COMMON_CLK_H
  8. #define __KONA_COMMON_CLK_H
  9. #include <linux/types.h>
  10. struct clk;
  11. /* Only implement required functions for your specific architecture */
  12. int clk_init(void);
  13. struct clk *clk_get(const char *id);
  14. int clk_enable(struct clk *clk);
  15. void clk_disable(struct clk *clk);
  16. unsigned long clk_get_rate(struct clk *clk);
  17. long clk_round_rate(struct clk *clk, unsigned long rate);
  18. int clk_set_rate(struct clk *clk, unsigned long rate);
  19. int clk_set_parent(struct clk *clk, struct clk *parent);
  20. struct clk *clk_get_parent(struct clk *clk);
  21. int clk_sdio_enable(void *base, u32 rate, u32 *actual_ratep);
  22. int clk_bsc_enable(void *base);
  23. int clk_usb_otg_enable(void *base);
  24. #endif