blob: f604aec62fa6b52642b862ed77060cc272a64a26 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Steve Raed1a8ecd2014-12-09 11:40:11 -08002/*
3 * Copyright 2014 Broadcom Corporation.
Steve Raed1a8ecd2014-12-09 11:40:11 -08004 */
5
6#include <common.h>
Masahiro Yamada56a931c2016-09-21 11:28:55 +09007#include <linux/errno.h>
Steve Raed1a8ecd2014-12-09 11:40:11 -08008#include <asm/arch/sysmap.h>
9#include "clk-core.h"
10
11/* Enable appropriate clocks for the USB OTG port */
12int 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}