Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Steve Rae | 45f2c70 | 2016-06-02 15:10:56 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2014 Broadcom Corporation. |
Steve Rae | 45f2c70 | 2016-06-02 15:10:56 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
Masahiro Yamada | 56a931c | 2016-09-21 11:28:55 +0900 | [diff] [blame] | 6 | #include <linux/errno.h> |
Steve Rae | 45f2c70 | 2016-06-02 15:10:56 -0700 | [diff] [blame] | 7 | #include <asm/arch/sysmap.h> |
| 8 | #include "clk-core.h" |
| 9 | |
| 10 | /* Enable appropriate clocks for the USB OTG port */ |
| 11 | int clk_usb_otg_enable(void *base) |
| 12 | { |
| 13 | char *ahbstr; |
| 14 | |
| 15 | switch ((u32) base) { |
| 16 | case HSOTG_BASE_ADDR: |
| 17 | ahbstr = "usb_otg_ahb_clk"; |
| 18 | break; |
| 19 | default: |
| 20 | printf("%s: base 0x%p not found\n", __func__, base); |
| 21 | return -EINVAL; |
| 22 | } |
| 23 | |
| 24 | return clk_get_and_enable(ahbstr); |
| 25 | } |