mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
28da734d58
Most probe functions that do not use the 'compatible' string do nothing else than checking whether the machine is compatible with one of the strings in a NULL terminated table of strings. Define that table of strings in ppc_md structure and check it directly from probe_machine() instead of using ppc_md.probe() for that. Keep checking in ppc_md.probe() only for more complex probing. All .compatible could be replaced with a single element NULL terminated list but that's not worth the churn. Can be do incrementaly in follow-up patches. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231214103152.12269-4-mpe@ellerman.id.au
71 lines
1.9 KiB
C
71 lines
1.9 KiB
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* 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
|
|
#include <linux/of.h>
|
|
#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);
|
|
|
|
/* Map important registers from the internal memory map */
|
|
mpc52xx_map_common_devices();
|
|
|
|
/* Some mpc5200 & mpc5200b related configuration */
|
|
mpc5200_setup_xlb_arbiter();
|
|
}
|
|
|
|
/* list of the supported boards */
|
|
static const char *board[] __initdata = {
|
|
"anonymous,a3m071",
|
|
"anonymous,a4m072",
|
|
"anon,charon",
|
|
"ifm,o2d",
|
|
"intercontrol,digsy-mtc",
|
|
"manroland,mucmc52",
|
|
"manroland,uc101",
|
|
"phytec,pcm030",
|
|
"phytec,pcm032",
|
|
"promess,motionpro",
|
|
"schindler,cm5200",
|
|
"tqc,tqm5200",
|
|
NULL
|
|
};
|
|
|
|
define_machine(mpc5200_simple_platform) {
|
|
.name = "mpc5200-simple-platform",
|
|
.compatibles = board,
|
|
.setup_arch = mpc5200_simple_setup_arch,
|
|
.discover_phbs = mpc52xx_setup_pci,
|
|
.init = mpc52xx_declare_of_platform_devices,
|
|
.init_IRQ = mpc52xx_init_irq,
|
|
.get_irq = mpc52xx_get_irq,
|
|
.restart = mpc52xx_restart,
|
|
};
|