diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2013-07-02 15:15:07 +0200 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-07-25 21:07:20 +0000 |
commit | 2326f04321a9aec591c1d159b3a9d12c2bf89438 (patch) | |
tree | ddace235c46265396047753b61dfba63e381f44a /arch/arm/mach-kirkwood/board-dt.c | |
parent | f07d73e33d0eb9858d48b81eb7037e132293ed84 (diff) | |
download | talos-obmc-linux-2326f04321a9aec591c1d159b3a9d12c2bf89438.tar.gz talos-obmc-linux-2326f04321a9aec591c1d159b3a9d12c2bf89438.zip |
ARM: kirkwood: convert to DT irqchip and clocksource
With recent support for true irqchip and clocksource drivers for Orion
SoCs, now make use of it on DT enabled Kirkwood boards.
This also introduces a new Kconfig option for legacy (non-DT) Kirkwood
where old code is moved out to and polishes DT board file a little bit.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-kirkwood/board-dt.c')
-rw-r--r-- | arch/arm/mach-kirkwood/board-dt.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 881f37e3c0af..56d4a5eb853a 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c @@ -15,6 +15,9 @@ #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> #include <asm/mach/arch.h> #include <asm/mach/map.h> @@ -67,10 +70,17 @@ static void __init kirkwood_legacy_clk_init(void) clk_prepare_enable(clk); } -static void __init kirkwood_of_clk_init(void) +static void __init kirkwood_dt_time_init(void) { of_clk_init(NULL); - kirkwood_legacy_clk_init(); + clocksource_of_init(); +} + +static void __init kirkwood_dt_init_early(void) +{ + mvebu_mbus_init("marvell,kirkwood-mbus", + BRIDGE_WINS_BASE, BRIDGE_WINS_SZ, + DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ); } static void __init kirkwood_dt_init(void) @@ -91,8 +101,8 @@ static void __init kirkwood_dt_init(void) kirkwood_cpufreq_init(); - /* Setup root of clk tree */ - kirkwood_of_clk_init(); + /* Setup clocks for legacy devices */ + kirkwood_legacy_clk_init(); kirkwood_cpuidle_init(); @@ -114,9 +124,8 @@ static const char * const kirkwood_dt_board_compat[] = { DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)") /* Maintainer: Jason Cooper <jason@lakedaemon.net> */ .map_io = kirkwood_map_io, - .init_early = kirkwood_init_early, - .init_irq = orion_dt_init_irq, - .init_time = kirkwood_timer_init, + .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, |