]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
rng: eliminate common.h include from RNG drivers
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 12 Feb 2024 23:44:47 +0000 (00:44 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 2 Mar 2024 17:26:19 +0000 (12:26 -0500)
Usage of common.h is deprecated.

* Remove common.h from RNG drivers.
* Sort includes.
* Add time.h to sandbox driver.
* Add linux/types.h to rng.h to provide size_t.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
12 files changed:
drivers/rng/arm_rndr.c
drivers/rng/iproc_rng200.c
drivers/rng/meson-rng.c
drivers/rng/msm_rng.c
drivers/rng/npcm_rng.c
drivers/rng/optee_rng.c
drivers/rng/rng-uclass.c
drivers/rng/rockchip_rng.c
drivers/rng/sandbox_rng.c
drivers/rng/smccc_trng.c
drivers/rng/stm32_rng.c
include/rng.h

index 4512330e68dfcc46a06e8c42be4315ed6557ec82..bf54aec4f1f21b5da9eab3c13ee33b9b71ad1274 100644 (file)
@@ -9,11 +9,10 @@
 
 #define LOG_CATEGORY UCLASS_RNG
 
-#include <common.h>
 #include <dm.h>
-#include <linux/kernel.h>
 #include <rng.h>
 #include <asm/system.h>
+#include <linux/kernel.h>
 
 #define DRIVER_NAME    "arm-rndr"
 
index 85ac15bf9ca9ff217f37bff397622eefcbd48614..4c49aa9e4446278f571ae5127f11d244448b2edb 100644 (file)
@@ -5,11 +5,10 @@
  * Driver for Raspberry Pi hardware random number generator
  */
 
-#include <common.h>
 #include <dm.h>
-#include <linux/delay.h>
 #include <rng.h>
 #include <asm/io.h>
+#include <linux/delay.h>
 
 #define usleep_range(a, b) udelay((b))
 
index fd2988e91b5a9ca2d0f846b557e76379bd410ca3..49037d1165686bec71e461fd12d93d9cd05b0160 100644 (file)
@@ -5,7 +5,6 @@
  * Driver for Amlogic hardware random number generator
  */
 
-#include <common.h>
 #include <clk.h>
 #include <dm.h>
 #include <rng.h>
index 29e7354ece5f24d0cba9b580a4fdda2f170f71ea..658c153d3edb2590b0b470e3067da9aac76169ac 100644 (file)
@@ -9,12 +9,11 @@
  * Based on Linux driver
  */
 
-#include <asm/io.h>
 #include <clk.h>
-#include <common.h>
 #include <dm.h>
-#include <linux/bitops.h>
 #include <rng.h>
+#include <asm/io.h>
+#include <linux/bitops.h>
 
 /* Device specific register offsets */
 #define PRNG_DATA_OUT          0x0000
index 70c1c032b6d31d56b8a1299171217cfaec091863..3922acad5bbeb3535b91ec154adc5ff7182537f5 100644 (file)
@@ -3,7 +3,6 @@
  * Copyright (c) 2022 Nuvoton Technology Corp.
  */
 
-#include <common.h>
 #include <dm.h>
 #include <malloc.h>
 #include <rng.h>
index 410dfc053f1e98c4da0044cecfd38873ad32e064..f692681022a9995d638ed7a25f53ff05bd935bf8 100644 (file)
@@ -4,8 +4,6 @@
  */
 #define LOG_CATEGORY UCLASS_RNG
 
-#include <common.h>
-
 #include <rng.h>
 #include <tee.h>
 #include <dm/device.h>
index 53108e1b3191638cd98eaab2196d63723a97f90e..06ddfa14ac8e2bfa20d4f93bdc43f9af5af55faa 100644 (file)
@@ -5,7 +5,6 @@
 
 #define LOG_CATEGORY UCLASS_RNG
 
-#include <common.h>
 #include <dm.h>
 #include <rng.h>
 
index 705b424cf3dd9a8f70df147a089b2906aea45f67..ce5cbee30ab46a33872143ee9f07d8e59aa55cee 100644 (file)
@@ -2,14 +2,14 @@
 /*
  * Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd
  */
+
+#include <dm.h>
+#include <rng.h>
 #include <asm/arch-rockchip/hardware.h>
 #include <asm/io.h>
-#include <common.h>
-#include <dm.h>
 #include <linux/bitops.h>
 #include <linux/iopoll.h>
 #include <linux/string.h>
-#include <rng.h>
 
 #define RK_HW_RNG_MAX 32
 
index cc5e1f6e25b67af9cbe6aa9afb2a52691940e323..071a3228e8a3eeaae47c16ba7d2e018446e330f7 100644 (file)
@@ -3,11 +3,10 @@
  * Copyright (c) 2019, Linaro Limited
  */
 
-#include <common.h>
 #include <dm.h>
 #include <rand.h>
 #include <rng.h>
-
+#include <time.h>
 #include <linux/string.h>
 
 static int sandbox_rng_read(struct udevice *dev, void *data, size_t len)
index 3a4bb3394159b5a912b772fc903fb60b34bbd7c8..5bb7ebe8a497620b99e521dea30cbea0548f99c7 100644 (file)
@@ -5,7 +5,6 @@
 
 #define LOG_CATEGORY UCLASS_RNG
 
-#include <common.h>
 #include <dm.h>
 #include <linker_lists.h>
 #include <log.h>
index c397b4d95cdb55381b4adc61c063f320c826b289..61d5ed615820236411f81306b1ec7de001ff9165 100644 (file)
@@ -5,16 +5,14 @@
 
 #define LOG_CATEGORY UCLASS_RNG
 
-#include <common.h>
 #include <clk.h>
 #include <dm.h>
 #include <log.h>
 #include <reset.h>
 #include <rng.h>
+#include <asm/io.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
-
-#include <asm/io.h>
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
 
index 37af554363170d3680aefe4fd581449a48d16c4e..87e26f5647e63dd3e2ca1b98fe617bb6a400813a 100644 (file)
@@ -6,6 +6,8 @@
 #if !defined _RNG_H_
 #define _RNG_H_
 
+#include <linux/types.h>
+
 struct udevice;
 
 /**