* [U-Boot] [PATCH 2/5] powerpc/b4860qds: dtb fixup for xfi
@ 2014-11-13 3:27 shh.xie at gmail.com
2014-12-05 16:35 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: shh.xie at gmail.com @ 2014-11-13 3:27 UTC (permalink / raw)
To: u-boot
From: Shaohui Xie <Shaohui.Xie@freescale.com>
Since xfi has no phy, we delete the property "phy-handle" and use
a "fixed-link" property for a xfi port.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
---
board/freescale/b4860qds/eth_b4860qds.c | 38 +++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/board/freescale/b4860qds/eth_b4860qds.c b/board/freescale/b4860qds/eth_b4860qds.c
index aa48b5e..595bb4c 100644
--- a/board/freescale/b4860qds/eth_b4860qds.c
+++ b/board/freescale/b4860qds/eth_b4860qds.c
@@ -365,6 +365,11 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
{
int phy;
char alias[32];
+ struct fixed_link f_link;
+ ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+ u32 prtcl2 = in_be32(&gur->rcwsr[4]) & FSL_CORENET2_RCWSR4_SRDS2_PRTCL;
+
+ prtcl2 >>= FSL_CORENET2_RCWSR4_SRDS2_PRTCL_SHIFT;
if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_SGMII) {
phy = fm_info_get_phy_address(port);
@@ -372,6 +377,39 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
sprintf(alias, "phy_sgmii_%x", phy);
fdt_set_phy_handle(fdt, compat, addr, alias);
fdt_status_okay_by_alias(fdt, alias);
+ } else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_XGMII) {
+ /* check if it's XFI interface for 10g */
+ switch (prtcl2) {
+ case 0x80:
+ case 0x81:
+ case 0x82:
+ case 0x83:
+ case 0x84:
+ case 0x85:
+ case 0x86:
+ case 0x87:
+ case 0x88:
+ case 0x89:
+ case 0x8a:
+ case 0x8b:
+ case 0x8c:
+ case 0x8d:
+ case 0x8e:
+ case 0xb1:
+ case 0xb2:
+ f_link.phy_id = port;
+ f_link.duplex = 1;
+ f_link.link_speed = 10000;
+ f_link.pause = 0;
+ f_link.asym_pause = 0;
+
+ fdt_delprop(fdt, offset, "phy-handle");
+ fdt_setprop(fdt, offset, "fixed-link", &f_link,
+ sizeof(f_link));
+ break;
+ default:
+ break;
+ }
}
}
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH 2/5] powerpc/b4860qds: dtb fixup for xfi
2014-11-13 3:27 [U-Boot] [PATCH 2/5] powerpc/b4860qds: dtb fixup for xfi shh.xie at gmail.com
@ 2014-12-05 16:35 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2014-12-05 16:35 UTC (permalink / raw)
To: u-boot
On 11/12/2014 07:27 PM, shh.xie at gmail.com wrote:
> From: Shaohui Xie <Shaohui.Xie@freescale.com>
>
> Since xfi has no phy, we delete the property "phy-handle" and use
> a "fixed-link" property for a xfi port.
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> ---
Applied to u-boot-mpc85xx, awaiting upstream.
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-05 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13 3:27 [U-Boot] [PATCH 2/5] powerpc/b4860qds: dtb fixup for xfi shh.xie at gmail.com
2014-12-05 16:35 ` York Sun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.