[POWERPC] 4xx: Create common ppc4xx_reset_system() in ppc4xx_soc.c
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / powerpc / platforms / 44x / ebony.c
CommitLineData
f6dfc805
DG
1/*
2 * Ebony board specific routines
3 *
4 * Matt Porter <mporter@kernel.crashing.org>
5 * Copyright 2002-2005 MontaVista Software Inc.
6 *
7 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
8 * Copyright (c) 2003-2005 Zultys Technologies
9 *
10 * Rewritten and ported to the merged powerpc tree:
11 * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18
19#include <linux/init.h>
ed08aff7 20#include <linux/of_platform.h>
22258fa4 21#include <linux/rtc.h>
ed08aff7 22
f6dfc805
DG
23#include <asm/machdep.h>
24#include <asm/prom.h>
25#include <asm/udbg.h>
26#include <asm/time.h>
27#include <asm/uic.h>
25c24f3d 28#include <asm/pci-bridge.h>
93173ce2 29#include <asm/ppc4xx.h>
f6dfc805 30
8cb34d29 31static __initdata struct of_device_id ebony_of_bus[] = {
c72ea777
DG
32 { .compatible = "ibm,plb4", },
33 { .compatible = "ibm,opb", },
34 { .compatible = "ibm,ebc", },
f6dfc805
DG
35 {},
36};
37
38static int __init ebony_device_probe(void)
39{
f6dfc805 40 of_platform_bus_probe(NULL, ebony_of_bus, NULL);
22258fa4 41 of_instantiate_rtc();
f6dfc805
DG
42
43 return 0;
44}
3f8c5c3b 45machine_device_initcall(ebony, ebony_device_probe);
f6dfc805
DG
46
47/*
48 * Called very early, MMU is off, device-tree isn't unflattened
49 */
50static int __init ebony_probe(void)
51{
52 unsigned long root = of_get_flat_dt_root();
53
54 if (!of_flat_dt_is_compatible(root, "ibm,ebony"))
55 return 0;
56
25c24f3d
BH
57 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
58
f6dfc805
DG
59 return 1;
60}
61
f6dfc805
DG
62define_machine(ebony) {
63 .name = "Ebony",
64 .probe = ebony_probe,
f6dfc805
DG
65 .progress = udbg_progress,
66 .init_IRQ = uic_init_tree,
67 .get_irq = uic_get_irq,
93173ce2 68 .restart = ppc4xx_reset_system,
f6dfc805
DG
69 .calibrate_decr = generic_calibrate_decr,
70};