1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * ppa8548 setup and early boot code.
5 * Copyright 2009 Prodrive B.V..
7 * By Stef van Os (see MAINTAINERS for contact information)
9 * Based on the SBC8548 support - Copyright 2007 Wind River Systems Inc.
10 * Based on the MPC8548CDS support - Copyright 2005 Freescale Inc.
13 #include <linux/stddef.h>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/reboot.h>
17 #include <linux/seq_file.h>
18 #include <linux/of_fdt.h>
19 #include <linux/of_platform.h>
21 #include <asm/machdep.h>
25 #include <sysdev/fsl_soc.h>
27 static void __init ppa8548_pic_init(void)
29 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
36 * Setup the architecture
38 static void __init ppa8548_setup_arch(void)
41 ppc_md.progress("ppa8548_setup_arch()", 0);
44 static void ppa8548_show_cpuinfo(struct seq_file *m)
48 svid = mfspr(SPRN_SVR);
50 seq_printf(m, "Vendor\t\t: Prodrive B.V.\n");
51 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
53 /* Display cpu Pll setting */
54 phid1 = mfspr(SPRN_HID1);
55 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
58 static const struct of_device_id of_bus_ids[] __initconst = {
61 { .compatible = "simple-bus", },
62 { .compatible = "gianfar", },
63 { .compatible = "fsl,srio", },
67 static int __init declare_of_platform_devices(void)
69 of_platform_bus_probe(NULL, of_bus_ids, NULL);
73 machine_device_initcall(ppa8548, declare_of_platform_devices);
75 define_machine(ppa8548) {
77 .compatible = "ppa8548",
78 .setup_arch = ppa8548_setup_arch,
79 .init_IRQ = ppa8548_pic_init,
80 .show_cpuinfo = ppa8548_show_cpuinfo,
81 .get_irq = mpic_get_irq,
82 .progress = udbg_progress,