1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Based on MPC8560 ADS and arch/ppc stx_gp3 ports
5 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
7 * Copyright 2008 Freescale Semiconductor Inc.
9 * Dan Malek <dan@embeddededge.com>
10 * Copyright 2004 Embedded Edge, LLC
12 * Copied from mpc8560_ads.c
13 * Copyright 2002, 2003 Motorola Inc.
15 * Ported to 2.6, Matt Porter <mporter@kernel.crashing.org>
16 * Copyright 2004-2005 MontaVista Software, Inc.
19 #include <linux/stddef.h>
20 #include <linux/kernel.h>
21 #include <linux/pci.h>
22 #include <linux/kdev_t.h>
23 #include <linux/delay.h>
24 #include <linux/seq_file.h>
25 #include <linux/of_platform.h>
28 #include <asm/machdep.h>
29 #include <asm/pci-bridge.h>
32 #include <mm/mmu_decl.h>
35 #include <sysdev/fsl_soc.h>
36 #include <sysdev/fsl_pci.h>
42 #endif /* CONFIG_CPM2 */
44 static void __init
stx_gp3_pic_init(void)
46 struct mpic
*mpic
= mpic_alloc(NULL
, 0, MPIC_BIG_ENDIAN
,
51 mpc85xx_cpm2_pic_init();
55 * Setup the architecture
57 static void __init
stx_gp3_setup_arch(void)
60 ppc_md
.progress("stx_gp3_setup_arch()", 0);
62 fsl_pci_assign_primary();
69 static void stx_gp3_show_cpuinfo(struct seq_file
*m
)
71 uint pvid
, svid
, phid1
;
73 pvid
= mfspr(SPRN_PVR
);
74 svid
= mfspr(SPRN_SVR
);
76 seq_printf(m
, "Vendor\t\t: RPC Electronics STx\n");
77 seq_printf(m
, "PVR\t\t: 0x%x\n", pvid
);
78 seq_printf(m
, "SVR\t\t: 0x%x\n", svid
);
80 /* Display cpu Pll setting */
81 phid1
= mfspr(SPRN_HID1
);
82 seq_printf(m
, "PLL setting\t: 0x%x\n", ((phid1
>> 24) & 0x3f));
85 machine_arch_initcall(stx_gp3
, mpc85xx_common_publish_devices
);
88 * Called very early, device-tree isn't unflattened
90 static int __init
stx_gp3_probe(void)
92 return of_machine_is_compatible("stx,gp3-8560");
95 define_machine(stx_gp3
) {
97 .probe
= stx_gp3_probe
,
98 .setup_arch
= stx_gp3_setup_arch
,
99 .init_IRQ
= stx_gp3_pic_init
,
100 .show_cpuinfo
= stx_gp3_show_cpuinfo
,
101 .get_irq
= mpic_get_irq
,
102 .calibrate_decr
= generic_calibrate_decr
,
103 .progress
= udbg_progress
,