18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * arch/powerpc/platforms/83xx/mpc830x_rdb.c 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Description: MPC830x RDB board specific routines. 68c2ecf20Sopenharmony_ci * This file is based on mpc831x_rdb.c 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Copyright (C) Freescale Semiconductor, Inc. 2009. All rights reserved. 98c2ecf20Sopenharmony_ci * Copyright (C) 2010. Ilya Yanok, Emcraft Systems, yanok@emcraft.com 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/pci.h> 138c2ecf20Sopenharmony_ci#include <linux/of_platform.h> 148c2ecf20Sopenharmony_ci#include <asm/time.h> 158c2ecf20Sopenharmony_ci#include <asm/ipic.h> 168c2ecf20Sopenharmony_ci#include <asm/udbg.h> 178c2ecf20Sopenharmony_ci#include <sysdev/fsl_pci.h> 188c2ecf20Sopenharmony_ci#include <sysdev/fsl_soc.h> 198c2ecf20Sopenharmony_ci#include "mpc83xx.h" 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci/* 228c2ecf20Sopenharmony_ci * Setup the architecture 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_cistatic void __init mpc830x_rdb_setup_arch(void) 258c2ecf20Sopenharmony_ci{ 268c2ecf20Sopenharmony_ci mpc83xx_setup_arch(); 278c2ecf20Sopenharmony_ci mpc831x_usb_cfg(); 288c2ecf20Sopenharmony_ci} 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_cistatic const char *board[] __initdata = { 318c2ecf20Sopenharmony_ci "MPC8308RDB", 328c2ecf20Sopenharmony_ci "fsl,mpc8308rdb", 338c2ecf20Sopenharmony_ci "denx,mpc8308_p1m", 348c2ecf20Sopenharmony_ci NULL 358c2ecf20Sopenharmony_ci}; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci/* 388c2ecf20Sopenharmony_ci * Called very early, MMU is off, device-tree isn't unflattened 398c2ecf20Sopenharmony_ci */ 408c2ecf20Sopenharmony_cistatic int __init mpc830x_rdb_probe(void) 418c2ecf20Sopenharmony_ci{ 428c2ecf20Sopenharmony_ci return of_device_compatible_match(of_root, board); 438c2ecf20Sopenharmony_ci} 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_cimachine_device_initcall(mpc830x_rdb, mpc83xx_declare_of_platform_devices); 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_cidefine_machine(mpc830x_rdb) { 488c2ecf20Sopenharmony_ci .name = "MPC830x RDB", 498c2ecf20Sopenharmony_ci .probe = mpc830x_rdb_probe, 508c2ecf20Sopenharmony_ci .setup_arch = mpc830x_rdb_setup_arch, 518c2ecf20Sopenharmony_ci .init_IRQ = mpc83xx_ipic_init_IRQ, 528c2ecf20Sopenharmony_ci .get_irq = ipic_get_irq, 538c2ecf20Sopenharmony_ci .restart = mpc83xx_restart, 548c2ecf20Sopenharmony_ci .time_init = mpc83xx_time_init, 558c2ecf20Sopenharmony_ci .calibrate_decr = generic_calibrate_decr, 568c2ecf20Sopenharmony_ci .progress = udbg_progress, 578c2ecf20Sopenharmony_ci}; 58