Path: blob/master/arch/powerpc/platforms/83xx/mpc831x_rdb.c
10819 views
/*1* arch/powerpc/platforms/83xx/mpc831x_rdb.c2*3* Description: MPC831x RDB board specific routines.4* This file is based on mpc834x_sys.c5* Author: Lo Wlison <[email protected]>6*7* Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.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>1718#include <asm/time.h>19#include <asm/ipic.h>20#include <asm/udbg.h>21#include <sysdev/fsl_pci.h>2223#include "mpc83xx.h"2425/*26* Setup the architecture27*/28static void __init mpc831x_rdb_setup_arch(void)29{30#ifdef CONFIG_PCI31struct device_node *np;32#endif3334if (ppc_md.progress)35ppc_md.progress("mpc831x_rdb_setup_arch()", 0);3637#ifdef CONFIG_PCI38for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")39mpc83xx_add_bridge(np);40for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie")41mpc83xx_add_bridge(np);42#endif43mpc831x_usb_cfg();44}4546static void __init mpc831x_rdb_init_IRQ(void)47{48struct device_node *np;4950np = of_find_node_by_type(NULL, "ipic");51if (!np)52return;5354ipic_init(np, 0);5556/* Initialize the default interrupt mapping priorities,57* in case the boot rom changed something on us.58*/59ipic_set_default_priority();60}6162static const char *board[] __initdata = {63"MPC8313ERDB",64"fsl,mpc8315erdb",65NULL66};6768/*69* Called very early, MMU is off, device-tree isn't unflattened70*/71static int __init mpc831x_rdb_probe(void)72{73return of_flat_dt_match(of_get_flat_dt_root(), board);74}7576static struct of_device_id __initdata of_bus_ids[] = {77{ .compatible = "simple-bus" },78{ .compatible = "gianfar" },79{ .compatible = "gpio-leds", },80{},81};8283static int __init declare_of_platform_devices(void)84{85of_platform_bus_probe(NULL, of_bus_ids, NULL);86return 0;87}88machine_device_initcall(mpc831x_rdb, declare_of_platform_devices);8990define_machine(mpc831x_rdb) {91.name = "MPC831x RDB",92.probe = mpc831x_rdb_probe,93.setup_arch = mpc831x_rdb_setup_arch,94.init_IRQ = mpc831x_rdb_init_IRQ,95.get_irq = ipic_get_irq,96.restart = mpc83xx_restart,97.time_init = mpc83xx_time_init,98.calibrate_decr = generic_calibrate_decr,99.progress = udbg_progress,100};101102103