Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Ebony board specific routines
0004  *
0005  * Matt Porter <mporter@kernel.crashing.org>
0006  * Copyright 2002-2005 MontaVista Software Inc.
0007  *
0008  * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
0009  * Copyright (c) 2003-2005 Zultys Technologies
0010  *
0011  * Rewritten and ported to the merged powerpc tree:
0012  * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
0013  */
0014 
0015 #include <linux/init.h>
0016 #include <linux/of_platform.h>
0017 #include <linux/rtc.h>
0018 
0019 #include <asm/machdep.h>
0020 #include <asm/prom.h>
0021 #include <asm/udbg.h>
0022 #include <asm/time.h>
0023 #include <asm/uic.h>
0024 #include <asm/pci-bridge.h>
0025 #include <asm/ppc4xx.h>
0026 
0027 static const struct of_device_id ebony_of_bus[] __initconst = {
0028     { .compatible = "ibm,plb4", },
0029     { .compatible = "ibm,opb", },
0030     { .compatible = "ibm,ebc", },
0031     {},
0032 };
0033 
0034 static int __init ebony_device_probe(void)
0035 {
0036     of_platform_bus_probe(NULL, ebony_of_bus, NULL);
0037     of_instantiate_rtc();
0038 
0039     return 0;
0040 }
0041 machine_device_initcall(ebony, ebony_device_probe);
0042 
0043 /*
0044  * Called very early, MMU is off, device-tree isn't unflattened
0045  */
0046 static int __init ebony_probe(void)
0047 {
0048     if (!of_machine_is_compatible("ibm,ebony"))
0049         return 0;
0050 
0051     pci_set_flags(PCI_REASSIGN_ALL_RSRC);
0052 
0053     return 1;
0054 }
0055 
0056 define_machine(ebony) {
0057     .name           = "Ebony",
0058     .probe          = ebony_probe,
0059     .progress       = udbg_progress,
0060     .init_IRQ       = uic_init_tree,
0061     .get_irq        = uic_get_irq,
0062     .restart        = ppc4xx_reset_system,
0063     .calibrate_decr     = generic_calibrate_decr,
0064 };