diff options
author | Krzysztof Hałasa <khc@pm.waw.pl> | 2010-03-23 15:22:13 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2012-11-21 22:35:39 -0500 |
commit | 553da857b1b917e27817b923ea2c786313620845 (patch) | |
tree | 647c231f16889b7e96187ce75eb0e83ba6a49c14 | |
parent | 87ba5c6a313b4da5639a18d7796e51483ededd17 (diff) |
IXP4xx: HW pseudo-random generator is available on IXP45x/46x only.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
-rw-r--r-- | drivers/char/hw_random/Kconfig | 6 | ||||
-rw-r--r-- | drivers/char/hw_random/ixp4xx-rng.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index fbd9b2b850e..c58ea9b80b1 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig | |||
@@ -127,12 +127,12 @@ config HW_RANDOM_VIA | |||
127 | If unsure, say Y. | 127 | If unsure, say Y. |
128 | 128 | ||
129 | config HW_RANDOM_IXP4XX | 129 | config HW_RANDOM_IXP4XX |
130 | tristate "Intel IXP4xx NPU HW Random Number Generator support" | 130 | tristate "Intel IXP4xx NPU HW Pseudo-Random Number Generator support" |
131 | depends on HW_RANDOM && ARCH_IXP4XX | 131 | depends on HW_RANDOM && ARCH_IXP4XX |
132 | default HW_RANDOM | 132 | default HW_RANDOM |
133 | ---help--- | 133 | ---help--- |
134 | This driver provides kernel-side support for the Random | 134 | This driver provides kernel-side support for the Pseudo-Random |
135 | Number Generator hardware found on the Intel IXP4xx NPU. | 135 | Number Generator hardware found on the Intel IXP45x/46x NPU. |
136 | 136 | ||
137 | To compile this driver as a module, choose M here: the | 137 | To compile this driver as a module, choose M here: the |
138 | module will be called ixp4xx-rng. | 138 | module will be called ixp4xx-rng. |
diff --git a/drivers/char/hw_random/ixp4xx-rng.c b/drivers/char/hw_random/ixp4xx-rng.c index 263567f5f39..beec1627db3 100644 --- a/drivers/char/hw_random/ixp4xx-rng.c +++ b/drivers/char/hw_random/ixp4xx-rng.c | |||
@@ -45,6 +45,9 @@ static int __init ixp4xx_rng_init(void) | |||
45 | void __iomem * rng_base; | 45 | void __iomem * rng_base; |
46 | int err; | 46 | int err; |
47 | 47 | ||
48 | if (!cpu_is_ixp46x()) /* includes IXP455 */ | ||
49 | return -ENOSYS; | ||
50 | |||
48 | rng_base = ioremap(0x70002100, 4); | 51 | rng_base = ioremap(0x70002100, 4); |
49 | if (!rng_base) | 52 | if (!rng_base) |
50 | return -ENOMEM; | 53 | return -ENOMEM; |
@@ -68,5 +71,5 @@ module_init(ixp4xx_rng_init); | |||
68 | module_exit(ixp4xx_rng_exit); | 71 | module_exit(ixp4xx_rng_exit); |
69 | 72 | ||
70 | MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>"); | 73 | MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>"); |
71 | MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for IXP4xx"); | 74 | MODULE_DESCRIPTION("H/W Pseudo-Random Number Generator (RNG) driver for IXP45x/46x"); |
72 | MODULE_LICENSE("GPL"); | 75 | MODULE_LICENSE("GPL"); |