Path: blob/master/arch/powerpc/platforms/83xx/mpc836x_rdk.c
10819 views
/*1* MPC8360E-RDK board file.2*3* Copyright (c) 2006 Freescale Semicondutor, Inc.4* Copyright (c) 2007-2008 MontaVista Software, Inc.5*6* Author: Anton Vorontsov <[email protected]>7*8* This program is free software; you can redistribute it and/or modify it9* under the terms of the GNU General Public License as published by the10* Free Software Foundation; either version 2 of the License, or (at your11* option) any later version.12*/1314#include <linux/kernel.h>15#include <linux/pci.h>16#include <linux/of_platform.h>17#include <linux/io.h>18#include <asm/prom.h>19#include <asm/time.h>20#include <asm/ipic.h>21#include <asm/udbg.h>22#include <asm/qe.h>23#include <asm/qe_ic.h>24#include <sysdev/fsl_soc.h>25#include <sysdev/fsl_pci.h>2627#include "mpc83xx.h"2829static struct of_device_id __initdata mpc836x_rdk_ids[] = {30{ .compatible = "simple-bus", },31{},32};3334static int __init mpc836x_rdk_declare_of_platform_devices(void)35{36return of_platform_bus_probe(NULL, mpc836x_rdk_ids, NULL);37}38machine_device_initcall(mpc836x_rdk, mpc836x_rdk_declare_of_platform_devices);3940static void __init mpc836x_rdk_setup_arch(void)41{42#ifdef CONFIG_PCI43struct device_node *np;44#endif4546if (ppc_md.progress)47ppc_md.progress("mpc836x_rdk_setup_arch()", 0);4849#ifdef CONFIG_PCI50for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")51mpc83xx_add_bridge(np);52#endif53#ifdef CONFIG_QUICC_ENGINE54qe_reset();55#endif56}5758static void __init mpc836x_rdk_init_IRQ(void)59{60struct device_node *np;6162np = of_find_compatible_node(NULL, NULL, "fsl,ipic");63if (!np)64return;6566ipic_init(np, 0);6768/*69* Initialize the default interrupt mapping priorities,70* in case the boot rom changed something on us.71*/72ipic_set_default_priority();73of_node_put(np);74#ifdef CONFIG_QUICC_ENGINE75np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");76if (!np)77return;7879qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic);80of_node_put(np);81#endif82}8384/*85* Called very early, MMU is off, device-tree isn't unflattened.86*/87static int __init mpc836x_rdk_probe(void)88{89unsigned long root = of_get_flat_dt_root();9091return of_flat_dt_is_compatible(root, "fsl,mpc8360rdk");92}9394define_machine(mpc836x_rdk) {95.name = "MPC836x RDK",96.probe = mpc836x_rdk_probe,97.setup_arch = mpc836x_rdk_setup_arch,98.init_IRQ = mpc836x_rdk_init_IRQ,99.get_irq = ipic_get_irq,100.restart = mpc83xx_restart,101.time_init = mpc83xx_time_init,102.calibrate_decr = generic_calibrate_decr,103.progress = udbg_progress,104};105106107