From d2207071b3c74b144a860cbe6a46496a44963972 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 20 Aug 2013 15:17:35 -0600 Subject: ARM: tegra: split tegra_pmc_init() in two Tegra's board file currently initializes clocks much earlier than those for most other ARM SoCs. The reason is: * The PMC HW block is involved in the path of some interrupts (i.e. it inverts, or not, the IRQ input pin dedicated to the PMIC). * So, that part of the PMC must be initialized early so that the IRQ polarity is correct. * The PMC initialization is currently monolithic, and the PMC has some clock inputs, so the init routine ends up calling of_clk_get_by_name(), and hence clocks must be set up early too. In order to defer clock initialization to the more typical location, split out the portions of tegra_pmc_init() that are truly IRQ-related into a separate tegra_pmc_init_irq(), which can be called from the machine descriptor's .init_irq() function, and defer the rest until the machine descriptor's .init_machine() function. This allows the clock initiliazation to happen from the machine descriptor's .init_time() function, as is typical. Signed-off-by: Stephen Warren --- arch/arm/mach-tegra/common.c | 4 +--- arch/arm/mach-tegra/pmc.c | 41 ++++++++++++++++++++++------------------- arch/arm/mach-tegra/pmc.h | 1 + arch/arm/mach-tegra/tegra.c | 12 +++++++++++- 4 files changed, 35 insertions(+), 23 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 94a119a35af8..58dc91c56ccb 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -24,7 +24,6 @@ #include #include #include -#include #include @@ -61,8 +60,7 @@ u32 tegra_uart_config[4] = { #ifdef CONFIG_OF void __init tegra_dt_init_irq(void) { - of_clk_init(NULL); - tegra_pmc_init(); + tegra_pmc_init_irq(); tegra_init_irq(); irqchip_init(); tegra_legacy_irq_syscore_init(); diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c index 8acb881f7cfe..7916ff91f969 100644 --- a/arch/arm/mach-tegra/pmc.c +++ b/arch/arm/mach-tegra/pmc.c @@ -285,13 +285,10 @@ static const struct of_device_id matches[] __initconst = { { } }; -static void __init tegra_pmc_parse_dt(void) +void __init tegra_pmc_init_irq(void) { struct device_node *np; - u32 prop; - enum tegra_suspend_mode suspend_mode; - u32 core_good_time[2] = {0, 0}; - u32 lp0_vec[2] = {0, 0}; + u32 val; np = of_find_matching_node(NULL, matches); BUG_ON(!np); @@ -300,6 +297,26 @@ static void __init tegra_pmc_parse_dt(void) tegra_pmc_invert_interrupt = of_property_read_bool(np, "nvidia,invert-interrupt"); + + val = tegra_pmc_readl(PMC_CTRL); + if (tegra_pmc_invert_interrupt) + val |= PMC_CTRL_INTR_LOW; + else + val &= ~PMC_CTRL_INTR_LOW; + tegra_pmc_writel(val, PMC_CTRL); +} + +void __init tegra_pmc_init(void) +{ + struct device_node *np; + u32 prop; + enum tegra_suspend_mode suspend_mode; + u32 core_good_time[2] = {0, 0}; + u32 lp0_vec[2] = {0, 0}; + + np = of_find_matching_node(NULL, matches); + BUG_ON(!np); + tegra_pclk = of_clk_get_by_name(np, "pclk"); WARN_ON(IS_ERR(tegra_pclk)); @@ -365,17 +382,3 @@ static void __init tegra_pmc_parse_dt(void) pmc_pm_data.suspend_mode = suspend_mode; } - -void __init tegra_pmc_init(void) -{ - u32 val; - - tegra_pmc_parse_dt(); - - val = tegra_pmc_readl(PMC_CTRL); - if (tegra_pmc_invert_interrupt) - val |= PMC_CTRL_INTR_LOW; - else - val &= ~PMC_CTRL_INTR_LOW; - tegra_pmc_writel(val, PMC_CTRL); -} diff --git a/arch/arm/mach-tegra/pmc.h b/arch/arm/mach-tegra/pmc.h index 549f8c7b762c..4d5f8f32225c 100644 --- a/arch/arm/mach-tegra/pmc.h +++ b/arch/arm/mach-tegra/pmc.h @@ -39,6 +39,7 @@ bool tegra_pmc_cpu_is_powered(int cpuid); int tegra_pmc_cpu_power_on(int cpuid); int tegra_pmc_cpu_remove_clamping(int cpuid); +void tegra_pmc_init_irq(void); void tegra_pmc_init(void); #endif diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index 5b8605547a09..4da271df2e6c 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -44,6 +45,7 @@ #include "common.h" #include "fuse.h" #include "iomap.h" +#include "pmc.h" static void __init tegra_dt_init(void) { @@ -51,6 +53,8 @@ static void __init tegra_dt_init(void) struct soc_device *soc_dev; struct device *parent = NULL; + tegra_pmc_init(); + tegra_clocks_apply_init_table(); soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); @@ -80,6 +84,12 @@ out: of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); } +static void __init tegra_dt_init_time(void) +{ + of_clk_init(NULL); + clocksource_of_init(); +} + static void __init paz00_init(void) { if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC)) @@ -119,7 +129,7 @@ DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)") .smp = smp_ops(tegra_smp_ops), .init_early = tegra_init_early, .init_irq = tegra_dt_init_irq, - .init_time = clocksource_of_init, + .init_time = tegra_dt_init_time, .init_machine = tegra_dt_init, .init_late = tegra_dt_init_late, .restart = tegra_assert_system_reset, -- cgit v1.2.3 From 4db7634336156254b179b66f6a9fe90d75c44ee4 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 18:31:14 +0200 Subject: ARM: nomadik: remove mtu initalization from .init_time Nomadik clock initialization is properly done in clk-nomadik since patch "clk: nomadik: set all timers to use 2.4 MHz TIMCLK". Therefore, this patch removes now redundant mtu initialization from .init_time callback. Signed-off-by: Sebastian Hesselbarth Acked-by: Linus Walleij --- arch/arm/mach-nomadik/cpu-8815.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 13e0df9c11ce..0fcb14966d5a 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -113,36 +113,10 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) writel(1, srcbase + 0x18); } -/* Initial value for SRC control register: all timers use MXTAL/8 source */ -#define SRC_CR_INIT_MASK 0x00007fff -#define SRC_CR_INIT_VAL 0x2aaa8000 - static void __init cpu8815_timer_init_of(void) { - struct device_node *mtu; - void __iomem *base; - int irq; - u32 src_cr; - /* We need this to be up now */ nomadik_clk_init(); - - mtu = of_find_node_by_path("/mtu@101e2000"); - if (!mtu) - return; - base = of_iomap(mtu, 0); - if (WARN_ON(!base)) - return; - irq = irq_of_parse_and_map(mtu, 0); - - pr_info("Remapped MTU @ %p, irq: %d\n", base, irq); - - /* Configure timer sources in "system reset controller" ctrl reg */ - src_cr = readl(base); - src_cr &= SRC_CR_INIT_MASK; - src_cr |= SRC_CR_INIT_VAL; - writel(src_cr, base); - clocksource_of_init(); } -- cgit v1.2.3 From 74227e65f9742f559f6e243ba2c9a983e1f1221d Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 17 Sep 2013 00:32:34 +0200 Subject: clk: nomadik: declare OF clock provider Common clock framework allows to register clock providers to get called on of_clk_init() by using CLK_OF_DECLARE. This converts nomadik clock provider to make use of it and get rid of the mach specific clk init call. As clocks require system reset controller base address to be initialized each clock driver checks src_base and calls new nomadik_src_init if required. Signed-off-by: Sebastian Hesselbarth Acked-by: Linus Walleij Acked-by: Mike Turquette --- arch/arm/mach-nomadik/cpu-8815.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 0fcb14966d5a..2be38a00a3d9 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -115,8 +115,7 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) static void __init cpu8815_timer_init_of(void) { - /* We need this to be up now */ - nomadik_clk_init(); + of_clk_init(NULL); clocksource_of_init(); } -- cgit v1.2.3 From 27966ffe43d412483f0823b15b8c035db04969c7 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 14:21:18 +0200 Subject: clk: prima2: declare OF clock provider Common clock framework allows to register clock providers to get called on of_clk_init() by using CLK_OF_DECLARE. This converts prima2 clock provider to make use of it and get rid of the mach specific clk init call. Signed-off-by: Sebastian Hesselbarth Acked-by: Barry Song Acked-by: Mike Turquette --- arch/arm/mach-prima2/common.c | 4 ++-- arch/arm/mach-prima2/common.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index e110b6d4ae8c..9b7663d9096f 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c @@ -6,6 +6,7 @@ * Licensed under GPLv2 or later. */ +#include #include #include #include @@ -23,8 +24,7 @@ void __init sirfsoc_init_late(void) static __init void sirfsoc_init_time(void) { - /* initialize clocking early, we want to set the OS timer */ - sirfsoc_of_clk_init(); + of_clk_init(NULL); clocksource_of_init(); } diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h index a6304858474a..4b768060a858 100644 --- a/arch/arm/mach-prima2/common.h +++ b/arch/arm/mach-prima2/common.h @@ -23,7 +23,6 @@ extern void sirfsoc_secondary_startup(void); extern void sirfsoc_cpu_die(unsigned int cpu); extern void __init sirfsoc_of_irq_init(void); -extern void __init sirfsoc_of_clk_init(void); extern void sirfsoc_restart(enum reboot_mode, const char *); extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs); -- cgit v1.2.3 From 8e7b25f1aa9accb8e4c80d0c019d769c979f2ec6 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 13:35:50 +0200 Subject: ARM: socfgpa: prepare for arch-wide .init_time callback Current socfpga board init calls of_clk_init() from .machine_init. To allow consolidation of DT driven .time_init, move of_clock_init() to a temporary .time_init that will be removed when arch-wide callback is available. Signed-off-by: Sebastian Hesselbarth Acked-by: Dinh Nguyen --- arch/arm/mach-socfpga/socfpga.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index bfce9641e32f..6df7bb9fe64a 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c @@ -15,6 +15,7 @@ * along with this program. If not, see . */ #include +#include #include #include #include @@ -90,6 +91,12 @@ static void __init socfpga_init_irq(void) socfpga_sysmgr_init(); } +static void __init socfpga_init_time(void) +{ + of_clk_init(NULL); + clocksource_of_init(); +} + static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd) { u32 temp; @@ -107,7 +114,6 @@ static void __init socfpga_cyclone5_init(void) { l2x0_of_init(0, ~0UL); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); - of_clk_init(NULL); socfpga_init_clocks(); } @@ -120,6 +126,7 @@ DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA") .smp = smp_ops(socfpga_smp_ops), .map_io = socfpga_map_io, .init_irq = socfpga_init_irq, + .init_time = socfpga_init_time, .init_machine = socfpga_cyclone5_init, .restart = socfpga_cyclone5_restart, .dt_compat = altera_dt_match, -- cgit v1.2.3 From be0804513a506de96925f9ed1aa8dc1facd4c180 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Fri, 6 Sep 2013 14:59:57 +0200 Subject: clk: sunxi: declare OF clock provider Common clock framework allows to register clock providers to get called on of_clk_init() by using CLK_OF_DECLARE. This converts sunxi clock providers to make use of it and get rid of the mach specific clk init call. As sunxi has a bunch of independent clk provider nodes, we hook current clock init to board compatible to make it called once. Signed-off-by: Sebastian Hesselbarth Acked-by: Maxime Ripard Acked-by: Mike Turquette --- arch/arm/mach-sunxi/sunxi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index e79fb3469341..e5a69756427b 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c @@ -20,8 +20,6 @@ #include #include -#include - #include #include #include @@ -118,7 +116,7 @@ static void sunxi_setup_restart(void) static void __init sunxi_timer_init(void) { - sunxi_init_clocks(); + of_clk_init(NULL); clocksource_of_init(); } -- cgit v1.2.3 From f44089a7f41c88775428f09e90df8fb2b890058a Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 14:09:39 +0200 Subject: ARM: vt8500: prepare for arch-wide .init_time callback Current vt8500 board init calls of_clk_init() from vtwm_clk_init. To allow consolidation of DT driven .time_init, move of_clock_init() to a temporary .time_init callback that will be removed when arch-wide callback is available. With previous pmc_base parsing helper for vt8500 clock providers, we can also safely remove the call to vtwm_clk_init() and get rid of some includes. Signed-off-by: Sebastian Hesselbarth Acked-by: Tony Prisk Acked-by: Mike Turquette --- arch/arm/mach-vt8500/common.h | 24 ------------------------ arch/arm/mach-vt8500/vt8500.c | 13 ++++++++----- 2 files changed, 8 insertions(+), 29 deletions(-) delete mode 100644 arch/arm/mach-vt8500/common.h (limited to 'arch') diff --git a/arch/arm/mach-vt8500/common.h b/arch/arm/mach-vt8500/common.h deleted file mode 100644 index 087787af62f1..000000000000 --- a/arch/arm/mach-vt8500/common.h +++ /dev/null @@ -1,24 +0,0 @@ -/* linux/arch/arm/mach-vt8500/dt_common.h - * - * Copyright (C) 2012 Tony Prisk - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * 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. - * - */ - -#ifndef __ARCH_ARM_MACH_VT8500_DT_COMMON_H -#define __ARCH_ARM_MACH_VT8500_DT_COMMON_H - -#include - -/* defined in drivers/clk/clk-vt8500.c */ -void __init vtwm_clk_init(void __iomem *pmc_base); - -#endif diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c index eefaa60d6614..504156351b3e 100644 --- a/arch/arm/mach-vt8500/vt8500.c +++ b/arch/arm/mach-vt8500/vt8500.c @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include #include @@ -33,8 +34,6 @@ #include #include -#include "common.h" - #define LEGACY_GPIO_BASE 0xD8110000 #define LEGACY_PMC_BASE 0xD8130000 @@ -75,6 +74,12 @@ static void vt8500_power_off(void) asm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0)); } +static void __init vt8500_init_time(void) +{ + of_clk_init(NULL); + clocksource_of_init(); +} + void __init vt8500_init(void) { struct device_node *np; @@ -162,8 +167,6 @@ void __init vt8500_init(void) else pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__); - vtwm_clk_init(pmc_base); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } @@ -180,7 +183,7 @@ DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)") .dt_compat = vt8500_dt_compat, .map_io = vt8500_map_io, .init_machine = vt8500_init, - .init_time = clocksource_of_init, + .init_time = vt8500_init_time, .restart = vt8500_restart, MACHINE_END -- cgit v1.2.3 From 4178bac4f6e955869395b30246687d41183a5edb Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 12:24:03 +0200 Subject: ARM: call of_clk_init from default time_init handler Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call of_clk_init right before clocksource_of_init. This prevents to remove that callback and use the default one instead. This patch adds a call to of_clk_init() to the default .init_time callback for COMMON_CLK enabled machs to allow to remove custom callbacks where applicable. While at it, also reorder includes alphabetically. Signed-off-by: Sebastian Hesselbarth --- arch/arm/kernel/time.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'arch') diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 98aee3258398..829a96d4a179 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -11,25 +11,26 @@ * This file contains the ARM-specific time handling details: * reading the RTC at bootup, etc... */ +#include +#include +#include #include -#include -#include -#include #include +#include +#include +#include +#include #include +#include #include +#include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include +#include +#include #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \ defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) @@ -116,8 +117,12 @@ int __init register_persistent_clock(clock_access_fn read_boot, void __init time_init(void) { - if (machine_desc->init_time) + if (machine_desc->init_time) { machine_desc->init_time(); - else + } else { +#ifdef CONFIG_COMMON_CLK + of_clk_init(NULL); +#endif clocksource_of_init(); + } } -- cgit v1.2.3 From 2881764d2a3638ec6e35e09df8f8e39338361ad7 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Fri, 20 Sep 2013 15:16:14 -0400 Subject: ARM: bcm: provide common arch init for DT clocks With arch/arm calling of_clk_init(NULL) and clocksource_of_init() this is no longer needed. The former is useful because we can make use of dummy fixed clocks for drivers until the bcm281xx common clock driver is ready. Signed-off-by: Matt Porter Reviewed-by: Markus Mayer Acked-by: Christian Daudt --- arch/arm/mach-bcm/board_bcm281xx.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-bcm/board_bcm281xx.c b/arch/arm/mach-bcm/board_bcm281xx.c index 8d9f931164bb..26b2390492b8 100644 --- a/arch/arm/mach-bcm/board_bcm281xx.c +++ b/arch/arm/mach-bcm/board_bcm281xx.c @@ -68,7 +68,6 @@ static void __init board_init(void) static const char * const bcm11351_dt_compat[] = { "brcm,bcm11351", NULL, }; DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") - .init_time = clocksource_of_init, .init_machine = board_init, .restart = bcm_kona_restart, .dt_compat = bcm11351_dt_compat, -- cgit v1.2.3 From 9f1205d775b6be9cd6d19224e2916147815bc44a Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 17 Sep 2013 00:38:10 +0200 Subject: ARM: bcm2835: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Also remove call to of_clk_init from clk-bcm2835 with core fixed_clock match, as this has already been registered now. Signed-off-by: Sebastian Hesselbarth Acked-by: Stephen Warren Acked-by: Mike Turquette --- arch/arm/mach-bcm2835/bcm2835.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c index 40686d7ef500..d50135be0c20 100644 --- a/arch/arm/mach-bcm2835/bcm2835.c +++ b/arch/arm/mach-bcm2835/bcm2835.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -134,7 +133,6 @@ DT_MACHINE_START(BCM2835, "BCM2835") .init_irq = bcm2835_init_irq, .handle_irq = bcm2835_handle_irq, .init_machine = bcm2835_init, - .init_time = clocksource_of_init, .restart = bcm2835_restart, .dt_compat = bcm2835_compat MACHINE_END -- cgit v1.2.3 From 51e40f52d7b5254873eac6f76287b74accaecd64 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Fri, 6 Sep 2013 15:08:36 +0200 Subject: ARM: dove: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. While at it, also remove some obsolete includes. Signed-off-by: Sebastian Hesselbarth Tested-by: Andrew Lunn Acked-by: Jason Cooper --- arch/arm/mach-dove/board-dt.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-dove/board-dt.c b/arch/arm/mach-dove/board-dt.c index 49f72a848423..ddb86631f16a 100644 --- a/arch/arm/mach-dove/board-dt.c +++ b/arch/arm/mach-dove/board-dt.c @@ -10,17 +10,13 @@ #include #include -#include -#include #include #include -#include #include #include #include #include #include -#include #include "common.h" /* @@ -45,12 +41,6 @@ static void __init dove_legacy_clk_init(void) of_clk_get_from_provider(&clkspec)); } -static void __init dove_dt_time_init(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static void __init dove_dt_init_early(void) { mvebu_mbus_init("marvell,dove-mbus", @@ -84,7 +74,6 @@ static const char * const dove_dt_board_compat[] = { DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)") .map_io = dove_map_io, .init_early = dove_dt_init_early, - .init_time = dove_dt_time_init, .init_machine = dove_dt_init, .restart = dove_restart, .dt_compat = dove_dt_board_compat, -- cgit v1.2.3 From e8ecbc7c51a4c27030427db055597fb53e29d0db Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 12:45:59 +0200 Subject: ARM: exynos: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. While at it, also remove some now redundant includes. Signed-off-by: Sebastian Hesselbarth Reviewed-by: Tomasz Figa --- arch/arm/mach-exynos/common.c | 8 -------- arch/arm/mach-exynos/common.h | 1 - arch/arm/mach-exynos/mach-exynos4-dt.c | 2 -- arch/arm/mach-exynos/mach-exynos5-dt.c | 2 -- 4 files changed, 13 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index ba95e5db2501..a4e7ba828810 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include @@ -367,12 +365,6 @@ static void __init exynos5_map_io(void) iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); } -void __init exynos_init_time(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - struct bus_type exynos_subsys = { .name = "exynos-core", .dev_name = "exynos-core", diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 8646a141ae46..f0fa2050d08d 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -16,7 +16,6 @@ #include void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); -void exynos_init_time(void); struct map_desc; void exynos_init_io(void); diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index 0099c6c13bba..6858d73dcf48 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -54,7 +53,6 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") .init_early = exynos_firmware_init, .init_machine = exynos4_dt_machine_init, .init_late = exynos_init_late, - .init_time = exynos_init_time, .dt_compat = exynos4_dt_compat, .restart = exynos4_restart, .reserve = exynos4_reserve, diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index f874b773ca13..bac21054cec8 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -76,7 +75,6 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") .map_io = exynos_init_io, .init_machine = exynos5_dt_machine_init, .init_late = exynos_init_late, - .init_time = exynos_init_time, .dt_compat = exynos5_dt_compat, .restart = exynos5_restart, .reserve = exynos5_reserve, -- cgit v1.2.3 From 26cae166cff9148cd2cab40f64ed548ba1189a8e Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 27 Aug 2013 14:42:06 +0200 Subject: ARM: highbank: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Highbank clock provider need a reference to system registers, as a workaround current clk driver maps those independent of arch code now. Signed-off-by: Sebastian Hesselbarth Acked-by: Rob Herring Acked-by: Mike Turquette --- arch/arm/mach-highbank/highbank.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index 8e63ccdb0de3..e6d6eacea9d0 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -83,20 +82,6 @@ static void __init highbank_init_irq(void) } } -static void __init highbank_timer_init(void) -{ - struct device_node *np; - - /* Map system registers */ - np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); - sregs_base = of_iomap(np, 0); - WARN_ON(!sregs_base); - - of_clk_init(NULL); - - clocksource_of_init(); -} - static void highbank_power_off(void) { highbank_set_pwr_shutdown(); @@ -155,6 +140,13 @@ static struct notifier_block highbank_platform_nb = { static void __init highbank_init(void) { + struct device_node *np; + + /* Map system registers */ + np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); + sregs_base = of_iomap(np, 0); + WARN_ON(!sregs_base); + pm_power_off = highbank_power_off; highbank_pm_init(); @@ -176,7 +168,6 @@ DT_MACHINE_START(HIGHBANK, "Highbank") #endif .smp = smp_ops(highbank_smp_ops), .init_irq = highbank_init_irq, - .init_time = highbank_timer_init, .init_machine = highbank_init, .dt_compat = highbank_match, .restart = highbank_restart, -- cgit v1.2.3 From 4d9d18a560a50920691865c1efdad6577616eaa9 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 27 Aug 2013 14:50:00 +0200 Subject: ARM: imx: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Shawn Guo --- arch/arm/mach-imx/clk-imx51-imx53.c | 29 ++++++++++------------------- arch/arm/mach-imx/common.h | 4 ---- arch/arm/mach-imx/imx51-dt.c | 6 ------ arch/arm/mach-imx/mach-imx53.c | 6 ------ arch/arm/mach-imx/mach-imx6q.c | 14 +++----------- arch/arm/mach-imx/mach-imx6sl.c | 7 ------- arch/arm/mach-imx/mach-vf610.c | 9 --------- 7 files changed, 13 insertions(+), 62 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index 1a56a3319997..1b796db7652c 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -131,8 +132,6 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, { int i; - of_clk_init(NULL); - clk[dummy] = imx_clk_fixed("dummy", 0); clk[ckil] = imx_obtain_fixed_clock("ckil", rate_ckil); clk[osc] = imx_obtain_fixed_clock("osc", rate_osc); @@ -465,12 +464,16 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, return 0; } -int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, - unsigned long rate_ckih1, unsigned long rate_ckih2) +static void __init mx51_clocks_init_dt(struct device_node *np) +{ + mx51_clocks_init(0, 0, 0, 0); +} +CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init_dt); + +static void __init mx53_clocks_init(struct device_node *np) { int i; unsigned long r; - struct device_node *np; clk[pll1_sw] = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE); clk[pll2_sw] = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE); @@ -529,12 +532,11 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, pr_err("i.MX53 clk %d: register failed with %ld\n", i, PTR_ERR(clk[i])); - np = of_find_compatible_node(NULL, NULL, "fsl,imx53-ccm"); clk_data.clks = clk; clk_data.clk_num = ARRAY_SIZE(clk); of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); - mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); + mx5_clocks_common_init(0, 0, 0, 0); clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); @@ -566,16 +568,5 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, r = clk_round_rate(clk[usboh3_per_gate], 54000000); clk_set_rate(clk[usboh3_per_gate], r); - - return 0; -} - -int __init mx51_clocks_init_dt(void) -{ - return mx51_clocks_init(0, 0, 0, 0); -} - -int __init mx53_clocks_init_dt(void) -{ - return mx53_clocks_init(0, 0, 0, 0); } +CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init); diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 4517fd760bfc..28e8ca0871e8 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h @@ -63,13 +63,9 @@ extern int mx31_clocks_init(unsigned long fref); extern int mx35_clocks_init(void); extern int mx51_clocks_init(unsigned long ckil, unsigned long osc, unsigned long ckih1, unsigned long ckih2); -extern int mx53_clocks_init(unsigned long ckil, unsigned long osc, - unsigned long ckih1, unsigned long ckih2); extern int mx25_clocks_init_dt(void); extern int mx27_clocks_init_dt(void); extern int mx31_clocks_init_dt(void); -extern int mx51_clocks_init_dt(void); -extern int mx53_clocks_init_dt(void); extern struct platform_device *mxc_register_gpio(char *name, int id, resource_size_t iobase, resource_size_t iosize, int irq, int irq_high); extern void mxc_set_cpu_type(unsigned int type); diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c index 53e43e579dd7..bece8a65e6f0 100644 --- a/arch/arm/mach-imx/imx51-dt.c +++ b/arch/arm/mach-imx/imx51-dt.c @@ -34,17 +34,11 @@ static const char *imx51_dt_board_compat[] __initdata = { NULL }; -static void __init imx51_timer_init(void) -{ - mx51_clocks_init_dt(); -} - DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") .map_io = mx51_map_io, .init_early = imx51_init_early, .init_irq = mx51_init_irq, .handle_irq = imx51_handle_irq, - .init_time = imx51_timer_init, .init_machine = imx51_dt_init, .init_late = imx51_init_late, .dt_compat = imx51_dt_board_compat, diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index 98c58944015a..c9c4d8d96931 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c @@ -36,17 +36,11 @@ static const char *imx53_dt_board_compat[] __initdata = { NULL }; -static void __init imx53_timer_init(void) -{ - mx53_clocks_init_dt(); -} - DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") .map_io = mx53_map_io, .init_early = imx53_init_early, .init_irq = mx53_init_irq, .handle_irq = imx53_handle_irq, - .init_time = imx53_timer_init, .init_machine = imx53_dt_init, .init_late = imx53_init_late, .dt_compat = imx53_dt_board_compat, diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 85a1b51346c8..47ebc36636a7 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -11,9 +11,7 @@ */ #include -#include #include -#include #include #include #include @@ -192,6 +190,9 @@ static void __init imx6q_1588_init(void) static void __init imx6q_init_machine(void) { + imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", + imx6q_revision()); + imx6q_enet_phy_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); @@ -288,14 +289,6 @@ static void __init imx6q_init_irq(void) irqchip_init(); } -static void __init imx6q_timer_init(void) -{ - of_clk_init(NULL); - clocksource_of_init(); - imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", - imx6q_revision()); -} - static const char *imx6q_dt_compat[] __initdata = { "fsl,imx6dl", "fsl,imx6q", @@ -306,7 +299,6 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad/DualLite (Device Tree)") .smp = smp_ops(imx_smp_ops), .map_io = imx6q_map_io, .init_irq = imx6q_init_irq, - .init_time = imx6q_timer_init, .init_machine = imx6q_init_machine, .init_late = imx6q_init_late, .dt_compat = imx6q_dt_compat, diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index 0d75dc54f715..c70bd7c64974 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c @@ -7,7 +7,6 @@ * */ -#include #include #include #include @@ -31,11 +30,6 @@ static void __init imx6sl_init_irq(void) irqchip_init(); } -static void __init imx6sl_timer_init(void) -{ - of_clk_init(NULL); -} - static const char *imx6sl_dt_compat[] __initdata = { "fsl,imx6sl", NULL, @@ -44,7 +38,6 @@ static const char *imx6sl_dt_compat[] __initdata = { DT_MACHINE_START(IMX6SL, "Freescale i.MX6 SoloLite (Device Tree)") .map_io = debug_ll_io_init, .init_irq = imx6sl_init_irq, - .init_time = imx6sl_timer_init, .init_machine = imx6sl_init_machine, .dt_compat = imx6sl_dt_compat, .restart = mxc_restart, diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c index 816991deb9b8..af0cb8a9dc48 100644 --- a/arch/arm/mach-imx/mach-vf610.c +++ b/arch/arm/mach-imx/mach-vf610.c @@ -8,9 +8,7 @@ */ #include -#include #include -#include #include #include @@ -28,12 +26,6 @@ static void __init vf610_init_irq(void) irqchip_init(); } -static void __init vf610_init_time(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static const char *vf610_dt_compat[] __initdata = { "fsl,vf610", NULL, @@ -41,7 +33,6 @@ static const char *vf610_dt_compat[] __initdata = { DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") .init_irq = vf610_init_irq, - .init_time = vf610_init_time, .init_machine = vf610_init_machine, .dt_compat = vf610_dt_compat, .restart = mxc_restart, -- cgit v1.2.3 From a169e3aa37f33ca88131168e46bf23a317de6ace Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 27 Aug 2013 15:10:16 +0200 Subject: ARM: kirkwood: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Tested-by: Andrew Lunn Acked-by: Jason Cooper --- arch/arm/mach-kirkwood/board-dt.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 82d3ad8e87cf..a32a3e507a9d 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -66,12 +65,6 @@ static void __init kirkwood_legacy_clk_init(void) clk_prepare_enable(clk); } -static void __init kirkwood_dt_time_init(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static void __init kirkwood_dt_init_early(void) { mvebu_mbus_init("marvell,kirkwood-mbus", @@ -122,7 +115,6 @@ DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") /* Maintainer: Jason Cooper */ .map_io = kirkwood_map_io, .init_early = kirkwood_dt_init_early, - .init_time = kirkwood_dt_time_init, .init_machine = kirkwood_dt_init, .restart = kirkwood_restart, .dt_compat = kirkwood_dt_board_compat, -- cgit v1.2.3 From dd03ee9ae5bc080297175c921b1a693d0de1e8b0 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 13:16:01 +0200 Subject: ARM: mxs: remove custom .init_time hook This patch converts clk-imx2[38] clocksource_of_init compatible init associated with fsl,imx2[38]-clkctrl. With arch/arm calling of_clk_init(NULL) from time_init(), we can now also remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Mike Turquette Acked-by: Shawn Guo --- arch/arm/mach-mxs/mach-mxs.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 98f6e2adb53e..cc511a4890a3 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include #include @@ -490,16 +488,6 @@ static void mxs_restart(enum reboot_mode mode, const char *cmd) soft_restart(0); } -static void __init mxs_timer_init(void) -{ - if (of_machine_is_compatible("fsl,imx23")) - mx23_clocks_init(); - else - mx28_clocks_init(); - of_clk_init(NULL); - clocksource_of_init(); -} - static const char *mxs_dt_compat[] __initdata = { "fsl,imx28", "fsl,imx23", @@ -508,7 +496,6 @@ static const char *mxs_dt_compat[] __initdata = { DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)") .handle_irq = icoll_handle_irq, - .init_time = mxs_timer_init, .init_machine = mxs_machine_init, .init_late = mxs_pm_init, .dt_compat = mxs_dt_compat, -- cgit v1.2.3 From e70ded64e6e08d7d35932b4a66a791480edfc0d1 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 19:09:21 +0200 Subject: ARM: nomadik: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Linus Walleij --- arch/arm/mach-nomadik/cpu-8815.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 2be38a00a3d9..53fbf63c8b66 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include #include @@ -113,12 +111,6 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) writel(1, srcbase + 0x18); } -static void __init cpu8815_timer_init_of(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static struct fsmc_nand_timings cpu8815_nand_timings = { .thiz = 0, .thold = 0x10, @@ -232,7 +224,6 @@ static const char * cpu8815_board_compat[] = { DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") .map_io = cpu8815_map_io, - .init_time = cpu8815_timer_init_of, .init_machine = cpu8815_init_of, .restart = cpu8815_restart, .dt_compat = cpu8815_board_compat, -- cgit v1.2.3 From 638085eea1cb218bc9267d8629fb1982e1ff7c3b Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 27 Aug 2013 15:19:10 +0200 Subject: ARM: nspire: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth --- arch/arm/mach-nspire/nspire.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-nspire/nspire.c b/arch/arm/mach-nspire/nspire.c index 99e26092a9f7..4b2ed2e8352f 100644 --- a/arch/arm/mach-nspire/nspire.c +++ b/arch/arm/mach-nspire/nspire.c @@ -14,11 +14,9 @@ #include #include #include -#include #include #include #include -#include #include #include @@ -65,12 +63,6 @@ static void __init nspire_init(void) nspire_auxdata, NULL); } -static void __init nspire_init_time(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static void nspire_restart(char mode, const char *cmd) { void __iomem *base = ioremap(NSPIRE_MISC_PHYS_BASE, SZ_4K); @@ -83,7 +75,6 @@ static void nspire_restart(char mode, const char *cmd) DT_MACHINE_START(NSPIRE, "TI-NSPIRE") .dt_compat = nspire_dt_match, .map_io = nspire_map_io, - .init_time = nspire_init_time, .init_machine = nspire_init, .restart = nspire_restart, MACHINE_END -- cgit v1.2.3 From 50432501fc6fabd57e86b968f0a4d5099e074c6f Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 14:23:55 +0200 Subject: ARM: prima2: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Barry Song --- arch/arm/mach-prima2/common.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index 9b7663d9096f..d49aff74de98 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c @@ -6,8 +6,6 @@ * Licensed under GPLv2 or later. */ -#include -#include #include #include #include @@ -22,12 +20,6 @@ void __init sirfsoc_init_late(void) sirfsoc_pm_init(); } -static __init void sirfsoc_init_time(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static __init void sirfsoc_map_io(void) { sirfsoc_map_lluart(); @@ -43,7 +35,6 @@ static const char *atlas6_dt_match[] __initdata = { DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") /* Maintainer: Barry Song */ .map_io = sirfsoc_map_io, - .init_time = sirfsoc_init_time, .init_late = sirfsoc_init_late, .dt_compat = atlas6_dt_match, .restart = sirfsoc_restart, @@ -59,7 +50,6 @@ static const char *prima2_dt_match[] __initdata = { DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") /* Maintainer: Barry Song */ .map_io = sirfsoc_map_io, - .init_time = sirfsoc_init_time, .dma_zone_size = SZ_256M, .init_late = sirfsoc_init_late, .dt_compat = prima2_dt_match, @@ -77,7 +67,6 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") /* Maintainer: Barry Song */ .smp = smp_ops(sirfsoc_smp_ops), .map_io = sirfsoc_map_io, - .init_time = sirfsoc_init_time, .init_late = sirfsoc_init_late, .dt_compat = marco_dt_match, .restart = sirfsoc_restart, -- cgit v1.2.3 From 2ab38d9343416f0de93bfeafbd2470fcc994f8ab Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 27 Aug 2013 15:19:46 +0200 Subject: ARM: rockchip: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Heiko Stuebner --- arch/arm/mach-rockchip/rockchip.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c index 724d2d81f976..82c0b0709712 100644 --- a/arch/arm/mach-rockchip/rockchip.c +++ b/arch/arm/mach-rockchip/rockchip.c @@ -19,18 +19,10 @@ #include #include #include -#include -#include #include #include #include -static void __init rockchip_timer_init(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static void __init rockchip_dt_init(void) { l2x0_of_init(0, ~0UL); @@ -47,6 +39,5 @@ static const char * const rockchip_board_dt_compat[] = { DT_MACHINE_START(ROCKCHIP_DT, "Rockchip Cortex-A9 (Device Tree)") .init_machine = rockchip_dt_init, - .init_time = rockchip_timer_init, .dt_compat = rockchip_board_dt_compat, MACHINE_END -- cgit v1.2.3 From dc8105817f634d50a91cea9464bbc73ebb36182e Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 13:38:00 +0200 Subject: ARM: socfpga: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Dinh Nguyen --- arch/arm/mach-socfpga/socfpga.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index 6df7bb9fe64a..dd0d49cdbe09 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c @@ -14,8 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include -#include #include #include #include @@ -91,12 +89,6 @@ static void __init socfpga_init_irq(void) socfpga_sysmgr_init(); } -static void __init socfpga_init_time(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd) { u32 temp; @@ -126,7 +118,6 @@ DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA") .smp = smp_ops(socfpga_smp_ops), .map_io = socfpga_map_io, .init_irq = socfpga_init_irq, - .init_time = socfpga_init_time, .init_machine = socfpga_cyclone5_init, .restart = socfpga_cyclone5_restart, .dt_compat = altera_dt_match, -- cgit v1.2.3 From 28fbb151d5afe15a2fabfe2fe8585b610b022f5b Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 27 Aug 2013 15:23:07 +0200 Subject: ARM: sti: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. To get rid of it, move l2cc init to .init_machine hook instead. Signed-off-by: Sebastian Hesselbarth Acked-by: Srinivas Kandagatla --- arch/arm/mach-sti/board-dt.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c index 8fe6f0c46480..1217fb598cfd 100644 --- a/arch/arm/mach-sti/board-dt.c +++ b/arch/arm/mach-sti/board-dt.c @@ -7,9 +7,8 @@ * published by the Free Software Foundation. */ -#include -#include #include +#include #include #include @@ -28,11 +27,10 @@ void __init stih41x_l2x0_init(void) l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK); } -static void __init stih41x_timer_init(void) +static void __init stih41x_machine_init(void) { - of_clk_init(NULL); - clocksource_of_init(); stih41x_l2x0_init(); + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } static const char *stih41x_dt_match[] __initdata = { @@ -42,7 +40,7 @@ static const char *stih41x_dt_match[] __initdata = { }; DT_MACHINE_START(STM, "STiH415/416 SoC with Flattened Device Tree") - .init_time = stih41x_timer_init, + .init_machine = stih41x_machine_init, .smp = smp_ops(sti_smp_ops), .dt_compat = stih41x_dt_match, MACHINE_END -- cgit v1.2.3 From b39e0249830a1b88cc213d1e9d3d1ca1f40df3b8 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Fri, 6 Sep 2013 15:11:01 +0200 Subject: ARM: sunxi: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Maxime Ripard --- arch/arm/mach-sunxi/sunxi.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index e5a69756427b..90dda6228510 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c @@ -10,7 +10,6 @@ * warranty of any kind, whether express or implied. */ -#include #include #include #include @@ -114,12 +113,6 @@ static void sunxi_setup_restart(void) arm_pm_restart = of_id->data; } -static void __init sunxi_timer_init(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static void __init sunxi_dt_init(void) { sunxi_setup_restart(); @@ -138,6 +131,5 @@ static const char * const sunxi_board_dt_compat[] = { DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)") .init_machine = sunxi_dt_init, - .init_time = sunxi_timer_init, .dt_compat = sunxi_board_dt_compat, MACHINE_END -- cgit v1.2.3 From 41136b664ad11d542e8378c757dac9ab174b0805 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 13:42:55 +0200 Subject: ARM: tegra: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Stephen Warren --- arch/arm/mach-tegra/tegra.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index 4da271df2e6c..2e2192807830 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c @@ -16,7 +16,6 @@ * */ -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include #include @@ -84,12 +82,6 @@ out: of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); } -static void __init tegra_dt_init_time(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static void __init paz00_init(void) { if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC)) @@ -129,7 +121,6 @@ DT_MACHINE_START(TEGRA_DT, "NVIDIA Tegra SoC (Flattened Device Tree)") .smp = smp_ops(tegra_smp_ops), .init_early = tegra_init_early, .init_irq = tegra_dt_init_irq, - .init_time = tegra_dt_init_time, .init_machine = tegra_dt_init, .init_late = tegra_dt_init_late, .restart = tegra_assert_system_reset, -- cgit v1.2.3 From 56e89cf55c47288f906bd769cb3d6d4736db548a Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 27 Aug 2013 15:34:12 +0200 Subject: ARM: vexpress: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. The call to versatile_sched_clock_init is moved to .init_early instead, were it is also for non-DT boards. Signed-off-by: Sebastian Hesselbarth Tested-by: Jon Medhurst (Tixy) Acked-by: Pawel Moll --- arch/arm/mach-vexpress/v2m.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 95a469e23e37..4f8b8cb17ff5 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c @@ -1,12 +1,10 @@ /* * Versatile Express V2M Motherboard Support */ -#include #include #include #include #include -#include #include #include #include @@ -22,7 +20,6 @@ #include #include #include -#include #include #include @@ -422,16 +419,8 @@ void __init v2m_dt_init_early(void) pr_warning("vexpress: DT HBI (%x) is not matching " "hardware (%x)!\n", dt_hbi, hbi); } -} - -static void __init v2m_dt_timer_init(void) -{ - of_clk_init(NULL); - clocksource_of_init(); - - versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), - 24000000); + versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000); } static const struct of_device_id v2m_dt_bus_match[] __initconst = { @@ -458,6 +447,5 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") .smp_init = smp_init_ops(vexpress_smp_init_ops), .map_io = v2m_dt_map_io, .init_early = v2m_dt_init_early, - .init_time = v2m_dt_timer_init, .init_machine = v2m_dt_init, MACHINE_END -- cgit v1.2.3 From 64cc69abbb32e17aa44d2c696eca65cb6f9364ca Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 14:12:46 +0200 Subject: ARM: vt8500: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Tony Prisk --- arch/arm/mach-vt8500/vt8500.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c index 504156351b3e..4a73464cb11b 100644 --- a/arch/arm/mach-vt8500/vt8500.c +++ b/arch/arm/mach-vt8500/vt8500.c @@ -18,8 +18,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include #include #include #include @@ -74,12 +72,6 @@ static void vt8500_power_off(void) asm("mcr%? p15, 0, %0, c7, c0, 4" : : "r" (0)); } -static void __init vt8500_init_time(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - void __init vt8500_init(void) { struct device_node *np; @@ -183,7 +175,6 @@ DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)") .dt_compat = vt8500_dt_compat, .map_io = vt8500_map_io, .init_machine = vt8500_init, - .init_time = vt8500_init_time, .restart = vt8500_restart, MACHINE_END -- cgit v1.2.3