Files
OrangePi_CM5/arch/sh/kernel/cpu/clock.c
T

51 lines
1.1 KiB
C
Raw Normal View History

2006-01-16 22:14:17 -08:00
/*
* arch/sh/kernel/cpu/clock.c - SuperH clock framework
*
2009-05-12 04:27:43 +09:00
* Copyright (C) 2005 - 2009 Paul Mundt
2006-01-16 22:14:17 -08:00
*
* This clock framework is derived from the OMAP version by:
*
2009-05-12 04:27:43 +09:00
* Copyright (C) 2004 - 2008 Nokia Corporation
2006-01-16 22:14:17 -08:00
* Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
*
2006-12-01 13:15:14 +09:00
* Modified for omap shared clock framework by Tony Lindgren <tony@atomide.com>
*
2006-01-16 22:14:17 -08:00
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/kernel.h>
#include <linux/init.h>
2010-03-08 21:45:19 +09:00
#include <linux/clk.h>
2006-01-16 22:14:17 -08:00
#include <asm/clock.h>
#include <asm/machvec.h>
2006-01-16 22:14:17 -08:00
int __init clk_init(void)
{
int ret;
2006-01-16 22:14:17 -08:00
ret = arch_clk_init();
if (unlikely(ret)) {
pr_err("%s: CPU clock registration failed.\n", __func__);
return ret;
2006-01-16 22:14:17 -08:00
}
if (sh_mv.mv_clk_init) {
ret = sh_mv.mv_clk_init();
if (unlikely(ret)) {
pr_err("%s: machvec clock initialization failed.\n",
__func__);
return ret;
}
}
2007-05-15 08:42:22 +09:00
2006-01-16 22:14:17 -08:00
/* Kick the child clocks.. */
2009-05-12 04:27:43 +09:00
recalculate_root_clocks();
2006-01-16 22:14:17 -08:00
/* Enable the necessary init clocks */
clk_enable_init_clocks();
2006-01-16 22:14:17 -08:00
return ret;
}
2009-05-13 21:51:28 +09:00