0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <linux/stddef.h>
0014 #include <linux/kernel.h>
0015 #include <linux/init.h>
0016 #include <linux/reboot.h>
0017 #include <linux/seq_file.h>
0018 #include <linux/of_fdt.h>
0019 #include <linux/of_platform.h>
0020
0021 #include <asm/machdep.h>
0022 #include <asm/udbg.h>
0023 #include <asm/mpic.h>
0024
0025 #include <sysdev/fsl_soc.h>
0026
0027 static void __init ppa8548_pic_init(void)
0028 {
0029 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
0030 0, 256, " OpenPIC ");
0031 BUG_ON(mpic == NULL);
0032 mpic_init(mpic);
0033 }
0034
0035
0036
0037
0038 static void __init ppa8548_setup_arch(void)
0039 {
0040 if (ppc_md.progress)
0041 ppc_md.progress("ppa8548_setup_arch()", 0);
0042 }
0043
0044 static void ppa8548_show_cpuinfo(struct seq_file *m)
0045 {
0046 uint32_t svid, phid1;
0047
0048 svid = mfspr(SPRN_SVR);
0049
0050 seq_printf(m, "Vendor\t\t: Prodrive B.V.\n");
0051 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
0052
0053
0054 phid1 = mfspr(SPRN_HID1);
0055 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
0056 }
0057
0058 static const struct of_device_id of_bus_ids[] __initconst = {
0059 { .name = "soc", },
0060 { .type = "soc", },
0061 { .compatible = "simple-bus", },
0062 { .compatible = "gianfar", },
0063 { .compatible = "fsl,srio", },
0064 {},
0065 };
0066
0067 static int __init declare_of_platform_devices(void)
0068 {
0069 of_platform_bus_probe(NULL, of_bus_ids, NULL);
0070
0071 return 0;
0072 }
0073 machine_device_initcall(ppa8548, declare_of_platform_devices);
0074
0075
0076
0077
0078 static int __init ppa8548_probe(void)
0079 {
0080 return of_machine_is_compatible("ppa8548");
0081 }
0082
0083 define_machine(ppa8548) {
0084 .name = "ppa8548",
0085 .probe = ppa8548_probe,
0086 .setup_arch = ppa8548_setup_arch,
0087 .init_IRQ = ppa8548_pic_init,
0088 .show_cpuinfo = ppa8548_show_cpuinfo,
0089 .get_irq = mpic_get_irq,
0090 .calibrate_decr = generic_calibrate_decr,
0091 .progress = udbg_progress,
0092 };