clk.h 856 B

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