blob: 87918059408c280e8f8eb2e2decf06b0aa8545b5 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Steve Rae45f2c702016-06-02 15:10:56 -07002/*
3 * Copyright 2014 Broadcom Corporation.
Steve Rae45f2c702016-06-02 15:10:56 -07004 */
5
Masahiro Yamada56a931c2016-09-21 11:28:55 +09006#include <linux/errno.h>
Steve Rae45f2c702016-06-02 15:10:56 -07007#include <asm/arch/sysmap.h>
8#include "clk-core.h"
9
10/* Enable appropriate clocks for the USB OTG port */
11int 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}