[OpenWrt-Devel] [Patch][BCM63XX][V2][RFC] Select HW_RANDOM_BCM63XX only in the SoCs that support it.
José Vázquez Fernández
ppvazquezfer at gmail.com
Wed Jun 18 11:34:41 EDT 2014
Select HW_RANDOM_BCM63XX only in the SoCs that support it.
Only BCM6368, BCM6362 and BCM63268 have a hardware random numbers
generator, so, if none of these are selected, don't compile it.
Tested with BCM6358 and BCM6328 successfully with both 3.10 and 3.14
kernels.
Signed off by: José Vázquez Fernández <ppvazquezfer at gmail.com>
diff -urN a/arch/mips/bcm63xx/Kconfig b/arch/mips/bcm63xx/Kconfig
--- a/arch/mips/bcm63xx/Kconfig 2014-06-02 16:00:48.000000000 +0200
+++ b/arch/mips/bcm63xx/Kconfig 2014-06-18 17:06:30.119106246 +0200
@@ -60,6 +60,7 @@
select HW_HAS_PCI
select BCM63XX_OHCI
select BCM63XX_EHCI
+ select BCM_RNG
config BCM63XX_CPU_6368
bool "support 6368 CPU"
@@ -67,6 +68,7 @@
select HW_HAS_PCI
select BCM63XX_OHCI
select BCM63XX_EHCI
+ select BCM_RNG
config BCM63XX_CPU_63268
bool "support 63268 CPU"
@@ -74,6 +76,10 @@
select HW_HAS_PCI
select BCM63XX_OHCI
select BCM63XX_EHCI
+ select BCM_RNG
endmenu
+config BCM_RNG
+ bool
+
source "arch/mips/bcm63xx/boards/Kconfig"
diff -urN a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
--- a/drivers/char/hw_random/Kconfig 2014-05-31 21:34:37.000000000 +0200
+++ b/drivers/char/hw_random/Kconfig 2014-06-18 17:03:53.127017691 +0200
@@ -75,7 +75,7 @@
config HW_RANDOM_BCM63XX
tristate "Broadcom BCM63xx Random Number Generator support"
- depends on HW_RANDOM && BCM63XX
+ depends on HW_RANDOM && (BCM_RNG || COMPILE_TEST)
default HW_RANDOM
---help---
This driver provides kernel-side support for the Random Number
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list