u-boot-amlogic archives
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Sughosh Ganu <sughosh.ganu@linaro.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Marko <robert.marko@sartura.hr>,
	Luka Kovacic <luka.kovacic@sartura.hr>,
	Luka Perkov <luka.perkov@sartura.hr>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Simon Glass <sjg@chromium.org>,
	Philipp Tomsich <philipp.tomsich@vrull.eu>,
	Kever Yang <kever.yang@rock-chips.com>,
	Etienne Carriere <etienne.carriere@linaro.org>,
	Andre Przywara <andre.przywara@arm.com>,
	Alexey Romanov <avromanov@salutedevices.com>,
	Chris Morgan <macromorgan@hotmail.com>,
	Lin Jinhan <troy.lin@rock-chips.com>,
	Gatien Chevallier <gatien.chevallier@foss.st.com>,
	Grzegorz Szymaszek <gszymaszek@short.pl>,
	u-boot@lists.denx.de, u-boot-amlogic@groups.io,
	uboot-stm32@st-md-mailman.stormreply.com,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Subject: [PATCH 1/1] rng: eliminate common.h include from RNG drivers
Date: Tue, 13 Feb 2024 00:44:47 +0100	[thread overview]
Message-ID: <20240212234448.39552-1-heinrich.schuchardt@canonical.com> (raw)

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>
---
 drivers/rng/arm_rndr.c     | 3 +--
 drivers/rng/iproc_rng200.c | 3 +--
 drivers/rng/meson-rng.c    | 1 -
 drivers/rng/msm_rng.c      | 5 ++---
 drivers/rng/npcm_rng.c     | 1 -
 drivers/rng/optee_rng.c    | 2 --
 drivers/rng/rng-uclass.c   | 1 -
 drivers/rng/rockchip_rng.c | 6 +++---
 drivers/rng/sandbox_rng.c  | 3 +--
 drivers/rng/smccc_trng.c   | 1 -
 drivers/rng/stm32_rng.c    | 4 +---
 include/rng.h              | 2 ++
 12 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/drivers/rng/arm_rndr.c b/drivers/rng/arm_rndr.c
index 4512330e68..bf54aec4f1 100644
--- a/drivers/rng/arm_rndr.c
+++ b/drivers/rng/arm_rndr.c
@@ -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"
 
diff --git a/drivers/rng/iproc_rng200.c b/drivers/rng/iproc_rng200.c
index 85ac15bf9c..4c49aa9e44 100644
--- a/drivers/rng/iproc_rng200.c
+++ b/drivers/rng/iproc_rng200.c
@@ -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))
 
diff --git a/drivers/rng/meson-rng.c b/drivers/rng/meson-rng.c
index fd2988e91b..49037d1165 100644
--- a/drivers/rng/meson-rng.c
+++ b/drivers/rng/meson-rng.c
@@ -5,7 +5,6 @@
  * Driver for Amlogic hardware random number generator
  */
 
-#include <common.h>
 #include <clk.h>
 #include <dm.h>
 #include <rng.h>
diff --git a/drivers/rng/msm_rng.c b/drivers/rng/msm_rng.c
index 29e7354ece..658c153d3e 100644
--- a/drivers/rng/msm_rng.c
+++ b/drivers/rng/msm_rng.c
@@ -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
diff --git a/drivers/rng/npcm_rng.c b/drivers/rng/npcm_rng.c
index 70c1c032b6..3922acad5b 100644
--- a/drivers/rng/npcm_rng.c
+++ b/drivers/rng/npcm_rng.c
@@ -3,7 +3,6 @@
  * Copyright (c) 2022 Nuvoton Technology Corp.
  */
 
-#include <common.h>
 #include <dm.h>
 #include <malloc.h>
 #include <rng.h>
diff --git a/drivers/rng/optee_rng.c b/drivers/rng/optee_rng.c
index 410dfc053f..f692681022 100644
--- a/drivers/rng/optee_rng.c
+++ b/drivers/rng/optee_rng.c
@@ -4,8 +4,6 @@
  */
 #define LOG_CATEGORY UCLASS_RNG
 
-#include <common.h>
-
 #include <rng.h>
 #include <tee.h>
 #include <dm/device.h>
diff --git a/drivers/rng/rng-uclass.c b/drivers/rng/rng-uclass.c
index 53108e1b31..06ddfa14ac 100644
--- a/drivers/rng/rng-uclass.c
+++ b/drivers/rng/rng-uclass.c
@@ -5,7 +5,6 @@
 
 #define LOG_CATEGORY UCLASS_RNG
 
-#include <common.h>
 #include <dm.h>
 #include <rng.h>
 
diff --git a/drivers/rng/rockchip_rng.c b/drivers/rng/rockchip_rng.c
index 705b424cf3..ce5cbee30a 100644
--- a/drivers/rng/rockchip_rng.c
+++ b/drivers/rng/rockchip_rng.c
@@ -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
 
diff --git a/drivers/rng/sandbox_rng.c b/drivers/rng/sandbox_rng.c
index cc5e1f6e25..071a3228e8 100644
--- a/drivers/rng/sandbox_rng.c
+++ b/drivers/rng/sandbox_rng.c
@@ -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)
diff --git a/drivers/rng/smccc_trng.c b/drivers/rng/smccc_trng.c
index 3a4bb33941..5bb7ebe8a4 100644
--- a/drivers/rng/smccc_trng.c
+++ b/drivers/rng/smccc_trng.c
@@ -5,7 +5,6 @@
 
 #define LOG_CATEGORY UCLASS_RNG
 
-#include <common.h>
 #include <dm.h>
 #include <linker_lists.h>
 #include <log.h>
diff --git a/drivers/rng/stm32_rng.c b/drivers/rng/stm32_rng.c
index c397b4d95c..61d5ed6158 100644
--- a/drivers/rng/stm32_rng.c
+++ b/drivers/rng/stm32_rng.c
@@ -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>
 
diff --git a/include/rng.h b/include/rng.h
index 37af554363..87e26f5647 100644
--- a/include/rng.h
+++ b/include/rng.h
@@ -6,6 +6,8 @@
 #if !defined _RNG_H_
 #define _RNG_H_
 
+#include <linux/types.h>
+
 struct udevice;
 
 /**
-- 
2.43.0



             reply	other threads:[~2024-02-13  8:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 23:44 Heinrich Schuchardt [this message]
2024-03-04 15:27 ` [PATCH 1/1] rng: eliminate common.h include from RNG drivers Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240212234448.39552-1-heinrich.schuchardt@canonical.com \
    --to=heinrich.schuchardt@canonical.com \
    --cc=andre.przywara@arm.com \
    --cc=avromanov@salutedevices.com \
    --cc=etienne.carriere@linaro.org \
    --cc=gatien.chevallier@foss.st.com \
    --cc=gszymaszek@short.pl \
    --cc=kever.yang@rock-chips.com \
    --cc=luka.kovacic@sartura.hr \
    --cc=luka.perkov@sartura.hr \
    --cc=macromorgan@hotmail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=robert.marko@sartura.hr \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@linaro.org \
    --cc=troy.lin@rock-chips.com \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).