diff options
author | Shaohui Xie <Shaohui.Xie@freescale.com> | 2013-11-07 05:37:02 (GMT) |
---|---|---|
committer | Madalin-Cristian Bucur <madalin.bucur@freescale.com> | 2014-01-06 14:46:55 (GMT) |
commit | 0f6edbaa7f3f23efc87bd48f89ddae7f056937b0 (patch) | |
tree | 522034504a45ab6fe1967e48c48a5f53b28318f3 | |
parent | d4dbebaa8b97e5632ea3e30d33789b77ccc046af (diff) | |
download | linux-fsl-qoriq-0f6edbaa7f3f23efc87bd48f89ddae7f056937b0.tar.xz |
T4240/dpa: skip reset FM for T4240 rev 2
Reset FM on T4 rev2.0 will lead to kernel hang if reading register
FMQM_GS after the reset, so temporarily skip the reset for T4240 rev2.0
till a better solution is available.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Change-Id: I6a425bc1aba773f01663251d7b20ffd7c93cc37f
Reviewed-on: http://git.am.freescale.net:8181/6330
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Tiefei Zang <roy.zang@freescale.com>
Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/7674
Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
-rw-r--r-- | drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c index a44bdab..8cb96a0 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/fm.c @@ -47,6 +47,7 @@ #include "fm_common.h" #include "fm_ipc.h" #include "fm.h" +#include <asm/mpc85xx.h> /****************************************/ @@ -4347,9 +4348,15 @@ t_Error FM_Init(t_Handle h_Fm) /* Reset the FM if required. */ if (p_FmDriverParam->resetOnInit) { - WRITE_UINT32(p_Fm->p_FmFpmRegs->fm_rstc, FPM_RSTC_FM_RESET); - CORE_MemoryBarrier(); - XX_UDelay(100); + u32 svr = mfspr(SPRN_SVR); + + if (SVR_SOC_VER(svr) == SVR_T4240 && SVR_REV(svr) > 0x10) { + DBG(WARNING, ("Hack: No FM reset!\n")); + } else { + WRITE_UINT32(p_Fm->p_FmFpmRegs->fm_rstc, FPM_RSTC_FM_RESET); + CORE_MemoryBarrier(); + XX_UDelay(100); + } if (GET_UINT32(p_Fm->p_FmQmiRegs->fmqm_gs) & QMI_GS_HALT_NOT_BUSY) { |