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