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>
This commit is contained in:
parent
9f798766aa
commit
353f2688b4
|
@ -303,6 +303,7 @@ Stefan Roese <sr@denx.de>
|
||||||
bamboo PPC440EP
|
bamboo PPC440EP
|
||||||
bunbinga PPC405EP
|
bunbinga PPC405EP
|
||||||
ebony PPC440GP
|
ebony PPC440GP
|
||||||
|
haleakala PPC405EXr
|
||||||
katmai PPC440SPe
|
katmai PPC440SPe
|
||||||
kilauea PPC405EX
|
kilauea PPC405EX
|
||||||
lwmon5 PPC440EPx
|
lwmon5 PPC440EPx
|
||||||
|
|
1
MAKEALL
1
MAKEALL
|
@ -180,6 +180,7 @@ LIST_4xx=" \
|
||||||
ERIC \
|
ERIC \
|
||||||
EXBITGEN \
|
EXBITGEN \
|
||||||
G2000 \
|
G2000 \
|
||||||
|
haleakala \
|
||||||
hcu4 \
|
hcu4 \
|
||||||
hcu5 \
|
hcu5 \
|
||||||
HH405 \
|
HH405 \
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -1168,8 +1168,10 @@ KAREF_config: unconfig
|
||||||
katmai_config: unconfig
|
katmai_config: unconfig
|
||||||
@$(MKCONFIG) $(@:_config=) ppc ppc4xx katmai amcc
|
@$(MKCONFIG) $(@:_config=) ppc ppc4xx katmai amcc
|
||||||
|
|
||||||
kilauea_config: unconfig
|
# Kilauea & Haleakala images are identical (recognized via PVR)
|
||||||
@$(MKCONFIG) $(@:_config=) ppc ppc4xx kilauea amcc
|
kilauea_config \
|
||||||
|
haleakala_config: unconfig
|
||||||
|
@$(MKCONFIG) -n $@ -a kilauea ppc ppc4xx kilauea amcc
|
||||||
|
|
||||||
luan_config: unconfig
|
luan_config: unconfig
|
||||||
@$(MKCONFIG) $(@:_config=) ppc ppc4xx luan amcc
|
@$(MKCONFIG) $(@:_config=) ppc ppc4xx luan amcc
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <ppc405.h>
|
#include <ppc405.h>
|
||||||
#include <libfdt.h>
|
#include <libfdt.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm-ppc/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
#if defined(CONFIG_PCI)
|
#if defined(CONFIG_PCI)
|
||||||
#include <pci.h>
|
#include <pci.h>
|
||||||
|
@ -225,11 +225,41 @@ int misc_init_r(void)
|
||||||
return 0;
|
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)
|
int checkboard (void)
|
||||||
{
|
{
|
||||||
char *s = getenv("serial#");
|
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) {
|
if (s != NULL) {
|
||||||
puts(", serial# ");
|
puts(", serial# ");
|
||||||
|
@ -310,7 +340,7 @@ void pcie_setup_hoses(int busno)
|
||||||
char *env;
|
char *env;
|
||||||
unsigned int delay;
|
unsigned int delay;
|
||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < board_pcie_count(); i++) {
|
||||||
|
|
||||||
if (is_end_point(i)) {
|
if (is_end_point(i)) {
|
||||||
printf("PCIE%d: will be configured as endpoint\n", i);
|
printf("PCIE%d: will be configured as endpoint\n", i);
|
||||||
|
|
|
@ -158,7 +158,14 @@ struct eth_device *emac0_dev = NULL;
|
||||||
/*
|
/*
|
||||||
* Get count of EMAC devices (doesn't have to be the max. possible number
|
* Get count of EMAC devices (doesn't have to be the max. possible number
|
||||||
* supported by the cpu)
|
* supported by the cpu)
|
||||||
|
*
|
||||||
|
* CONFIG_BOARD_EMAC_COUNT added so now a "dynamic" way to configure the
|
||||||
|
* EMAC count is possible. As it is needed for the Kilauea/Haleakala
|
||||||
|
* 405EX/405EXr eval board, using the same binary.
|
||||||
*/
|
*/
|
||||||
|
#if defined(CONFIG_BOARD_EMAC_COUNT)
|
||||||
|
#define LAST_EMAC_NUM board_emac_count()
|
||||||
|
#else /* CONFIG_BOARD_EMAC_COUNT */
|
||||||
#if defined(CONFIG_HAS_ETH3)
|
#if defined(CONFIG_HAS_ETH3)
|
||||||
#define LAST_EMAC_NUM 4
|
#define LAST_EMAC_NUM 4
|
||||||
#elif defined(CONFIG_HAS_ETH2)
|
#elif defined(CONFIG_HAS_ETH2)
|
||||||
|
@ -168,6 +175,7 @@ struct eth_device *emac0_dev = NULL;
|
||||||
#else
|
#else
|
||||||
#define LAST_EMAC_NUM 1
|
#define LAST_EMAC_NUM 1
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CONFIG_BOARD_EMAC_COUNT */
|
||||||
|
|
||||||
/* normal boards start with EMAC0 */
|
/* normal boards start with EMAC0 */
|
||||||
#if !defined(CONFIG_EMAC_NR_START)
|
#if !defined(CONFIG_EMAC_NR_START)
|
||||||
|
@ -197,6 +205,8 @@ extern int emac4xx_miiphy_read (char *devname, unsigned char addr,
|
||||||
extern int emac4xx_miiphy_write (char *devname, unsigned char addr,
|
extern int emac4xx_miiphy_write (char *devname, unsigned char addr,
|
||||||
unsigned char reg, unsigned short value);
|
unsigned char reg, unsigned short value);
|
||||||
|
|
||||||
|
int board_emac_count(void);
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------+
|
/*-----------------------------------------------------------------------------+
|
||||||
| ppc_4xx_eth_halt
|
| ppc_4xx_eth_halt
|
||||||
| Disable MAL channel, and EMACn
|
| Disable MAL channel, and EMACn
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
|
#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
|
||||||
#define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */
|
#define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */
|
||||||
|
#define CONFIG_BOARD_EMAC_COUNT
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* Base addresses -- Note these are effective addresses where the
|
* Base addresses -- Note these are effective addresses where the
|
||||||
|
|
Loading…
Reference in New Issue