You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'clk-of-init-v2_for-3.13' of https://github.com/shesselba/linux-dove into next/cleanup
From Sebastian Hasselbarth: This is a patch set based on an RFC [1][2] sent earlier to provide a common arch/arm init for DT clock providers. Currently, the call to of_clk_init(NULL) to initialize DT clock providers is spread among several mach-dirs. Since most machs require DT clocks initialized before timers, no initcall can be used. By adding of_clk_init(NULL) to arch/arm time_init(), we can remove all mach-specific .init_time hooks that basically called of_clk_init and clocksource_of_init. In contrast to the RFC version, of_clk_init(NULL) is now only called if no custom .init_time callback is set. This allows some machs to still call clock init themselves, as not all can be converted now. Therefore, this patch sets drops conversion of mach-mvebu and mach-zynq. New machs that were introduced with v3.12-rc1 are also converted, except mach-u300 that requires clocks before irqs. * 'clk-of-init-v2_for-3.13' of https://github.com/shesselba/linux-dove: (29 commits) ARM: vt8500: remove custom .init_time hook ARM: vexpress: remove custom .init_time hook ARM: tegra: remove custom .init_time hook ARM: sunxi: remove custom .init_time hook ARM: sti: remove custom .init_time hook ARM: socfpga: remove custom .init_time hook ARM: rockchip: remove custom .init_time hook ARM: prima2: remove custom .init_time hook ARM: nspire: remove custom .init_time hook ARM: nomadik: remove custom .init_time hook ARM: mxs: remove custom .init_time hook ARM: kirkwood: remove custom .init_time hook ARM: imx: remove custom .init_time hook ARM: highbank: remove custom .init_time hook ARM: exynos: remove custom .init_time hook ARM: dove: remove custom .init_time hook ARM: bcm2835: remove custom .init_time hook ARM: bcm: provide common arch init for DT clocks ARM: call of_clk_init from default time_init handler ARM: vt8500: prepare for arch-wide .init_time callback ... Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
+20
-15
@@ -11,25 +11,26 @@
|
||||
* This file contains the ARM-specific time handling details:
|
||||
* reading the RTC at bootup, etc...
|
||||
*/
|
||||
#include <linux/export.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/timex.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/profile.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/profile.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched_clock.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/timex.h>
|
||||
#include <linux/timer.h>
|
||||
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/stacktrace.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
#include <asm/stacktrace.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
#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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/clk/bcm2835.h>
|
||||
#include <linux/clocksource.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
@@ -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
|
||||
|
||||
@@ -10,17 +10,13 @@
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_data/usb-ehci-orion.h>
|
||||
#include <asm/hardware/cache-tauros2.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <mach/dove.h>
|
||||
#include <mach/pm.h>
|
||||
#include <plat/common.h>
|
||||
#include <plat/irq.h>
|
||||
#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,
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/irqchip/arm-gic.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <linux/of.h>
|
||||
|
||||
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);
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/clocksource.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <plat/mfc.h>
|
||||
@@ -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,
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/clocksource.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <mach/regs-pmu.h>
|
||||
@@ -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,
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/amba/bus.h>
|
||||
#include <linux/clk-provider.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/cputype.h>
|
||||
@@ -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,
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/export.h>
|
||||
@@ -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);
|
||||
@@ -293,14 +294,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",
|
||||
@@ -311,7 +304,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,
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
@@ -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,
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/kexec.h>
|
||||
@@ -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 <jason@lakedaemon.net> */
|
||||
.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,
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/clk/mxs.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/gpio.h>
|
||||
@@ -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,
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/platform_data/clk-nomadik.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_address.h>
|
||||
@@ -111,39 +109,6 @@ 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();
|
||||
}
|
||||
|
||||
/*
|
||||
* The SMSC911x IRQ is connected to a GPIO pin, but the driver expects
|
||||
* to simply request an IRQ passed as a resource. So the GPIO pin needs
|
||||
@@ -226,7 +191,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,
|
||||
|
||||
@@ -14,11 +14,9 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/irqchip/arm-vic.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clkdev.h>
|
||||
#include <linux/amba/bus.h>
|
||||
#include <linux/amba/clcd.h>
|
||||
#include <linux/clocksource.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach-types.h>
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user