summaryrefslogtreecommitdiff
path: root/board/anbernic
diff options
context:
space:
mode:
authorChris Morgan <[email protected]>2024-01-02 09:46:52 -0600
committerKever Yang <[email protected]>2024-01-19 10:57:36 +0800
commitd2048bafae4014fbfacb2fc860da72c1bc525354 (patch)
treee00095dee7edfdbd914e737ec76fa80365b037eb /board/anbernic
parent4913ce37c4400e44598a8dfe2162f4351c4c025e (diff)
rockchip: board: Add board_rng_seed() for all Rockchip devices
Allow all rockchip devices to use the hardware RNG to seed Linux RNG. Signed-off-by: Chris Morgan <[email protected]> Reviewed-by: Kever Yang <[email protected]>
Diffstat (limited to 'board/anbernic')
-rw-r--r--board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c
index 3d0c6146233..3ff2e9493f9 100644
--- a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c
+++ b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c
@@ -16,7 +16,6 @@
#include <mmc.h>
#include <panel.h>
#include <pwm.h>
-#include <rng.h>
#include <stdlib.h>
#include <video_bridge.h>
@@ -133,34 +132,6 @@ void spl_board_init(void)
(GPIO0_BASE + GPIO_SWPORT_DR_H));
}
-/* Use hardware rng to seed Linux random. */
-int board_rng_seed(struct abuf *buf)
-{
- struct udevice *dev;
- size_t len = 0x8;
- u64 *data;
-
- data = malloc(len);
- if (!data) {
- printf("Out of memory\n");
- return -ENOMEM;
- }
-
- if (uclass_get_device(UCLASS_RNG, 0, &dev) || !dev) {
- printf("No RNG device\n");
- return -ENODEV;
- }
-
- if (dm_rng_read(dev, data, len)) {
- printf("Reading RNG failed\n");
- return -EIO;
- }
-
- abuf_init_set(buf, data, len);
-
- return 0;
-}
-
/*
* Buzz the buzzer so the user knows something is going on. Make it
* optional in case PWM is disabled.