Commit dafe344d authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull bmc2835 crypto fix from Herbert Xu:
 "This fixes a potential boot crash on bcm2835 due to the recent change
  that now causes hardware RNGs to be accessed on registration"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  hwrng: bcm2835 - fix oops when rng h/w is accessed during registration
parents e79323bd eb4a5346
...@@ -61,18 +61,18 @@ static int bcm2835_rng_probe(struct platform_device *pdev) ...@@ -61,18 +61,18 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
} }
bcm2835_rng_ops.priv = (unsigned long)rng_base; bcm2835_rng_ops.priv = (unsigned long)rng_base;
/* set warm-up count & enable */
__raw_writel(RNG_WARMUP_COUNT, rng_base + RNG_STATUS);
__raw_writel(RNG_RBGEN, rng_base + RNG_CTRL);
/* register driver */ /* register driver */
err = hwrng_register(&bcm2835_rng_ops); err = hwrng_register(&bcm2835_rng_ops);
if (err) { if (err) {
dev_err(dev, "hwrng registration failed\n"); dev_err(dev, "hwrng registration failed\n");
iounmap(rng_base); iounmap(rng_base);
} else { } else
dev_info(dev, "hwrng registered\n"); dev_info(dev, "hwrng registered\n");
/* set warm-up count & enable */
__raw_writel(RNG_WARMUP_COUNT, rng_base + RNG_STATUS);
__raw_writel(RNG_RBGEN, rng_base + RNG_CTRL);
}
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment