diff options
author | Andy Fleming <afleming@freescale.com> | 2005-10-28 20:46:27 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-29 00:42:28 -0400 |
commit | b37665e0ba1d3f05697bfae249b09a2e9cc95132 (patch) | |
tree | 22c80609e3254524038d5b690f1f886b0987f58d /arch/ppc/platforms/85xx/mpc8540_ads.c | |
parent | dd03d25fac90ee6f394874fb4e6995866304e4ba (diff) |
[PATCH] ppc32: 85xx PHY Platform Update
This patch updates the 85xx platform code to support the new PHY Layer.
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <Kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/platforms/85xx/mpc8540_ads.c')
-rw-r--r-- | arch/ppc/platforms/85xx/mpc8540_ads.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 7dc8a68acfd0..7e952c1228cb 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
@@ -52,6 +52,10 @@ | |||
52 | 52 | ||
53 | #include <syslib/ppc85xx_setup.h> | 53 | #include <syslib/ppc85xx_setup.h> |
54 | 54 | ||
55 | static const char *GFAR_PHY_0 = "phy0:0"; | ||
56 | static const char *GFAR_PHY_1 = "phy0:1"; | ||
57 | static const char *GFAR_PHY_3 = "phy0:3"; | ||
58 | |||
55 | /* ************************************************************************ | 59 | /* ************************************************************************ |
56 | * | 60 | * |
57 | * Setup the architecture | 61 | * Setup the architecture |
@@ -63,6 +67,7 @@ mpc8540ads_setup_arch(void) | |||
63 | bd_t *binfo = (bd_t *) __res; | 67 | bd_t *binfo = (bd_t *) __res; |
64 | unsigned int freq; | 68 | unsigned int freq; |
65 | struct gianfar_platform_data *pdata; | 69 | struct gianfar_platform_data *pdata; |
70 | struct gianfar_mdio_data *mdata; | ||
66 | 71 | ||
67 | /* get the core frequency */ | 72 | /* get the core frequency */ |
68 | freq = binfo->bi_intfreq; | 73 | freq = binfo->bi_intfreq; |
@@ -89,34 +94,35 @@ mpc8540ads_setup_arch(void) | |||
89 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); | 94 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); |
90 | #endif | 95 | #endif |
91 | 96 | ||
97 | /* setup the board related info for the MDIO bus */ | ||
98 | mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO); | ||
99 | |||
100 | mdata->irq[0] = MPC85xx_IRQ_EXT5; | ||
101 | mdata->irq[1] = MPC85xx_IRQ_EXT5; | ||
102 | mdata->irq[2] = -1; | ||
103 | mdata->irq[3] = MPC85xx_IRQ_EXT5; | ||
104 | mdata->irq[31] = -1; | ||
105 | mdata->paddr += binfo->bi_immr_base; | ||
106 | |||
92 | /* setup the board related information for the enet controllers */ | 107 | /* setup the board related information for the enet controllers */ |
93 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); | 108 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); |
94 | if (pdata) { | 109 | if (pdata) { |
95 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 110 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
96 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 111 | pdata->bus_id = GFAR_PHY_0; |
97 | pdata->phyid = 0; | ||
98 | /* fixup phy address */ | ||
99 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
100 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | 112 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); |
101 | } | 113 | } |
102 | 114 | ||
103 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); | 115 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); |
104 | if (pdata) { | 116 | if (pdata) { |
105 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 117 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
106 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 118 | pdata->bus_id = GFAR_PHY_1; |
107 | pdata->phyid = 1; | ||
108 | /* fixup phy address */ | ||
109 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
110 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | 119 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); |
111 | } | 120 | } |
112 | 121 | ||
113 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC); | 122 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC); |
114 | if (pdata) { | 123 | if (pdata) { |
115 | pdata->board_flags = 0; | 124 | pdata->board_flags = 0; |
116 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 125 | pdata->bus_id = GFAR_PHY_3; |
117 | pdata->phyid = 3; | ||
118 | /* fixup phy address */ | ||
119 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
120 | memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6); | 126 | memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6); |
121 | } | 127 | } |
122 | 128 | ||