blob: b63b42d11d6c92e4d0e476100df85ead02d49ccf [file] [log] [blame]
Anton Vorontsovb13e9302008-05-23 20:39:01 +04001/*
2 * MPC8360E-RDK board file.
3 *
Yang Li8a56e1e2012-11-01 18:53:42 +00004 * Copyright (c) 2006 Freescale Semiconductor, Inc.
Anton Vorontsovb13e9302008-05-23 20:39:01 +04005 * Copyright (c) 2007-2008 MontaVista Software, Inc.
6 *
7 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 */
14
15#include <linux/kernel.h>
16#include <linux/pci.h>
17#include <linux/of_platform.h>
18#include <linux/io.h>
19#include <asm/prom.h>
20#include <asm/time.h>
21#include <asm/ipic.h>
22#include <asm/udbg.h>
23#include <asm/qe.h>
24#include <asm/qe_ic.h>
25#include <sysdev/fsl_soc.h>
John Rigby76fe1ff2008-06-26 11:07:57 -060026#include <sysdev/fsl_pci.h>
Anton Vorontsovb13e9302008-05-23 20:39:01 +040027
28#include "mpc83xx.h"
29
Dmitry Eremin-Solenikov7669d582011-11-17 18:48:47 +040030machine_device_initcall(mpc836x_rdk, mpc83xx_declare_of_platform_devices);
Anton Vorontsovb13e9302008-05-23 20:39:01 +040031
32static void __init mpc836x_rdk_setup_arch(void)
33{
Anton Vorontsovb13e9302008-05-23 20:39:01 +040034 if (ppc_md.progress)
35 ppc_md.progress("mpc836x_rdk_setup_arch()", 0);
36
Dmitry Eremin-Solenikovbede4802011-11-17 18:48:48 +040037 mpc83xx_setup_pci();
Anton Vorontsov20cfb412008-12-05 19:55:04 +030038#ifdef CONFIG_QUICC_ENGINE
Anton Vorontsovb13e9302008-05-23 20:39:01 +040039 qe_reset();
Anton Vorontsov20cfb412008-12-05 19:55:04 +030040#endif
Anton Vorontsovb13e9302008-05-23 20:39:01 +040041}
42
Anton Vorontsovb13e9302008-05-23 20:39:01 +040043/*
44 * Called very early, MMU is off, device-tree isn't unflattened.
45 */
46static int __init mpc836x_rdk_probe(void)
47{
48 unsigned long root = of_get_flat_dt_root();
49
50 return of_flat_dt_is_compatible(root, "fsl,mpc8360rdk");
51}
52
53define_machine(mpc836x_rdk) {
54 .name = "MPC836x RDK",
55 .probe = mpc836x_rdk_probe,
56 .setup_arch = mpc836x_rdk_setup_arch,
Dmitry Eremin-Solenikovd4fb5eb2011-07-22 23:55:42 +040057 .init_IRQ = mpc83xx_ipic_and_qe_init_IRQ,
Anton Vorontsovb13e9302008-05-23 20:39:01 +040058 .get_irq = ipic_get_irq,
59 .restart = mpc83xx_restart,
60 .time_init = mpc83xx_time_init,
61 .calibrate_decr = generic_calibrate_decr,
62 .progress = udbg_progress,
63};