powerpc/mpc52xx: add a4m072 board support
[linux-2.6.git] / arch / powerpc / platforms / 52xx / mpc5200_simple.c
blobc0aa04068d6936bc195bfe271acf21758f494e0b
1 /*
2 * Support for 'mpc5200-simple-platform' compatible boards.
4 * Written by Marian Balakowicz <m8@semihalf.com>
5 * Copyright (C) 2007 Semihalf
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
12 * Description:
13 * This code implements support for a simple MPC52xx based boards which
14 * do not need a custom platform specific setup. Such boards are
15 * supported assuming the following:
17 * - GPIO pins are configured by the firmware,
18 * - CDM configuration (clocking) is setup correctly by firmware,
19 * - if the 'fsl,has-wdt' property is present in one of the
20 * gpt nodes, then it is safe to use such gpt to reset the board,
21 * - PCI is supported if enabled in the kernel configuration
22 * and if there is a PCI bus node defined in the device tree.
24 * Boards that are compatible with this generic platform support
25 * are listed in a 'board' table.
28 #undef DEBUG
29 #include <asm/time.h>
30 #include <asm/prom.h>
31 #include <asm/machdep.h>
32 #include <asm/mpc52xx.h>
35 * Setup the architecture
37 static void __init mpc5200_simple_setup_arch(void)
39 if (ppc_md.progress)
40 ppc_md.progress("mpc5200_simple_setup_arch()", 0);
42 /* Map important registers from the internal memory map */
43 mpc52xx_map_common_devices();
45 /* Some mpc5200 & mpc5200b related configuration */
46 mpc5200_setup_xlb_arbiter();
48 mpc52xx_setup_pci();
51 /* list of the supported boards */
52 static const char *board[] __initdata = {
53 "anonymous,a4m072",
54 "anon,charon",
55 "intercontrol,digsy-mtc",
56 "manroland,mucmc52",
57 "manroland,uc101",
58 "phytec,pcm030",
59 "phytec,pcm032",
60 "promess,motionpro",
61 "schindler,cm5200",
62 "tqc,tqm5200",
63 NULL
67 * Called very early, MMU is off, device-tree isn't unflattened
69 static int __init mpc5200_simple_probe(void)
71 return of_flat_dt_match(of_get_flat_dt_root(), board);
74 define_machine(mpc5200_simple_platform) {
75 .name = "mpc5200-simple-platform",
76 .probe = mpc5200_simple_probe,
77 .setup_arch = mpc5200_simple_setup_arch,
78 .init = mpc52xx_declare_of_platform_devices,
79 .init_IRQ = mpc52xx_init_irq,
80 .get_irq = mpc52xx_get_irq,
81 .restart = mpc52xx_restart,
82 .calibrate_decr = generic_calibrate_decr,