diff options
author | Shengzhou Liu <Shengzhou.Liu@freescale.com> | 2011-05-19 06:48:01 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2011-05-20 09:46:49 -0400 |
commit | d08e44570ed611c527a1062eb4f8c6ac61832e6e (patch) | |
tree | ed808ac6e887995a5d7dd9c6b2ed6c355deaa000 /arch/powerpc/sysdev/fsl_lbc.c | |
parent | 208b3a4c196e733b9cec006dc132cfc149b2810a (diff) |
powerpc/fsl_lbc: Add workaround for ELBC-A001 erratum
Simultaneous FCM and GPCM or UPM operation may erroneously trigger
bus monitor timeout.
Set the local bus monitor timeout value to the maximum by setting
LBCR[BMT] = 0 and LBCR[BMTPS] = 0xF.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_lbc.c')
-rw-r--r-- | arch/powerpc/sysdev/fsl_lbc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c index 4fcb5a4e60dd..0608b1657da4 100644 --- a/arch/powerpc/sysdev/fsl_lbc.c +++ b/arch/powerpc/sysdev/fsl_lbc.c | |||
@@ -184,7 +184,8 @@ int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, u32 mar) | |||
184 | } | 184 | } |
185 | EXPORT_SYMBOL(fsl_upm_run_pattern); | 185 | EXPORT_SYMBOL(fsl_upm_run_pattern); |
186 | 186 | ||
187 | static int __devinit fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl) | 187 | static int __devinit fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl, |
188 | struct device_node *node) | ||
188 | { | 189 | { |
189 | struct fsl_lbc_regs __iomem *lbc = ctrl->regs; | 190 | struct fsl_lbc_regs __iomem *lbc = ctrl->regs; |
190 | 191 | ||
@@ -198,6 +199,10 @@ static int __devinit fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl) | |||
198 | /* Enable interrupts for any detected events */ | 199 | /* Enable interrupts for any detected events */ |
199 | out_be32(&lbc->lteir, LTEIR_ENABLE); | 200 | out_be32(&lbc->lteir, LTEIR_ENABLE); |
200 | 201 | ||
202 | /* Set the monitor timeout value to the maximum for erratum A001 */ | ||
203 | if (of_device_is_compatible(node, "fsl,elbc")) | ||
204 | clrsetbits_be32(&lbc->lbcr, LBCR_BMT, LBCR_BMTPS); | ||
205 | |||
201 | return 0; | 206 | return 0; |
202 | } | 207 | } |
203 | 208 | ||
@@ -304,7 +309,7 @@ static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev) | |||
304 | 309 | ||
305 | fsl_lbc_ctrl_dev->dev = &dev->dev; | 310 | fsl_lbc_ctrl_dev->dev = &dev->dev; |
306 | 311 | ||
307 | ret = fsl_lbc_ctrl_init(fsl_lbc_ctrl_dev); | 312 | ret = fsl_lbc_ctrl_init(fsl_lbc_ctrl_dev, dev->dev.of_node); |
308 | if (ret < 0) | 313 | if (ret < 0) |
309 | goto err; | 314 | goto err; |
310 | 315 | ||