// SPDX-License-Identifier: GPL-2.01/*2* arch/sh/kernel/cpu/clock.c - SuperH clock framework3*4* Copyright (C) 2005 - 2009 Paul Mundt5*6* This clock framework is derived from the OMAP version by:7*8* Copyright (C) 2004 - 2008 Nokia Corporation9* Written by Tuukka Tikkanen <[email protected]>10*11* Modified for omap shared clock framework by Tony Lindgren <[email protected]>12*/13#include <linux/kernel.h>14#include <linux/init.h>15#include <linux/clk.h>16#include <asm/clock.h>17#include <asm/machvec.h>1819int __init clk_init(void)20{21int ret;2223#ifndef CONFIG_COMMON_CLK24ret = arch_clk_init();25if (unlikely(ret)) {26pr_err("%s: CPU clock registration failed.\n", __func__);27return ret;28}29#endif3031if (sh_mv.mv_clk_init) {32ret = sh_mv.mv_clk_init();33if (unlikely(ret)) {34pr_err("%s: machvec clock initialization failed.\n",35__func__);36return ret;37}38}3940#ifndef CONFIG_COMMON_CLK41/* Kick the child clocks.. */42recalculate_root_clocks();4344/* Enable the necessary init clocks */45clk_enable_init_clocks();46#endif4748return ret;49}5051525354