2 * Copyright 2012 (C), Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
4 * arch/arm/mach-orion5x/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/cpu.h>
18 #include <linux/mbus.h>
19 #include <linux/clocksource.h>
20 #include <asm/system_misc.h>
21 #include <asm/mach/arch.h>
22 #include <asm/mach/map.h>
23 #include <mach/orion5x.h>
24 #include <mach/bridge-regs.h>
26 #include <plat/time.h>
29 static struct of_dev_auxdata orion5x_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-crypto", 0xf1090000, "mv_crypto", NULL
),
39 static void __init
orion5x_dt_init(void)
44 orion5x_id(&dev
, &rev
, &dev_name
);
45 printk(KERN_INFO
"Orion ID: %s. TCLK=%d.\n", dev_name
, orion5x_tclk
);
47 BUG_ON(mvebu_mbus_dt_init(false));
50 * Setup Orion address map
55 * Don't issue "Wait for Interrupt" instruction if we are
56 * running on D0 5281 silicon.
58 if (dev
== MV88F5281_DEV_ID
&& rev
== MV88F5281_REV_D0
) {
59 printk(KERN_INFO
"Orion: Applying 5281 D0 WFI workaround.\n");
60 cpu_idle_poll_ctrl(true);
63 if (of_machine_is_compatible("maxtor,shared-storage-2"))
66 of_platform_populate(NULL
, of_default_bus_match_table
,
67 orion5x_auxdata_lookup
, NULL
);
70 static const char *orion5x_dt_compat
[] = {
75 DT_MACHINE_START(ORION5X_DT
, "Marvell Orion5x (Flattened Device Tree)")
76 /* Maintainer: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */
77 .map_io
= orion5x_map_io
,
78 .init_machine
= orion5x_dt_init
,
79 .restart
= orion5x_restart
,
80 .dt_compat
= orion5x_dt_compat
,