-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 81268 b: refs/heads/master c: 5b5820d h: refs/heads/master v: v3
- Loading branch information
Marian Balakowicz
authored and
Grant Likely
committed
Jan 19, 2008
1 parent
df57248
commit a5fc30e
Showing
6 changed files
with
113 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 0238aa54b598af5919d82f6b196fd34f0182c78d | ||
refs/heads/master: 5b5820d08b8cc90ba0148bf8d4a5a1f792e9e8ba |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Support for 'mpc5200-simple-platform' compatible boards. | ||
* | ||
* Written by Marian Balakowicz <m8@semihalf.com> | ||
* Copyright (C) 2007 Semihalf | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* 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 <asm/time.h> | ||
#include <asm/prom.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); | ||
|
||
/* Some mpc5200 & mpc5200b related configuration */ | ||
mpc5200_setup_xlb_arbiter(); | ||
|
||
/* Map wdt for mpc52xx_restart() */ | ||
mpc52xx_map_wdt(); | ||
|
||
mpc52xx_setup_pci(); | ||
} | ||
|
||
/* list of the supported boards */ | ||
static char *board[] __initdata = { | ||
"promess,motionpro", | ||
"schindler,cm5200", | ||
"tqc,tqm5200", | ||
NULL | ||
}; | ||
|
||
/* | ||
* Called very early, MMU is off, device-tree isn't unflattened | ||
*/ | ||
static int __init mpc5200_simple_probe(void) | ||
{ | ||
unsigned long node = of_get_flat_dt_root(); | ||
int i = 0; | ||
|
||
while (board[i]) { | ||
if (of_flat_dt_is_compatible(node, board[i])) | ||
break; | ||
i++; | ||
} | ||
|
||
return (board[i] != NULL); | ||
} | ||
|
||
define_machine(mpc5200_simple_platform) { | ||
.name = "mpc5200-simple-platform", | ||
.probe = mpc5200_simple_probe, | ||
.setup_arch = mpc5200_simple_setup_arch, | ||
.init = mpc52xx_declare_of_platform_devices, | ||
.init_IRQ = mpc52xx_init_irq, | ||
.get_irq = mpc52xx_get_irq, | ||
.restart = mpc52xx_restart, | ||
.calibrate_decr = generic_calibrate_decr, | ||
}; |