powerpc/b4860qds: add workaround for XFI
PATCH 4/5 powerpc/b4860qds: add workaround for XFI
From: Shaohui Xie <[email protected]>
XFI does not work stable on current board, it's due to heat sink issue, to make it work stable the board needs additional heat sink, enable two XFI lanes only. Right now we do not have such an erratum for the issue, so use a define CONFIG_SYS_FSL_B4860QDS_XFI_ERR to identify it. The workaround will only be used in XFI protocols and only if the hwconfig indicates that XFI is prefered.
A new VSC3308 config function is used instead of re-use the original function, to avoid making the function complex and ugly.
--- arch/powerpc/cpu/mpc85xx/cmd_errata.c | 3 + board/freescale/b4860qds/b4860qds.c | 13 ++++ board/freescale/common/vsc3316_3308.c | 108 ++++++++++++++++++++++++++++++++++ board/freescale/common/vsc3316_3308.h | 4 ++ include/configs/B4860QDS.h | 2 + 5 files changed, 130 insertions(+)
arch/powerpc/cpu/mpc85xx/cmd_errata.c +3 -0
@@ -308,6 +308,9 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])#ifdef CONFIG_SYS_FSL_ERRATUM_A005434 puts ("Work-around for Erratum A-005434 enabled\n" );#endif +#if defined(CONFIG_SYS_FSL_B4860QDS_XFI_ERR ) && defined(CONFIG_B4860QDS ) +puts ("Work-around for Erratum XFI on B4860QDS enabled\n" ); +#endif return 0 ; }
board/freescale/b4860qds/b4860qds.c +13 -0
@@ -548,6 +548,18 @@ int configure_vsc3316_3308(void)if (hwconfig_subarg_cmp_f ("fsl_b4860_serdes2" ,"sfp_amc" ,"sfp" , buf)) { +#ifdef CONFIG_SYS_FSL_B4860QDS_XFI_ERR +/* change default VSC3308 for XFI erratum */ + ret =vsc3308_config_adjust (VSC3308_TX_ADDRESS , + vsc08_tx_sfp, num_vsc08_con); +if (ret) +return ret; + + ret =vsc3308_config_adjust (VSC3308_RX_ADDRESS , + vsc08_rx_sfp, num_vsc08_con); +if (ret) +return ret; +#else ret =vsc3308_config (VSC3308_TX_ADDRESS , vsc08_tx_sfp, num_vsc08_con);if (ret)
@@ -557,6 +569,7 @@ int configure_vsc3316_3308(void) vsc08_rx_sfp, num_vsc08_con);if (ret)return ret; +#endif }else { ret =vsc3308_config (VSC3308_TX_ADDRESS , vsc08_tx_amc, num_vsc08_con);
board/freescale/common/vsc3316_3308.c +108 -0
121 lines not on this page · raw message
board/freescale/common/vsc3316_3308.h +4 -0
@@ -14,6 +14,10 @@int vsc_if_enable (unsigned int vsc_addr);int vsc3316_config (unsigned int vsc_addr,int8_t con_arr[][2 ],unsigned int num_con); +#ifdef CONFIG_SYS_FSL_B4860QDS_XFI_ERR +int vsc3308_config_adjust (unsigned int vsc_addr,const int8_t con_arr[][2 ], +unsigned int num_con); +#endif int vsc3308_config (unsigned int vsc_addr,const int8_t con_arr[][2 ],unsigned int num_con);void vsc_wp_config (unsigned int vsc_addr);
include/configs/B4860QDS.h +2 -0
@@ -730,6 +730,8 @@ unsigned long get_board_ddr_clk(void);#define CONFIG_PHY_GIGE /* Include GbE speed/duplex detection */ #endif +#define CONFIG_SYS_FSL_B4860QDS_XFI_ERR +/* * Environment */
Signature · 1 line
2.1.0.27.g96db324
PATCH 4/5 powerpc/b4860qds: add workaround for XFI
Quoted 9 lines · shh.xie at gmail.com
From: Shaohui Xie <[email protected]>
XFI does not work stable on current board, it's due to heat sink issue, to make it work stable the board needs additional heat sink, enable two XFI lanes only. Right now we do not have such an erratum for the issue, so use a define
CONFIG_SYS_FSL_B4860QDS_XFI_ERRto identify it. The workaround will only be used in XFI protocols and only if the hwconfig indicates that XFI is prefered.
Quoted 5 lines
A new VSC3308 config function is used instead of re-use the original function, to avoid making the function complex and ugly.
Signed-off-by Shaohui Xie <[email protected]>---
Applied to u-boot-mpc85xx, awaiting upstream.
York