~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/powerpc/sysdev/fsl_lbc.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
}
185
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
190
        struct fsl_lbc_regs __iomem *lbc = ctrl->regs;
190
191
 
195
196
        out_be32(&lbc->lteccr, LTECCR_CLEAR);
196
197
        out_be32(&lbc->ltedr, LTEDR_ENABLE);
197
198
 
198
 
        /* Enable interrupts for any detected events */
199
 
        out_be32(&lbc->lteir, LTEIR_ENABLE);
 
199
        /* Set the monitor timeout value to the maximum for erratum A001 */
 
200
        if (of_device_is_compatible(node, "fsl,elbc"))
 
201
                clrsetbits_be32(&lbc->lbcr, LBCR_BMT, LBCR_BMTPS);
200
202
 
201
203
        return 0;
202
204
}
304
306
 
305
307
        fsl_lbc_ctrl_dev->dev = &dev->dev;
306
308
 
307
 
        ret = fsl_lbc_ctrl_init(fsl_lbc_ctrl_dev);
 
309
        ret = fsl_lbc_ctrl_init(fsl_lbc_ctrl_dev, dev->dev.of_node);
308
310
        if (ret < 0)
309
311
                goto err;
310
312
 
317
319
                goto err;
318
320
        }
319
321
 
 
322
        /* Enable interrupts for any detected events */
 
323
        out_be32(&fsl_lbc_ctrl_dev->regs->lteir, LTEIR_ENABLE);
 
324
 
320
325
        return 0;
321
326
 
322
327
err: