3 * Should apply for QDS platform of B4860 and it's personalities.
4 * viz B4860/B4420/B4220QDS
6 * Copyright 2012 Freescale Semiconductor Inc.
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
14 #include <linux/kernel.h>
15 #include <linux/pci.h>
16 #include <linux/kdev_t.h>
17 #include <linux/delay.h>
18 #include <linux/interrupt.h>
19 #include <linux/phy.h>
22 #include <asm/machdep.h>
23 #include <asm/pci-bridge.h>
24 #include <mm/mmu_decl.h>
29 #include <linux/of_platform.h>
30 #include <sysdev/fsl_soc.h>
31 #include <sysdev/fsl_pci.h>
32 #include <asm/ehv_pic.h>
34 #include "corenet_ds.h"
37 * Called very early, device-tree isn't unflattened
39 static int __init
b4_qds_probe(void)
41 unsigned long root
= of_get_flat_dt_root();
43 extern struct smp_ops_t smp_85xx_ops
;
46 if ((of_flat_dt_is_compatible(root
, "fsl,B4860QDS")) ||
47 (of_flat_dt_is_compatible(root
, "fsl,B4420QDS")) ||
48 (of_flat_dt_is_compatible(root
, "fsl,B4220QDS")))
51 /* Check if we're running under the Freescale hypervisor */
52 if ((of_flat_dt_is_compatible(root
, "fsl,B4860QDS-hv")) ||
53 (of_flat_dt_is_compatible(root
, "fsl,B4420QDS-hv")) ||
54 (of_flat_dt_is_compatible(root
, "fsl,B4220QDS-hv"))) {
55 ppc_md
.init_IRQ
= ehv_pic_init
;
56 ppc_md
.get_irq
= ehv_pic_get_irq
;
57 ppc_md
.restart
= fsl_hv_restart
;
58 ppc_md
.power_off
= fsl_hv_halt
;
59 ppc_md
.halt
= fsl_hv_halt
;
62 * Disable the timebase sync operations because we can't write
63 * to the timebase registers under the hypervisor.
65 smp_85xx_ops
.give_timebase
= NULL
;
66 smp_85xx_ops
.take_timebase
= NULL
;
74 define_machine(b4_qds
) {
76 .probe
= b4_qds_probe
,
77 .setup_arch
= corenet_ds_setup_arch
,
78 .init_IRQ
= corenet_ds_pic_init
,
80 .pcibios_fixup_bus
= fsl_pcibios_fixup_bus
,
82 /* coreint doesn't play nice with lazy EE, use legacy mpic for now */
84 .get_irq
= mpic_get_irq
,
86 .get_irq
= mpic_get_coreint_irq
,
88 .restart
= fsl_rstcr_restart
,
89 .calibrate_decr
= generic_calibrate_decr
,
90 .progress
= udbg_progress
,
92 .power_save
= book3e_idle
,
94 .power_save
= e500_idle
,
98 machine_arch_initcall(b4_qds
, corenet_ds_publish_devices
);
100 #ifdef CONFIG_SWIOTLB
101 machine_arch_initcall(b4_qds
, swiotlb_setup_bus_notifier
);