Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * arch/powerpc/platforms/83xx/mpc830x_rdb.c
0004  *
0005  * Description: MPC830x RDB board specific routines.
0006  * This file is based on mpc831x_rdb.c
0007  *
0008  * Copyright (C) Freescale Semiconductor, Inc. 2009. All rights reserved.
0009  * Copyright (C) 2010. Ilya Yanok, Emcraft Systems, yanok@emcraft.com
0010  */
0011 
0012 #include <linux/pci.h>
0013 #include <linux/of_platform.h>
0014 #include <asm/time.h>
0015 #include <asm/ipic.h>
0016 #include <asm/udbg.h>
0017 #include <sysdev/fsl_pci.h>
0018 #include <sysdev/fsl_soc.h>
0019 #include "mpc83xx.h"
0020 
0021 /*
0022  * Setup the architecture
0023  */
0024 static void __init mpc830x_rdb_setup_arch(void)
0025 {
0026     mpc83xx_setup_arch();
0027     mpc831x_usb_cfg();
0028 }
0029 
0030 static const char *board[] __initdata = {
0031     "MPC8308RDB",
0032     "fsl,mpc8308rdb",
0033     "denx,mpc8308_p1m",
0034     NULL
0035 };
0036 
0037 /*
0038  * Called very early, MMU is off, device-tree isn't unflattened
0039  */
0040 static int __init mpc830x_rdb_probe(void)
0041 {
0042     return of_device_compatible_match(of_root, board);
0043 }
0044 
0045 machine_device_initcall(mpc830x_rdb, mpc83xx_declare_of_platform_devices);
0046 
0047 define_machine(mpc830x_rdb) {
0048     .name           = "MPC830x RDB",
0049     .probe          = mpc830x_rdb_probe,
0050     .setup_arch     = mpc830x_rdb_setup_arch,
0051     .discover_phbs      = mpc83xx_setup_pci,
0052     .init_IRQ       = mpc83xx_ipic_init_IRQ,
0053     .get_irq        = ipic_get_irq,
0054     .restart        = mpc83xx_restart,
0055     .time_init      = mpc83xx_time_init,
0056     .calibrate_decr     = generic_calibrate_decr,
0057     .progress       = udbg_progress,
0058 };