[PATCH 1/2] hw_random: omap-rng: ignore clocks for OMAP3/4
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Jun 10 12:17:48 PDT 2025
We do not have clock drivers for OMAP, including the AM33xx.
The omap-rng driver calls clk_get_optional and so far this returned
NULL, because CONFIG_COMMON_CLK_OF_PROVIDER was disabled.
In configurations with the option enabled, we get understandably an
error code, which makes the drive defer probe indefinitely.
We are unlikely to add clock drivers for am33xx after all these years,
so just tweak the RNG driver to require clock driver support only on K3
SoCs.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/hw_random/omap-rng.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hw_random/omap-rng.c b/drivers/hw_random/omap-rng.c
index 6b69994aad0b..2028be650785 100644
--- a/drivers/hw_random/omap-rng.c
+++ b/drivers/hw_random/omap-rng.c
@@ -133,6 +133,7 @@ struct omap_rng_dev;
* @data_present: Callback to determine if data is available.
* @init: Callback for IP specific initialization sequence.
* @cleanup: Callback for IP specific cleanup sequence.
+ * @ignore_clocks: assume clocks are enabled (barebox-specific)
*/
struct omap_rng_pdata {
u16 *regs;
@@ -140,6 +141,7 @@ struct omap_rng_pdata {
u32 (*data_present)(struct omap_rng_dev *priv);
int (*init)(struct omap_rng_dev *priv);
void (*cleanup)(struct omap_rng_dev *priv);
+ bool ignore_clocks;
};
struct omap_rng_dev {
@@ -230,6 +232,7 @@ static struct omap_rng_pdata omap2_rng_pdata = {
.data_present = omap2_rng_data_present,
.init = omap2_rng_init,
.cleanup = omap2_rng_cleanup,
+ .ignore_clocks = true,
};
static inline u32 omap4_rng_data_present(struct omap_rng_dev *priv)
@@ -299,6 +302,7 @@ static struct omap_rng_pdata omap4_rng_pdata = {
.data_present = omap4_rng_data_present,
.init = omap4_rng_init,
.cleanup = omap4_rng_cleanup,
+ .ignore_clocks = true,
};
static struct omap_rng_pdata eip76_rng_pdata = {
--
2.39.5
More information about the barebox
mailing list