aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/hw_random/stm32-rng.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-02hwrng: stm32 - use semicolons rather than commas to separate statementsJulia Lawall1-4/+4
Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // <smpl> @@ expression e1,e2; @@ e1 -, +; e2 ... when any // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-05-24treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 110Thomas Gleixner1-10/+1
Based on 1 normalized pattern(s): this file is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this file is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-04-15hwrng: stm32 - set default random qualityLionel Debieve1-0/+1
Add a default quality to hw_random device to be automatically set as new default entropy. Setting random quality will decrease the crng init time by switching to this hardware random source. Signed-off-by: Lionel Debieve <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2019-04-15hwrng: stm32 - fix unbalanced pm_runtime_enableLionel Debieve1-0/+8
No remove function implemented yet in the driver. Without remove function, the pm_runtime implementation complains when removing and probing again the driver. Signed-off-by: Lionel Debieve <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2018-05-05hwrng: stm32 - fix pm_suspend issue[email protected]1-2/+7
When suspend is called after pm_runtime_suspend, same callback is used and access to rng register is freezing system. By calling the pm_runtime_force_suspend, it first checks that runtime has been already done. Signed-off-by: Lionel Debieve <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2018-03-03hwrng: stm32 - rework read timeout calculation[email protected]1-15/+10
Increase timeout delay to support longer timing linked to rng initialization. Measurement is based on timer instead of instructions per iteration which is not powerful on all targets. Signed-off-by: Lionel Debieve <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2018-03-03hwrng: stm32 - allow disable clock error detection[email protected]1-1/+9
Add a new property that allow to disable the clock error detection which is required when the clock source selected is out of specification (which is not mandatory). Signed-off-by: Lionel Debieve <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2018-03-03hwrng: stm32 - add reset during probe[email protected]1-0/+9
Avoid issue when probing the RNG without reset if bad status has been detected previously Signed-off-by: Lionel Debieve <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2016-05-31hwrng: stm32 - fix maybe uninitialized variable warningMaxime Coquelin1-5/+5
This patch fixes the following warning: drivers/char/hw_random/stm32-rng.c: In function 'stm32_rng_read': drivers/char/hw_random/stm32-rng.c:82:19: warning: 'sr' may be used uninitialized in this function Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Arnd Bergmann <[email protected]> Cc: Daniel Thompson <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2015-10-15hwrng: stm32 - Fix build with CONFIG_PMDaniel Thompson1-2/+2
Commit c6a97c42e399 ("hwrng: stm32 - add support for STM32 HW RNG") was inadequately tested (actually it was tested quite hard so incompetent would be a better description that inadequate) and does not compile on platforms with CONFIG_PM set. Fix this. Signed-off-by: Daniel Thompson <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2015-10-14hwrng: stm32 - add support for STM32 HW RNGDaniel Thompson1-0/+202
Add support for STMicroelectronics STM32 random number generator. The config value defaults to N, reflecting the fact that STM32 is a very low resource microcontroller platform and unlikely to be targeted by any "grown up" defconfigs. Signed-off-by: Daniel Thompson <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Herbert Xu <[email protected]>