x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
[linux/fpc-iii.git] / arch / powerpc / platforms / 85xx / ppa8548.c
blob6a7704b92c3bcb415586c8d26b6a5740d7bae43c
1 /*
2 * ppa8548 setup and early boot code.
4 * Copyright 2009 Prodrive B.V..
6 * By Stef van Os (see MAINTAINERS for contact information)
8 * Based on the SBC8548 support - Copyright 2007 Wind River Systems Inc.
9 * Based on the MPC8548CDS support - Copyright 2005 Freescale Inc.
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
17 #include <linux/stddef.h>
18 #include <linux/kernel.h>
19 #include <linux/init.h>
20 #include <linux/reboot.h>
21 #include <linux/seq_file.h>
22 #include <linux/of_platform.h>
24 #include <asm/machdep.h>
25 #include <asm/udbg.h>
26 #include <asm/mpic.h>
28 #include <sysdev/fsl_soc.h>
30 static void __init ppa8548_pic_init(void)
32 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
33 0, 256, " OpenPIC ");
34 BUG_ON(mpic == NULL);
35 mpic_init(mpic);
39 * Setup the architecture
41 static void __init ppa8548_setup_arch(void)
43 if (ppc_md.progress)
44 ppc_md.progress("ppa8548_setup_arch()", 0);
47 static void ppa8548_show_cpuinfo(struct seq_file *m)
49 uint32_t svid, phid1;
51 svid = mfspr(SPRN_SVR);
53 seq_printf(m, "Vendor\t\t: Prodrive B.V.\n");
54 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
56 /* Display cpu Pll setting */
57 phid1 = mfspr(SPRN_HID1);
58 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
61 static struct of_device_id __initdata of_bus_ids[] = {
62 { .name = "soc", },
63 { .type = "soc", },
64 { .compatible = "simple-bus", },
65 { .compatible = "gianfar", },
66 { .compatible = "fsl,srio", },
67 {},
70 static int __init declare_of_platform_devices(void)
72 of_platform_bus_probe(NULL, of_bus_ids, NULL);
74 return 0;
76 machine_device_initcall(ppa8548, declare_of_platform_devices);
79 * Called very early, device-tree isn't unflattened
81 static int __init ppa8548_probe(void)
83 unsigned long root = of_get_flat_dt_root();
85 return of_flat_dt_is_compatible(root, "ppa8548");
88 define_machine(ppa8548) {
89 .name = "ppa8548",
90 .probe = ppa8548_probe,
91 .setup_arch = ppa8548_setup_arch,
92 .init_IRQ = ppa8548_pic_init,
93 .show_cpuinfo = ppa8548_show_cpuinfo,
94 .get_irq = mpic_get_irq,
95 .restart = fsl_rstcr_restart,
96 .calibrate_decr = generic_calibrate_decr,
97 .progress = udbg_progress,