Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * BSC913xRDB Board Setup
0004  *
0005  * Author: Priyanka Jain <Priyanka.Jain@freescale.com>
0006  *
0007  * Copyright 2011-2012 Freescale Semiconductor Inc.
0008  */
0009 
0010 #include <linux/of_platform.h>
0011 #include <linux/pci.h>
0012 #include <asm/mpic.h>
0013 #include <sysdev/fsl_soc.h>
0014 #include <asm/udbg.h>
0015 
0016 #include "mpc85xx.h"
0017 
0018 void __init bsc913x_rdb_pic_init(void)
0019 {
0020     struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN |
0021       MPIC_SINGLE_DEST_CPU,
0022       0, 256, " OpenPIC  ");
0023 
0024     if (!mpic)
0025         pr_err("bsc913x: Failed to allocate MPIC structure\n");
0026     else
0027         mpic_init(mpic);
0028 }
0029 
0030 /*
0031  * Setup the architecture
0032  */
0033 static void __init bsc913x_rdb_setup_arch(void)
0034 {
0035     if (ppc_md.progress)
0036         ppc_md.progress("bsc913x_rdb_setup_arch()", 0);
0037 
0038     pr_info("bsc913x board from Freescale Semiconductor\n");
0039 }
0040 
0041 machine_device_initcall(bsc9131_rdb, mpc85xx_common_publish_devices);
0042 
0043 /*
0044  * Called very early, device-tree isn't unflattened
0045  */
0046 
0047 static int __init bsc9131_rdb_probe(void)
0048 {
0049     return of_machine_is_compatible("fsl,bsc9131rdb");
0050 }
0051 
0052 define_machine(bsc9131_rdb) {
0053     .name           = "BSC9131 RDB",
0054     .probe          = bsc9131_rdb_probe,
0055     .setup_arch     = bsc913x_rdb_setup_arch,
0056     .init_IRQ       = bsc913x_rdb_pic_init,
0057     .get_irq        = mpic_get_irq,
0058     .calibrate_decr     = generic_calibrate_decr,
0059     .progress       = udbg_progress,
0060 };