2 * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
4 * arch/arm/mach-kirkwood/board-dt.c
6 * Flattened Device Tree board initialization
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
13 #include <linux/kernel.h>
14 #include <linux/init.h>
16 #include <linux/of_platform.h>
17 #include <linux/kexec.h>
18 #include <asm/mach/arch.h>
19 #include <asm/mach/map.h>
20 #include <mach/bridge-regs.h>
24 static struct of_device_id kirkwood_dt_match_table[] __initdata = {
25 { .compatible = "simple-bus", },
29 struct of_dev_auxdata kirkwood_auxdata_lookup[] __initdata = {
30 OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
31 OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
33 OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
34 OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
35 OF_DEV_AUXDATA("marvell,orion-nand", 0xf4000000, "orion_nand", NULL),
39 static void __init kirkwood_dt_init(void)
41 pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
44 * Disable propagation of mbus errors to the CPU local bus,
45 * as this causes mbus errors (which can occur for example
46 * for PCI aborts) to throw CPU aborts, which we're not set
49 writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG);
51 kirkwood_setup_cpu_mbus();
53 #ifdef CONFIG_CACHE_FEROCEON_L2
57 /* Setup root of clk tree */
60 /* internal devices that every board has */
63 kirkwood_crypto_init();
66 kexec_reinit = kirkwood_enable_pcie;
69 if (of_machine_is_compatible("globalscale,dreamplug"))
72 if (of_machine_is_compatible("dlink,dns-kirkwood"))
75 if (of_machine_is_compatible("iom,iconnect"))
78 if (of_machine_is_compatible("raidsonic,ib-nas62x0"))
81 if (of_machine_is_compatible("qnap,ts219"))
84 if (of_machine_is_compatible("seagate,goflexnet"))
87 if (of_machine_is_compatible("buffalo,lsxl"))
90 of_platform_populate(NULL, kirkwood_dt_match_table,
91 kirkwood_auxdata_lookup, NULL);
94 static const char *kirkwood_dt_board_compat[] = {
95 "globalscale,dreamplug",
99 "raidsonic,ib-nas62x0",
106 DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
107 /* Maintainer: Jason Cooper <jason@lakedaemon.net> */
108 .map_io = kirkwood_map_io,
109 .init_early = kirkwood_init_early,
110 .init_irq = orion_dt_init_irq,
111 .timer = &kirkwood_timer,
112 .init_machine = kirkwood_dt_init,
113 .restart = kirkwood_restart,
114 .dt_compat = kirkwood_dt_board_compat,