2019-05-27 06:55:01 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2007-11-15 11:40:21 +00:00
|
|
|
/*
|
|
|
|
* Support for 'mpc5200-simple-platform' compatible boards.
|
|
|
|
*
|
|
|
|
* Written by Marian Balakowicz <m8@semihalf.com>
|
|
|
|
* Copyright (C) 2007 Semihalf
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This code implements support for a simple MPC52xx based boards which
|
|
|
|
* do not need a custom platform specific setup. Such boards are
|
|
|
|
* supported assuming the following:
|
|
|
|
*
|
|
|
|
* - GPIO pins are configured by the firmware,
|
|
|
|
* - CDM configuration (clocking) is setup correctly by firmware,
|
|
|
|
* - if the 'fsl,has-wdt' property is present in one of the
|
|
|
|
* gpt nodes, then it is safe to use such gpt to reset the board,
|
|
|
|
* - PCI is supported if enabled in the kernel configuration
|
|
|
|
* and if there is a PCI bus node defined in the device tree.
|
|
|
|
*
|
|
|
|
* Boards that are compatible with this generic platform support
|
|
|
|
* are listed in a 'board' table.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#undef DEBUG
|
2022-03-08 19:20:25 +00:00
|
|
|
#include <linux/of.h>
|
2007-11-15 11:40:21 +00:00
|
|
|
#include <asm/time.h>
|
|
|
|
#include <asm/machdep.h>
|
|
|
|
#include <asm/mpc52xx.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Setup the architecture
|
|
|
|
*/
|
|
|
|
static void __init mpc5200_simple_setup_arch(void)
|
|
|
|
{
|
|
|
|
if (ppc_md.progress)
|
|
|
|
ppc_md.progress("mpc5200_simple_setup_arch()", 0);
|
|
|
|
|
2008-01-25 05:25:31 +00:00
|
|
|
/* Map important registers from the internal memory map */
|
|
|
|
mpc52xx_map_common_devices();
|
|
|
|
|
2007-11-15 11:40:21 +00:00
|
|
|
/* Some mpc5200 & mpc5200b related configuration */
|
|
|
|
mpc5200_setup_xlb_arbiter();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* list of the supported boards */
|
2010-10-30 15:49:09 +00:00
|
|
|
static const char *board[] __initdata = {
|
2012-12-05 23:30:10 +00:00
|
|
|
"anonymous,a3m071",
|
2012-03-18 22:00:44 +00:00
|
|
|
"anonymous,a4m072",
|
2011-05-02 22:30:52 +00:00
|
|
|
"anon,charon",
|
2012-08-29 21:31:08 +00:00
|
|
|
"ifm,o2d",
|
2009-02-04 20:39:17 +00:00
|
|
|
"intercontrol,digsy-mtc",
|
2009-10-15 15:33:24 +00:00
|
|
|
"manroland,mucmc52",
|
2009-10-15 15:29:32 +00:00
|
|
|
"manroland,uc101",
|
2008-04-25 13:48:05 +00:00
|
|
|
"phytec,pcm030",
|
2009-03-11 15:36:26 +00:00
|
|
|
"phytec,pcm032",
|
|
|
|
"promess,motionpro",
|
2007-11-15 11:40:21 +00:00
|
|
|
"schindler,cm5200",
|
|
|
|
"tqc,tqm5200",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
define_machine(mpc5200_simple_platform) {
|
|
|
|
.name = "mpc5200-simple-platform",
|
2023-12-14 10:31:51 +00:00
|
|
|
.compatibles = board,
|
2007-11-15 11:40:21 +00:00
|
|
|
.setup_arch = mpc5200_simple_setup_arch,
|
2020-11-03 04:35:13 +00:00
|
|
|
.discover_phbs = mpc52xx_setup_pci,
|
2007-11-15 11:40:21 +00:00
|
|
|
.init = mpc52xx_declare_of_platform_devices,
|
|
|
|
.init_IRQ = mpc52xx_init_irq,
|
|
|
|
.get_irq = mpc52xx_get_irq,
|
|
|
|
.restart = mpc52xx_restart,
|
|
|
|
};
|