From: Olof Johansson Date: Mon, 7 Oct 2013 16:47:31 +0000 (-0700) Subject: Merge branch 'clk-of-init-v2_for-3.13' of https://github.com/shesselba/linux-dove... X-Git-Tag: v3.13-rc1~160^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c884357ec6e27c7967c78fb111cc8a830881f43b;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 --- c884357ec6e27c7967c78fb111cc8a830881f43b diff --cc arch/arm/mach-nomadik/cpu-8815.c index c6c156e,53fbf63..cce2c9d --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@@ -111,39 -111,17 +109,6 @@@ static void cpu8815_restart(enum reboot 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); -static struct fsmc_nand_timings cpu8815_nand_timings = { - .thiz = 0, - .thold = 0x10, - .twait = 0x0A, - .tset = 0, -}; -- - clocksource_of_init(); - } -static struct fsmc_nand_platform_data cpu8815_nand_data = { - .nand_timings = &cpu8815_nand_timings, -}; -- /* * 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