ARM: mach-shmobile: SH-Mobile ARM specific clock code
Magnus Damm
maintainerPATCH 5/6 ARM: mach-shmobile: SH-Mobile ARM specific clock code
From: Magnus Damm <[email protected]>
Add SH-Mobile ARM specific clock framework setup code and update the Kconfig and Makefile. This together with the clock code in drivers/sh is the new clock framework base for SH-Mobile ARM.
Signed-off-by Magnus Damm <[email protected]>
---
arch/arm/mach-shmobile/Kconfig | 3 +++ arch/arm/mach-shmobile/Makefile | 5 +++++ arch/arm/mach-shmobile/clock.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+)
arch/arm/mach-shmobile/Kconfig +3 -0
@@ -81,4 +81,7 @@ config SH_TIMER_CMT endmenu +config SH_CLK_CPG + def_bool n + endif
arch/arm/mach-shmobile/Makefile +2 -0
@@ -11,6 +11,11 @@ obj-$(CONFIG_ARCH_SH7377) += setup-sh737 obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o # Clock framework +clk-$(CONFIG_ARCH_SH7367) ++clk-$(CONFIG_ARCH_SH7377) ++clk-$(CONFIG_ARCH_SH7372) ++obj-$(CONFIG_SH_CLK_CPG) += $(clk-y) clock.o + obj-$(CONFIG_COMMON_CLKDEV) += clock-sh7367.o # Pinmux setup
arch/arm/mach-shmobile/clock.c new file +33 -0
@@ -0,0 +1,33 @@ +/* +* SH-Mobile Clock Framework +* +* Copyright (C) 2010 Magnus Damm +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; version 2 of the License. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +* +*/ +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/sh_clk.h> + +int __init clk_init (void ) +{ +/* Kick the child clocks.. */ +recalculate_root_clocks (); + +/* Enable the necessary init clocks */ +clk_enable_init_clocks (); + +return 0 ; +}