diff options
author | Stefan Roese <sr@denx.de> | 2007-10-23 10:10:08 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2007-10-31 21:20:51 +0100 |
commit | 353f2688b4e0fc7b969bc70a02be4b40bf0dd124 (patch) | |
tree | 152a5f26e53692d18110bd6b50b1745150d04ea6 /board/amcc/kilauea | |
parent | 9f798766aa85e62eb8fa8c721e148df609b78137 (diff) | |
download | u-boot-imx-353f2688b4e0fc7b969bc70a02be4b40bf0dd124.zip u-boot-imx-353f2688b4e0fc7b969bc70a02be4b40bf0dd124.tar.gz u-boot-imx-353f2688b4e0fc7b969bc70a02be4b40bf0dd124.tar.bz2 |
ppc4xx: Add initial AMCC Haleakala PPC405EXr eval board support
The Haleakala is nearly identical with the Kilauea eval board. The only
difference is that the 405EXr only supports one EMAC and one PCIe
interface. This patch adds support for the Haleakala board by using
the identical image for Kilauea and Haleakala. The distinction is done
by comparing the PVR.
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/amcc/kilauea')
-rw-r--r-- | board/amcc/kilauea/kilauea.c | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/board/amcc/kilauea/kilauea.c b/board/amcc/kilauea/kilauea.c index b59bd6f..77c0eb4 100644 --- a/board/amcc/kilauea/kilauea.c +++ b/board/amcc/kilauea/kilauea.c @@ -26,7 +26,7 @@ #include <ppc405.h> #include <libfdt.h> #include <asm/processor.h> -#include <asm-ppc/io.h> +#include <asm/io.h> #if defined(CONFIG_PCI) #include <pci.h> @@ -225,11 +225,41 @@ int misc_init_r(void) return 0; } +int board_emac_count(void) +{ + u32 pvr = get_pvr(); + + /* + * 405EXr only has one EMAC interface, 405EX has two + */ + if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA)) + return 1; + else + return 2; +} + +static int board_pcie_count(void) +{ + u32 pvr = get_pvr(); + + /* + * 405EXr only has one EMAC interface, 405EX has two + */ + if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA)) + return 1; + else + return 2; +} + int checkboard (void) { char *s = getenv("serial#"); + u32 pvr = get_pvr(); - printf("Board: Kilauea - AMCC PPC405EX Evaluation Board"); + if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA)) + printf("Board: Haleakala - AMCC PPC405EXr Evaluation Board"); + else + printf("Board: Kilauea - AMCC PPC405EX Evaluation Board"); if (s != NULL) { puts(", serial# "); @@ -310,7 +340,7 @@ void pcie_setup_hoses(int busno) char *env; unsigned int delay; - for (i = 0; i < 2; i++) { + for (i = 0; i < board_pcie_count(); i++) { if (is_end_point(i)) { printf("PCIE%d: will be configured as endpoint\n", i); |