Path: blob/master/arch/powerpc/platforms/85xx/socrates.c
26481 views
// SPDX-License-Identifier: GPL-2.0-or-later1/*2* Copyright (c) 2008 Emcraft Systems3* Sergei Poselenov <[email protected]>4*5* Based on MPC8560 ADS and arch/ppc tqm85xx ports6*7* Maintained by Kumar Gala (see MAINTAINERS for contact information)8*9* Copyright 2008 Freescale Semiconductor Inc.10*11* Copyright (c) 2005-2006 DENX Software Engineering12* Stefan Roese <[email protected]>13*14* Based on original work by15* Kumar Gala <[email protected]>16* Copyright 2004 Freescale Semiconductor Inc.17*/1819#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.h>2627#include <asm/time.h>28#include <asm/machdep.h>29#include <asm/pci-bridge.h>30#include <asm/mpic.h>31#include <mm/mmu_decl.h>32#include <asm/udbg.h>3334#include <sysdev/fsl_soc.h>35#include <sysdev/fsl_pci.h>3637#include "mpc85xx.h"38#include "socrates_fpga_pic.h"3940static void __init socrates_pic_init(void)41{42struct device_node *np;4344struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,450, 256, " OpenPIC ");46BUG_ON(mpic == NULL);47mpic_init(mpic);4849np = of_find_compatible_node(NULL, NULL, "abb,socrates-fpga-pic");50if (!np) {51printk(KERN_ERR "Could not find socrates-fpga-pic node\n");52return;53}54socrates_fpga_pic_init(np);55of_node_put(np);56}5758/*59* Setup the architecture60*/61static void __init socrates_setup_arch(void)62{63if (ppc_md.progress)64ppc_md.progress("socrates_setup_arch()", 0);6566fsl_pci_assign_primary();67}6869machine_arch_initcall(socrates, mpc85xx_common_publish_devices);7071define_machine(socrates) {72.name = "Socrates",73.compatible = "abb,socrates",74.setup_arch = socrates_setup_arch,75.init_IRQ = socrates_pic_init,76.get_irq = mpic_get_irq,77.progress = udbg_progress,78};798081