Path: blob/master/arch/powerpc/platforms/83xx/sbc834x.c
10819 views
/*1* arch/powerpc/platforms/83xx/sbc834x.c2*3* Wind River SBC834x board specific routines4*5* By Paul Gortmaker (see MAINTAINERS for contact information)6*7* Based largely on the mpc834x_mds.c support by Kumar Gala.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/stddef.h>16#include <linux/kernel.h>17#include <linux/init.h>18#include <linux/errno.h>19#include <linux/reboot.h>20#include <linux/pci.h>21#include <linux/kdev_t.h>22#include <linux/major.h>23#include <linux/console.h>24#include <linux/delay.h>25#include <linux/seq_file.h>26#include <linux/root_dev.h>27#include <linux/of_platform.h>2829#include <asm/system.h>30#include <asm/atomic.h>31#include <asm/time.h>32#include <asm/io.h>33#include <asm/machdep.h>34#include <asm/ipic.h>35#include <asm/irq.h>36#include <asm/prom.h>37#include <asm/udbg.h>38#include <sysdev/fsl_soc.h>39#include <sysdev/fsl_pci.h>4041#include "mpc83xx.h"4243/* ************************************************************************44*45* Setup the architecture46*47*/48static void __init sbc834x_setup_arch(void)49{50#ifdef CONFIG_PCI51struct device_node *np;52#endif5354if (ppc_md.progress)55ppc_md.progress("sbc834x_setup_arch()", 0);5657#ifdef CONFIG_PCI58for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")59mpc83xx_add_bridge(np);60#endif6162}6364static void __init sbc834x_init_IRQ(void)65{66struct device_node *np;6768np = of_find_node_by_type(NULL, "ipic");69if (!np)70return;7172ipic_init(np, 0);7374/* Initialize the default interrupt mapping priorities,75* in case the boot rom changed something on us.76*/77ipic_set_default_priority();7879of_node_put(np);80}8182static struct __initdata of_device_id sbc834x_ids[] = {83{ .type = "soc", },84{ .compatible = "soc", },85{ .compatible = "simple-bus", },86{ .compatible = "gianfar", },87{},88};8990static int __init sbc834x_declare_of_platform_devices(void)91{92of_platform_bus_probe(NULL, sbc834x_ids, NULL);93return 0;94}95machine_device_initcall(sbc834x, sbc834x_declare_of_platform_devices);9697/*98* Called very early, MMU is off, device-tree isn't unflattened99*/100static int __init sbc834x_probe(void)101{102unsigned long root = of_get_flat_dt_root();103104return of_flat_dt_is_compatible(root, "SBC834x");105}106107define_machine(sbc834x) {108.name = "SBC834x",109.probe = sbc834x_probe,110.setup_arch = sbc834x_setup_arch,111.init_IRQ = sbc834x_init_IRQ,112.get_irq = ipic_get_irq,113.restart = mpc83xx_restart,114.time_init = mpc83xx_time_init,115.calibrate_decr = generic_calibrate_decr,116.progress = udbg_progress,117};118119120