aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/platforms/83xx/mpc834x_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/platforms/83xx/mpc834x_sys.c')
-rw-r--r--arch/ppc/platforms/83xx/mpc834x_sys.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
index 79b3f533d0a3..98edc75f4105 100644
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -51,6 +51,9 @@
51 51
52#include <syslib/ppc83xx_setup.h> 52#include <syslib/ppc83xx_setup.h>
53 53
54static const char *GFAR_PHY_0 = "phy0:0";
55static const char *GFAR_PHY_1 = "phy0:1";
56
54#ifndef CONFIG_PCI 57#ifndef CONFIG_PCI
55unsigned long isa_io_base = 0; 58unsigned long isa_io_base = 0;
56unsigned long isa_mem_base = 0; 59unsigned long isa_mem_base = 0;
@@ -97,6 +100,7 @@ mpc834x_sys_setup_arch(void)
97 bd_t *binfo = (bd_t *) __res; 100 bd_t *binfo = (bd_t *) __res;
98 unsigned int freq; 101 unsigned int freq;
99 struct gianfar_platform_data *pdata; 102 struct gianfar_platform_data *pdata;
103 struct gianfar_mdio_data *mdata;
100 104
101 /* get the core frequency */ 105 /* get the core frequency */
102 freq = binfo->bi_intfreq; 106 freq = binfo->bi_intfreq;
@@ -111,24 +115,27 @@ mpc834x_sys_setup_arch(void)
111#endif 115#endif
112 mpc83xx_early_serial_map(); 116 mpc83xx_early_serial_map();
113 117
118 /* setup the board related info for the MDIO bus */
119 mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC83xx_MDIO);
120
121 mdata->irq[0] = MPC83xx_IRQ_EXT1;
122 mdata->irq[1] = MPC83xx_IRQ_EXT2;
123 mdata->irq[2] = -1;
124 mdata->irq[31] = -1;
125 mdata->paddr += binfo->bi_immr_base;
126
114 /* setup the board related information for the enet controllers */ 127 /* setup the board related information for the enet controllers */
115 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1); 128 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1);
116 if (pdata) { 129 if (pdata) {
117 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; 130 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
118 pdata->interruptPHY = MPC83xx_IRQ_EXT1; 131 pdata->bus_id = GFAR_PHY_0;
119 pdata->phyid = 0;
120 /* fixup phy address */
121 pdata->phy_reg_addr += binfo->bi_immr_base;
122 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); 132 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
123 } 133 }
124 134
125 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC2); 135 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC2);
126 if (pdata) { 136 if (pdata) {
127 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; 137 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
128 pdata->interruptPHY = MPC83xx_IRQ_EXT2; 138 pdata->bus_id = GFAR_PHY_1;
129 pdata->phyid = 1;
130 /* fixup phy address */
131 pdata->phy_reg_addr += binfo->bi_immr_base;
132 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); 139 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
133 } 140 }
134 141