Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright (C) 2007,2008 Freescale Semiconductor, Inc. All rights reserved.
0004  *
0005  * Author: John Rigby, <jrigby@freescale.com>
0006  *
0007  * Description:
0008  * MPC512x SoC setup
0009  */
0010 
0011 #include <linux/kernel.h>
0012 #include <linux/of_platform.h>
0013 
0014 #include <asm/machdep.h>
0015 #include <asm/ipic.h>
0016 #include <asm/time.h>
0017 
0018 #include "mpc512x.h"
0019 
0020 /*
0021  * list of supported boards
0022  */
0023 static const char * const board[] __initconst = {
0024     "prt,prtlvt",
0025     "fsl,mpc5125ads",
0026     "ifm,ac14xx",
0027     NULL
0028 };
0029 
0030 /*
0031  * Called very early, MMU is off, device-tree isn't unflattened
0032  */
0033 static int __init mpc512x_generic_probe(void)
0034 {
0035     if (!of_device_compatible_match(of_root, board))
0036         return 0;
0037 
0038     mpc512x_init_early();
0039 
0040     return 1;
0041 }
0042 
0043 define_machine(mpc512x_generic) {
0044     .name           = "MPC512x generic",
0045     .probe          = mpc512x_generic_probe,
0046     .init           = mpc512x_init,
0047     .setup_arch     = mpc512x_setup_arch,
0048     .init_IRQ       = mpc512x_init_IRQ,
0049     .get_irq        = ipic_get_irq,
0050     .calibrate_decr     = generic_calibrate_decr,
0051     .restart        = mpc512x_restart,
0052 };