Path: blob/master/arch/powerpc/platforms/40x/ppc40x_simple.c
10820 views
/*1* Generic PowerPC 40x platform support2*3* Copyright 2008 IBM Corporation4*5* This program is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License as published by the7* Free Software Foundation; version 2 of the License.8*9* This implements simple platform support for PowerPC 44x chips. This is10* mostly used for eval boards or other simple and "generic" 44x boards. If11* your board has custom functions or hardware, then you will likely want to12* implement your own board.c file to accommodate it.13*/1415#include <asm/machdep.h>16#include <asm/pci-bridge.h>17#include <asm/ppc4xx.h>18#include <asm/prom.h>19#include <asm/time.h>20#include <asm/udbg.h>21#include <asm/uic.h>2223#include <linux/init.h>24#include <linux/of_platform.h>2526static __initdata struct of_device_id ppc40x_of_bus[] = {27{ .compatible = "ibm,plb3", },28{ .compatible = "ibm,plb4", },29{ .compatible = "ibm,opb", },30{ .compatible = "ibm,ebc", },31{ .compatible = "simple-bus", },32{},33};3435static int __init ppc40x_device_probe(void)36{37of_platform_bus_probe(NULL, ppc40x_of_bus, NULL);3839return 0;40}41machine_device_initcall(ppc40x_simple, ppc40x_device_probe);4243/* This is the list of boards that can be supported by this simple44* platform code. This does _not_ mean the boards are compatible,45* as they most certainly are not from a device tree perspective.46* However, their differences are handled by the device tree and the47* drivers and therefore they don't need custom board support files.48*49* Again, if your board needs to do things differently then create a50* board.c file for it rather than adding it to this list.51*/52static const char *board[] __initdata = {53"amcc,acadia",54"amcc,haleakala",55"amcc,kilauea",56"amcc,makalu",57"est,hotfoot"58};5960static int __init ppc40x_probe(void)61{62if (of_flat_dt_match(of_get_flat_dt_root(), board)) {63ppc_pci_set_flags(PPC_PCI_REASSIGN_ALL_RSRC);64return 1;65}6667return 0;68}6970define_machine(ppc40x_simple) {71.name = "PowerPC 40x Platform",72.probe = ppc40x_probe,73.progress = udbg_progress,74.init_IRQ = uic_init_tree,75.get_irq = uic_get_irq,76.restart = ppc4xx_reset_system,77.calibrate_decr = generic_calibrate_decr,78};798081