1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2013 Broadcom Corporation.
8 #include <linux/errno.h>
9 #include <asm/arch/sysmap.h>
10 #include <asm/kona-common/clk.h>
13 /* Enable appropriate clocks for a BSC/I2C port */
14 int clk_bsc_enable(void *base)
17 char *bscstr, *apbstr;
20 case PMU_BSC_BASE_ADDR:
21 /* PMU clock is always enabled */
25 apbstr = "bsc1_apb_clk";
29 apbstr = "bsc2_apb_clk";
33 apbstr = "bsc3_apb_clk";
36 printf("%s: base 0x%p not found\n", __func__, base);
40 /* Note that the bus clock must be enabled first */
42 ret = clk_get_and_enable(apbstr);
46 ret = clk_get_and_enable(bscstr);