Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116922
b: refs/heads/master
c: 8105fa8
h: refs/heads/master
v: v3
  • Loading branch information
Josh Boyer committed Oct 17, 2008
1 parent 6b0596b commit 4e5f46e
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df8f71faa8e9b8b8df8b22b57889630fece25696
refs/heads/master: 8105fa88593c87f8aba0e7e829d7dc0ee94fe2cf
22 changes: 22 additions & 0 deletions trunk/arch/powerpc/platforms/40x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
# help
# This option enables support for the CPCI405 board.

config ACADIA
bool "Acadia"
depends on 40x
default n
select PPC40x_SIMPLE
select 405EZ
help
This option enables support for the AMCC 405EZ Acadia evaluation board.

config EP405
bool "EP405/EP405PC"
depends on 40x
Expand Down Expand Up @@ -93,6 +102,13 @@ config XILINX_VIRTEX_GENERIC_BOARD
Most Virtex designs should use this unless it needs to do some
special configuration at board probe time.

config PPC40x_SIMPLE
bool "Simple PowerPC 40x board support"
depends on 40x
default n
help
This option enables the simple PowerPC 40x platform support.

# 40x specific CPU modules, selected based on the board above.
config NP405H
bool
Expand All @@ -118,6 +134,12 @@ config 405EX
select IBM_NEW_EMAC_EMAC4
select IBM_NEW_EMAC_RGMII

config 405EZ
bool
select IBM_NEW_EMAC_NO_FLOW_CTRL
select IBM_NEW_EMAC_MAL_CLR_ICINTSTAT
select IBM_NEW_EMAC_MAL_COMMON_ERR

config 405GPR
bool

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/40x/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ obj-$(CONFIG_MAKALU) += makalu.o
obj-$(CONFIG_WALNUT) += walnut.o
obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
obj-$(CONFIG_EP405) += ep405.o
obj-$(CONFIG_PPC40x_SIMPLE) += ppc40x_simple.o
80 changes: 80 additions & 0 deletions trunk/arch/powerpc/platforms/40x/ppc40x_simple.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* Generic PowerPC 40x platform support
*
* Copyright 2008 IBM Corporation
*
* 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; version 2 of the License.
*
* This implements simple platform support for PowerPC 44x chips. This is
* mostly used for eval boards or other simple and "generic" 44x boards. If
* your board has custom functions or hardware, then you will likely want to
* implement your own board.c file to accommodate it.
*/

#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/ppc4xx.h>
#include <asm/prom.h>
#include <asm/time.h>
#include <asm/udbg.h>
#include <asm/uic.h>

#include <linux/init.h>
#include <linux/of_platform.h>

static __initdata struct of_device_id ppc40x_of_bus[] = {
{ .compatible = "ibm,plb3", },
{ .compatible = "ibm,plb4", },
{ .compatible = "ibm,opb", },
{ .compatible = "ibm,ebc", },
{ .compatible = "simple-bus", },
{},
};

static int __init ppc40x_device_probe(void)
{
of_platform_bus_probe(NULL, ppc40x_of_bus, NULL);

return 0;
}
machine_device_initcall(ppc40x_simple, ppc40x_device_probe);

/* This is the list of boards that can be supported by this simple
* platform code. This does _not_ mean the boards are compatible,
* as they most certainly are not from a device tree perspective.
* However, their differences are handled by the device tree and the
* drivers and therefore they don't need custom board support files.
*
* Again, if your board needs to do things differently then create a
* board.c file for it rather than adding it to this list.
*/
static char *board[] __initdata = {
"amcc,acadia"
};

static int __init ppc40x_probe(void)
{
unsigned long root = of_get_flat_dt_root();
int i = 0;

for (i = 0; i < ARRAY_SIZE(board); i++) {
if (of_flat_dt_is_compatible(root, board[i])) {
ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
return 1;
}
}

return 0;
}

define_machine(ppc40x_simple) {
.name = "PowerPC 40x Platform",
.probe = ppc40x_probe,
.progress = udbg_progress,
.init_IRQ = uic_init_tree,
.get_irq = uic_get_irq,
.restart = ppc4xx_reset_system,
.calibrate_decr = generic_calibrate_decr,
};

0 comments on commit 4e5f46e

Please sign in to comment.