diff options
author | Mandy Lavi <mandy.lavi@freescale.com> | 2013-08-21 07:00:04 (GMT) |
---|---|---|
committer | Rivera Jose-B46482 <German.Rivera@freescale.com> | 2013-08-28 22:11:13 (GMT) |
commit | 2b4c43eb8a35cf889c12b3ee13e7954385b273cf (patch) | |
tree | 31d3021bd46652d1cb84e483f1e72f96d2cd2c7a /drivers/net/ethernet/freescale/fman | |
parent | 85be729de02043e1c936c2c1426fb93ce6cba734 (diff) | |
download | linux-fsl-qoriq-2b4c43eb8a35cf889c12b3ee13e7954385b273cf.tar.xz |
fmd: fix muram size for b4860rev2
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com>
Change-Id: Id1be0b2511e5c36fd785f8ee72f4189305c7ac71
Reviewed-on: http://git.am.freescale.net:8181/4105
Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c index eadb36f..7a56ec0 100644 --- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c +++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm.c @@ -457,6 +457,12 @@ static const struct qe_firmware *FindFmanMicrocode(void) /* Returning NULL here forces the reuse of the IRAM content */ return NULL; } +#define SVR_SECURITY_MASK 0x00080000 +#define SVR_PERSONALITY_MASK 0x0000FF00 +#define SVR_VER_IGNORE_MASK (SVR_SECURITY_MASK | SVR_PERSONALITY_MASK) +#define SVR_B4860_REV1_VALUE 0x86800010 +#define SVR_B4860_REV2_VALUE 0x86800020 + static t_LnxWrpFmDev * ReadFmDevTreeNode (struct platform_device *of_dev) { @@ -512,6 +518,17 @@ static t_LnxWrpFmDev * ReadFmDevTreeNode (struct platform_device *of_dev) return NULL; } + { + uint32_t svr; + + svr = mfspr(SPRN_SVR); + + if ((svr & ~SVR_VER_IGNORE_MASK) == SVR_B4860_REV2_VALUE) { + res.end = 0x80000; + res.start = 0; + } + } + p_LnxWrpFmDev->fmBaseAddr = 0; p_LnxWrpFmDev->fmPhysBaseAddr = res.start; p_LnxWrpFmDev->fmMemSize = res.end + 1 - res.start; |