Path: blob/master/arch/powerpc/platforms/44x/ppc44x_simple.c
26481 views
// SPDX-License-Identifier: GPL-2.0-only1/*2* Generic PowerPC 44x platform support3*4* Copyright 2008 IBM Corporation5*6* This implements simple platform support for PowerPC 44x chips. This is7* mostly used for eval boards or other simple and "generic" 44x boards. If8* your board has custom functions or hardware, then you will likely want to9* implement your own board.c file to accommodate it.10*/1112#include <asm/machdep.h>13#include <asm/pci-bridge.h>14#include <asm/ppc4xx.h>15#include <asm/time.h>16#include <asm/udbg.h>17#include <asm/uic.h>1819#include <linux/init.h>20#include <linux/of_platform.h>2122static const struct of_device_id ppc44x_of_bus[] __initconst = {23{ .compatible = "ibm,plb4", },24{ .compatible = "ibm,opb", },25{ .compatible = "ibm,ebc", },26{ .compatible = "simple-bus", },27{},28};2930static int __init ppc44x_device_probe(void)31{32of_platform_bus_probe(NULL, ppc44x_of_bus, NULL);3334return 0;35}36machine_device_initcall(ppc44x_simple, ppc44x_device_probe);3738/* This is the list of boards that can be supported by this simple39* platform code. This does _not_ mean the boards are compatible,40* as they most certainly are not from a device tree perspective.41* However, their differences are handled by the device tree and the42* drivers and therefore they don't need custom board support files.43*44* Again, if your board needs to do things differently then create a45* board.c file for it rather than adding it to this list.46*/47static char *board[] __initdata = {48"amcc,arches",49"amcc,bamboo",50"apm,bluestone",51"amcc,glacier",52"ibm,ebony",53"amcc,eiger",54"amcc,katmai",55"amcc,rainier",56"amcc,redwood",57"amcc,sequoia",58"amcc,taishan",59"amcc,yosemite",60"mosaixtech,icon"61};6263static int __init ppc44x_probe(void)64{65int i = 0;6667for (i = 0; i < ARRAY_SIZE(board); i++) {68if (of_machine_is_compatible(board[i])) {69pci_set_flags(PCI_REASSIGN_ALL_RSRC);70return 1;71}72}7374return 0;75}7677define_machine(ppc44x_simple) {78.name = "PowerPC 44x Platform",79.probe = ppc44x_probe,80.progress = udbg_progress,81.init_IRQ = uic_init_tree,82.get_irq = uic_get_irq,83.restart = ppc4xx_reset_system,84};858687