Skip to content

Commit 9ad92bd

Browse files
Lee Jonesherbertx
authored andcommitted
hwrng: st - Improve FIFO size/depth description
The original representation of FIFO size in the driver coupled with the ambiguity in the documentation meant that it was easy to confuse readers. This lead to a false positive BUG-find and subsequently time wastage debugging this phantom issue. Hopefully this patch can prevent future readers from falling into the same trap. Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 93d649b commit 9ad92bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/char/hw_random/st-rng.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
#define ST_RNG_STATUS_BAD_ALTERNANCE BIT(1)
3030
#define ST_RNG_STATUS_FIFO_FULL BIT(5)
3131

32-
#define ST_RNG_FIFO_SIZE 8
3332
#define ST_RNG_SAMPLE_SIZE 2 /* 2 Byte (16bit) samples */
33+
#define ST_RNG_FIFO_DEPTH 4
34+
#define ST_RNG_FIFO_SIZE (ST_RNG_FIFO_DEPTH * ST_RNG_SAMPLE_SIZE)
3435

3536
/*
3637
* Samples are documented to be available every 0.667us, so in theory

0 commit comments

Comments
 (0)