4 * Copyright 2011 Freescale Semiconductor Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
12 #include <linux/kernel.h>
13 #include <linux/interrupt.h>
14 #include <linux/phy.h>
15 #include <asm/machdep.h>
18 #include <linux/of_platform.h>
19 #include <sysdev/fsl_soc.h>
20 #include <sysdev/fsl_pci.h>
21 #include <asm/ehv_pic.h>
22 #include "corenet_ds.h"
25 * Called very early, device-tree isn't unflattened
27 static int __init
p3060_qds_probe(void)
29 unsigned long root
= of_get_flat_dt_root();
31 extern struct smp_ops_t smp_85xx_ops
;
34 if (of_flat_dt_is_compatible(root
, "fsl,P3060QDS"))
37 /* Check if we're running under the Freescale hypervisor */
38 if (of_flat_dt_is_compatible(root
, "fsl,P3060QDS-hv")) {
39 ppc_md
.init_IRQ
= ehv_pic_init
;
40 ppc_md
.get_irq
= ehv_pic_get_irq
;
41 ppc_md
.restart
= fsl_hv_restart
;
42 ppc_md
.power_off
= fsl_hv_halt
;
43 ppc_md
.halt
= fsl_hv_halt
;
46 * Disable the timebase sync operations because we can't write
47 * to the timebase registers under the hypervisor.
49 smp_85xx_ops
.give_timebase
= NULL
;
50 smp_85xx_ops
.take_timebase
= NULL
;
58 define_machine(p3060_qds
) {
60 .probe
= p3060_qds_probe
,
61 .setup_arch
= corenet_ds_setup_arch
,
62 .init_IRQ
= corenet_ds_pic_init
,
64 .pcibios_fixup_bus
= fsl_pcibios_fixup_bus
,
66 .get_irq
= mpic_get_coreint_irq
,
67 .restart
= fsl_rstcr_restart
,
68 .calibrate_decr
= generic_calibrate_decr
,
69 .progress
= udbg_progress
,
70 .power_save
= e500_idle
,
73 machine_device_initcall(p3060_qds
, corenet_ds_publish_devices
);
76 machine_arch_initcall(p3060_qds
, swiotlb_setup_bus_notifier
);