Commit 553da857 authored by Krzysztof Hałasa's avatar Krzysztof Hałasa Committed by Jason Cooper

IXP4xx: HW pseudo-random generator is available on IXP45x/46x only.

Signed-off-by: default avatarKrzysztof Hałasa <khc@pm.waw.pl>
parent 87ba5c6a
...@@ -127,12 +127,12 @@ config HW_RANDOM_VIA ...@@ -127,12 +127,12 @@ config HW_RANDOM_VIA
If unsure, say Y. If unsure, say Y.
config HW_RANDOM_IXP4XX config HW_RANDOM_IXP4XX
tristate "Intel IXP4xx NPU HW Random Number Generator support" tristate "Intel IXP4xx NPU HW Pseudo-Random Number Generator support"
depends on HW_RANDOM && ARCH_IXP4XX depends on HW_RANDOM && ARCH_IXP4XX
default HW_RANDOM default HW_RANDOM
---help--- ---help---
This driver provides kernel-side support for the Random This driver provides kernel-side support for the Pseudo-Random
Number Generator hardware found on the Intel IXP4xx NPU. Number Generator hardware found on the Intel IXP45x/46x NPU.
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called ixp4xx-rng. module will be called ixp4xx-rng.
......
...@@ -45,6 +45,9 @@ static int __init ixp4xx_rng_init(void) ...@@ -45,6 +45,9 @@ static int __init ixp4xx_rng_init(void)
void __iomem * rng_base; void __iomem * rng_base;
int err; int err;
if (!cpu_is_ixp46x()) /* includes IXP455 */
return -ENOSYS;
rng_base = ioremap(0x70002100, 4); rng_base = ioremap(0x70002100, 4);
if (!rng_base) if (!rng_base)
return -ENOMEM; return -ENOMEM;
...@@ -68,5 +71,5 @@ module_init(ixp4xx_rng_init); ...@@ -68,5 +71,5 @@ module_init(ixp4xx_rng_init);
module_exit(ixp4xx_rng_exit); module_exit(ixp4xx_rng_exit);
MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>"); MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>");
MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for IXP4xx"); MODULE_DESCRIPTION("H/W Pseudo-Random Number Generator (RNG) driver for IXP45x/46x");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
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