Path: blob/master/arch/powerpc/platforms/83xx/mpc830x_rdb.c
10819 views
/*1* arch/powerpc/platforms/83xx/mpc830x_rdb.c2*3* Description: MPC830x RDB board specific routines.4* This file is based on mpc831x_rdb.c5*6* Copyright (C) Freescale Semiconductor, Inc. 2009. All rights reserved.7* Copyright (C) 2010. Ilya Yanok, Emcraft Systems, [email protected]8*9* This program is free software; you can redistribute it and/or modify it10* under the terms of the GNU General Public License as published by the11* Free Software Foundation; either version 2 of the License, or (at your12* option) any later version.13*/1415#include <linux/pci.h>16#include <linux/of_platform.h>17#include <asm/time.h>18#include <asm/ipic.h>19#include <asm/udbg.h>20#include <sysdev/fsl_pci.h>21#include <sysdev/fsl_soc.h>22#include "mpc83xx.h"2324/*25* Setup the architecture26*/27static void __init mpc830x_rdb_setup_arch(void)28{29#ifdef CONFIG_PCI30struct device_node *np;31#endif3233if (ppc_md.progress)34ppc_md.progress("mpc830x_rdb_setup_arch()", 0);3536#ifdef CONFIG_PCI37for_each_compatible_node(np, "pci", "fsl,mpc8308-pcie")38mpc83xx_add_bridge(np);39#endif40mpc831x_usb_cfg();41}4243static void __init mpc830x_rdb_init_IRQ(void)44{45struct device_node *np;4647np = of_find_node_by_type(NULL, "ipic");48if (!np)49return;5051ipic_init(np, 0);5253/* Initialize the default interrupt mapping priorities,54* in case the boot rom changed something on us.55*/56ipic_set_default_priority();57}5859static const char *board[] __initdata = {60"MPC8308RDB",61"fsl,mpc8308rdb",62"denx,mpc8308_p1m",63NULL64};6566/*67* Called very early, MMU is off, device-tree isn't unflattened68*/69static int __init mpc830x_rdb_probe(void)70{71return of_flat_dt_match(of_get_flat_dt_root(), board);72}7374static struct of_device_id __initdata of_bus_ids[] = {75{ .compatible = "simple-bus" },76{ .compatible = "gianfar" },77{},78};7980static int __init declare_of_platform_devices(void)81{82of_platform_bus_probe(NULL, of_bus_ids, NULL);83return 0;84}85machine_device_initcall(mpc830x_rdb, declare_of_platform_devices);8687define_machine(mpc830x_rdb) {88.name = "MPC830x RDB",89.probe = mpc830x_rdb_probe,90.setup_arch = mpc830x_rdb_setup_arch,91.init_IRQ = mpc830x_rdb_init_IRQ,92.get_irq = ipic_get_irq,93.restart = mpc83xx_restart,94.time_init = mpc83xx_time_init,95.calibrate_decr = generic_calibrate_decr,96.progress = udbg_progress,97};9899100