clk-usb-otg.c 499 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright 2014 Broadcom Corporation.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/errno.h>
  8. #include <asm/arch/sysmap.h>
  9. #include "clk-core.h"
  10. /* Enable appropriate clocks for the USB OTG port */
  11. int clk_usb_otg_enable(void *base)
  12. {
  13. char *ahbstr;
  14. switch ((u32) base) {
  15. case HSOTG_BASE_ADDR:
  16. ahbstr = "usb_otg_ahb_clk";
  17. break;
  18. default:
  19. printf("%s: base 0x%p not found\n", __func__, base);
  20. return -EINVAL;
  21. }
  22. return clk_get_and_enable(ahbstr);
  23. }