lede/target/linux/rockchip/patches-5.4/801-char-add-support-for-rockchip-hardware-random-number.patch
CN_SZTL f4b1b358fe
rockchip: sync latest codes from ImmortalWrt (#6522)
uboot:
 - immortalwrt/immortalwrt@7a042afdee uboot-rockchip: fix RockPro64 boot from eMMC
 - immortalwrt/immortalwrt@f450acefb0 uboot-rockchip: update to v2021.01
 - immortalwrt/immortalwrt@5cc1d3df78 rockchip: improve support for NanoPi R4S
 - immortalwrt/immortalwrt@83d3fb9634 uboot-rockchip: add NanoPi R4S support
 - immortalwrt/immortalwrt@3d86ffedd7 uboot-rockchip: update to v2020.10
 - immortalwrt/immortalwrt@fe5fa0c7ab Revert "uboot-rockchip: fix nanopi-r2s failed to boot on some sd cards"

target:
 - immortalwrt/immortalwrt@f67522e532 rockchip: add support for Radxa Rock Pi 4
 - immortalwrt/immortalwrt@cd7fd0c77b rockchip: add NanoPi R4S support
 - immortalwrt/immortalwrt@02395293a2 rockchip: fix SUPPORTED_DEVICES for Radxa ROCK Pi 4
 - immortalwrt/immortalwrt@c7b200b8a2 rockchip: re-order patches
 - immortalwrt/immortalwrt@aee038e773 rockchip: refresh Kconfig
 - immortalwrt/immortalwrt@22061b2880 kernel: enable CONFIG_LEDS_TRIGGER_HEARTBEAT
 - immortalwrt/immortalwrt@b1150de9e4 rockchip: add missing Kconfig symbols
 - immortalwrt/immortalwrt@ab28d07c3b treewide: fix spelling 'seperate' -> 'separate'
 - immortalwrt/immortalwrt@6401fca74d rockchip: use native mac address for NanoPi R4S

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-14 11:52:00 +08:00

46 lines
1.5 KiB
Diff

From e5b5361651940ff5c0c1784dfd0130abec7ab535 Mon Sep 17 00:00:00 2001
From: wevsty <ty@wevs.org>
Date: Mon, 24 Aug 2020 02:27:11 +0800
Subject: [PATCH] char: add support for rockchip hardware random number
generator
This patch provides hardware random number generator support for all rockchip SOC.
rockchip-rng.c from https://github.com/rockchip-linux/kernel/blob/develop-4.4/drivers/char/hw_random/rockchip-rng.c
Signed-off-by: wevsty <ty@wevs.org>
---
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -345,6 +345,19 @@ config HW_RANDOM_STM32
If unsure, say N.
+config HW_RANDOM_ROCKCHIP
+ tristate "Rockchip Random Number Generator support"
+ depends on ARCH_ROCKCHIP
+ default HW_RANDOM
+ help
+ This driver provides kernel-side support for the Random Number
+ Generator hardware found on Rockchip cpus.
+
+ To compile this driver as a module, choose M here: the
+ module will be called rockchip-rng.
+
+ If unsure, say Y.
+
config HW_RANDOM_PIC32
tristate "Microchip PIC32 Random Number Generator support"
depends on HW_RANDOM && MACH_PIC32
--- a/drivers/char/hw_random/Makefile
+++ b/drivers/char/hw_random/Makefile
@@ -32,6 +32,7 @@ obj-$(CONFIG_HW_RANDOM_IPROC_RNG200) +=
obj-$(CONFIG_HW_RANDOM_ST) += st-rng.o
obj-$(CONFIG_HW_RANDOM_XGENE) += xgene-rng.o
obj-$(CONFIG_HW_RANDOM_STM32) += stm32-rng.o
+obj-$(CONFIG_HW_RANDOM_ROCKCHIP) += rockchip-rng.o
obj-$(CONFIG_HW_RANDOM_PIC32) += pic32-rng.o
obj-$(CONFIG_HW_RANDOM_MESON) += meson-rng.o
obj-$(CONFIG_HW_RANDOM_CAVIUM) += cavium-rng.o cavium-rng-vf.o