blob: 908502d632c2c9391d781c41e0e798dc6356d917 [file] [log] [blame]
Steve Raed1a8ecd2014-12-09 11:40:11 -08001/*
2 * Copyright 2014 Broadcom Corporation.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
Masahiro Yamada56a931c2016-09-21 11:28:55 +09008#include <linux/errno.h>
Steve Raed1a8ecd2014-12-09 11:40:11 -08009#include <asm/arch/sysmap.h>
10#include "clk-core.h"
11
12/* Enable appropriate clocks for the USB OTG port */
13int clk_usb_otg_enable(void *base)
14{
15 char *ahbstr;
16
17 switch ((u32) base) {
18 case HSOTG_BASE_ADDR:
19 ahbstr = "usb_otg_ahb_clk";
20 break;
21 default:
22 printf("%s: base 0x%p not found\n", __func__, base);
23 return -EINVAL;
24 }
25
26 return clk_get_and_enable(ahbstr);
27}