Path: blob/master/arch/powerpc/platforms/40x/walnut.c
10820 views
/*1* Architecture- / platform-specific boot-time initialization code for2* IBM PowerPC 4xx based boards. Adapted from original3* code by Gary Thomas, Cort Dougan <[email protected]>, and Dan Malek4* <[email protected]>.5*6* Copyright(c) 1999-2000 Grant Erickson <[email protected]>7*8* Rewritten and ported to the merged powerpc tree:9* Copyright 2007 IBM Corporation10* Josh Boyer <[email protected]>11*12* 2002 (c) MontaVista, Software, Inc. This file is licensed under13* the terms of the GNU General Public License version 2. This program14* is licensed "as is" without any warranty of any kind, whether express15* or implied.16*/1718#include <linux/init.h>19#include <linux/of_platform.h>20#include <linux/rtc.h>2122#include <asm/machdep.h>23#include <asm/prom.h>24#include <asm/udbg.h>25#include <asm/time.h>26#include <asm/uic.h>27#include <asm/pci-bridge.h>28#include <asm/ppc4xx.h>2930static __initdata struct of_device_id walnut_of_bus[] = {31{ .compatible = "ibm,plb3", },32{ .compatible = "ibm,opb", },33{ .compatible = "ibm,ebc", },34{},35};3637static int __init walnut_device_probe(void)38{39of_platform_bus_probe(NULL, walnut_of_bus, NULL);40of_instantiate_rtc();4142return 0;43}44machine_device_initcall(walnut, walnut_device_probe);4546static int __init walnut_probe(void)47{48unsigned long root = of_get_flat_dt_root();4950if (!of_flat_dt_is_compatible(root, "ibm,walnut"))51return 0;5253ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;5455return 1;56}5758define_machine(walnut) {59.name = "Walnut",60.probe = walnut_probe,61.progress = udbg_progress,62.init_IRQ = uic_init_tree,63.get_irq = uic_get_irq,64.restart = ppc4xx_reset_system,65.calibrate_decr = generic_calibrate_decr,66};676869