summaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorRenaud Barbier <renaud.barbier@ge.com>2013-11-05 15:36:09 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2013-11-06 11:04:37 +0100
commiteb3ce91e594960d903aedda944f3821fe92aac66 (patch)
treeea9d925996e126a91cbf960846c19e786ae690f9 /arch/ppc
parent2e6750444ee4455938fa0e19d85744b67dd8e1d2 (diff)
downloadbarebox-eb3ce91e594960d903aedda944f3821fe92aac66.tar.gz
barebox-eb3ce91e594960d903aedda944f3821fe92aac66.tar.xz
ppc: mpc85xx: define Ethernet port count
Because the port count is different between the MPC8544 and existing CPU support, the Ethernet port count is defined on a per CPU basis. Accordingly, the TBI PHY initialisation code is updated. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/mach-mpc85xx/eth-devices.c2
-rw-r--r--arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/ppc/mach-mpc85xx/eth-devices.c b/arch/ppc/mach-mpc85xx/eth-devices.c
index 611a5787f8..efebe11f63 100644
--- a/arch/ppc/mach-mpc85xx/eth-devices.c
+++ b/arch/ppc/mach-mpc85xx/eth-devices.c
@@ -40,7 +40,7 @@ static int fsl_phy_init(void)
add_generic_device("gfar-mdio", 0, NULL, MDIO_BASE_ADDR,
0x1000, IORESOURCE_MEM, NULL);
- for (i = 1; i < 3; i++) {
+ for (i = 1; i < FSL_NUM_TSEC; i++) {
out_be32(base + (i * 0x1000), GFAR_TBIPA_END - i);
/* Use "gfar-tbiphy" devices to access internal PHY. */
add_generic_device("gfar-tbiphy", i, NULL,
diff --git a/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h b/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h
index 7cdb37fa64..7d606d11fa 100644
--- a/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h
+++ b/arch/ppc/mach-mpc85xx/include/mach/config_mpc85xx.h
@@ -28,10 +28,12 @@
#define MAX_CPUS 2
#define FSL_NUM_LAWS 12
#define FSL_SEC_COMPAT 2
+#define FSL_NUM_TSEC 3
#elif defined(CONFIG_MPC8544)
#define MAX_CPUS 1
#define FSL_NUM_LAWS 10
+#define FSL_NUM_TSEC 2
#else
#error Processor type not defined for this platform