clk-usb-otg.c 498 B

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