[OpenWrt-Devel] [Patch][BCM63XX] Select HW_RANDOM_BCM63XX only in the SoCs that support it.
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 a driver that has no effect. Tested with BCM6358 and BCM6328 successfully. Signed off by: José Vázquez Fernández ppvazquez...@gmail.com diff -urN a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig --- a/drivers/char/hw_random/Kconfig 2014-06-06 12:21:38.677781666 +0200 +++ b/drivers/char/hw_random/Kconfig 2014-06-05 20:58:11.0 +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 (BCM63XX_CPU_6362 || BCM63XX_CPU_6368 || BCM63XX_CPU_63268) default HW_RANDOM ---help--- This driver provides kernel-side support for the Random Number ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [Patch][BCM63XX] Select HW_RANDOM_BCM63XX only in the SoCs that support it.
2014-06-06 12:46 GMT-07:00 José Vázquez Fernández ppvazquez...@gmail.com: 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 a driver that has no effect. Tested with BCM6358 and BCM6328 successfully. How about a Kconfig symbol such as BCM63XX_HAS_HWRANDOM that gets selected by only the SoCs that support it? Hopefully in the future, this list should grow rather than shrink. Signed off by: José Vázquez Fernández ppvazquez...@gmail.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Florian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [Patch][BCM63XX] Select HW_RANDOM_BCM63XX only in the SoCs that support it.
On Fri, Jun 6, 2014 at 9:52 PM, Florian Fainelli flor...@openwrt.org wrote: 2014-06-06 12:46 GMT-07:00 José Vázquez Fernández ppvazquez...@gmail.com: 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 a driver that has no effect. Tested with BCM6358 and BCM6328 successfully. How about a Kconfig symbol such as BCM63XX_HAS_HWRANDOM that gets selected by only the SoCs that support it? Hopefully in the future, this list should grow rather than shrink. I think if you do the effort of disabling specific SoC support, then it isn't too much asked to also manually de-select the rng driver. Also I think that we should go the other way and allow compilation of it for !BCM63XX if COMPILE_TEST is enabled, to allow better build test coverage. And finally, these kind of patches should go to linux-mips. Regards Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [Patch][BCM63XX] Select HW_RANDOM_BCM63XX only in the SoCs that support it.
2014-06-06 22:00 GMT+02:00, Jonas Gorski j...@openwrt.org: On Fri, Jun 6, 2014 at 9:52 PM, Florian Fainelli flor...@openwrt.org wrote: 2014-06-06 12:46 GMT-07:00 José Vázquez Fernández ppvazquez...@gmail.com: 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 a driver that has no effect. Tested with BCM6358 and BCM6328 successfully. How about a Kconfig symbol such as BCM63XX_HAS_HWRANDOM that gets selected by only the SoCs that support it? Hopefully in the future, this list should grow rather than shrink. I think if you do the effort of disabling specific SoC support, then it isn't too much asked to also manually de-select the rng driver. If you deselect HW_RANDOM, when compiling the kernel sends an error, which is the reason of the patch. Also I think that we should go the other way and allow compilation of it for !BCM63XX if COMPILE_TEST is enabled, to allow better build test coverage. Do you mean something like this? http://lists.linaro.org/pipermail/linaro-kernel/2013-July/005078.html And finally, these kind of patches should go to linux-mips. Regards Jonas Are you sure about linux-mips? It scares me a bit. Would not be better publish a patch here and Florian, Kevin Cernekee or you send it with the adequate and professional description? Regards: Pepe ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel