Path: blob/master/arch/powerpc/platforms/85xx/stx_gp3.c
26481 views
// SPDX-License-Identifier: GPL-2.0-or-later1/*2* Based on MPC8560 ADS and arch/ppc stx_gp3 ports3*4* Maintained by Kumar Gala (see MAINTAINERS for contact information)5*6* Copyright 2008 Freescale Semiconductor Inc.7*8* Dan Malek <[email protected]>9* Copyright 2004 Embedded Edge, LLC10*11* Copied from mpc8560_ads.c12* Copyright 2002, 2003 Motorola Inc.13*14* Ported to 2.6, Matt Porter <[email protected]>15* Copyright 2004-2005 MontaVista Software, Inc.16*/1718#include <linux/stddef.h>19#include <linux/kernel.h>20#include <linux/pci.h>21#include <linux/kdev_t.h>22#include <linux/delay.h>23#include <linux/seq_file.h>24#include <linux/of.h>2526#include <asm/time.h>27#include <asm/machdep.h>28#include <asm/pci-bridge.h>29#include <asm/mpic.h>30#include <mm/mmu_decl.h>31#include <asm/udbg.h>3233#include <sysdev/fsl_soc.h>34#include <sysdev/fsl_pci.h>3536#include "mpc85xx.h"3738#ifdef CONFIG_CPM239#include <asm/cpm2.h>40#endif /* CONFIG_CPM2 */4142static void __init stx_gp3_pic_init(void)43{44struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,450, 256, " OpenPIC ");46BUG_ON(mpic == NULL);47mpic_init(mpic);4849mpc85xx_cpm2_pic_init();50}5152/*53* Setup the architecture54*/55static void __init stx_gp3_setup_arch(void)56{57if (ppc_md.progress)58ppc_md.progress("stx_gp3_setup_arch()", 0);5960fsl_pci_assign_primary();6162#ifdef CONFIG_CPM263cpm2_reset();64#endif65}6667static void stx_gp3_show_cpuinfo(struct seq_file *m)68{69uint pvid, svid, phid1;7071pvid = mfspr(SPRN_PVR);72svid = mfspr(SPRN_SVR);7374seq_printf(m, "Vendor\t\t: RPC Electronics STx\n");75seq_printf(m, "PVR\t\t: 0x%x\n", pvid);76seq_printf(m, "SVR\t\t: 0x%x\n", svid);7778/* Display cpu Pll setting */79phid1 = mfspr(SPRN_HID1);80seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));81}8283machine_arch_initcall(stx_gp3, mpc85xx_common_publish_devices);8485define_machine(stx_gp3) {86.name = "STX GP3",87.compatible = "stx,gp3-8560",88.setup_arch = stx_gp3_setup_arch,89.init_IRQ = stx_gp3_pic_init,90.show_cpuinfo = stx_gp3_show_cpuinfo,91.get_irq = mpic_get_irq,92.progress = udbg_progress,93};949596