Path: blob/master/arch/powerpc/platforms/52xx/mpc5200_simple.c
10818 views
/*1* Support for 'mpc5200-simple-platform' compatible boards.2*3* Written by Marian Balakowicz <[email protected]>4* Copyright (C) 2007 Semihalf5*6* This program is free software; you can redistribute it and/or modify it7* under the terms of the GNU General Public License as published by the8* Free Software Foundation; either version 2 of the License, or (at your9* option) any later version.10*11* Description:12* This code implements support for a simple MPC52xx based boards which13* do not need a custom platform specific setup. Such boards are14* supported assuming the following:15*16* - GPIO pins are configured by the firmware,17* - CDM configuration (clocking) is setup correctly by firmware,18* - if the 'fsl,has-wdt' property is present in one of the19* gpt nodes, then it is safe to use such gpt to reset the board,20* - PCI is supported if enabled in the kernel configuration21* and if there is a PCI bus node defined in the device tree.22*23* Boards that are compatible with this generic platform support24* are listed in a 'board' table.25*/2627#undef DEBUG28#include <asm/time.h>29#include <asm/prom.h>30#include <asm/machdep.h>31#include <asm/mpc52xx.h>3233/*34* Setup the architecture35*/36static void __init mpc5200_simple_setup_arch(void)37{38if (ppc_md.progress)39ppc_md.progress("mpc5200_simple_setup_arch()", 0);4041/* Map important registers from the internal memory map */42mpc52xx_map_common_devices();4344/* Some mpc5200 & mpc5200b related configuration */45mpc5200_setup_xlb_arbiter();4647mpc52xx_setup_pci();48}4950/* list of the supported boards */51static const char *board[] __initdata = {52"intercontrol,digsy-mtc",53"manroland,mucmc52",54"manroland,uc101",55"phytec,pcm030",56"phytec,pcm032",57"promess,motionpro",58"schindler,cm5200",59"tqc,tqm5200",60NULL61};6263/*64* Called very early, MMU is off, device-tree isn't unflattened65*/66static int __init mpc5200_simple_probe(void)67{68return of_flat_dt_match(of_get_flat_dt_root(), board);69}7071define_machine(mpc5200_simple_platform) {72.name = "mpc5200-simple-platform",73.probe = mpc5200_simple_probe,74.setup_arch = mpc5200_simple_setup_arch,75.init = mpc52xx_declare_of_platform_devices,76.init_IRQ = mpc52xx_init_irq,77.get_irq = mpc52xx_get_irq,78.restart = mpc52xx_restart,79.calibrate_decr = generic_calibrate_decr,80};818283