summaryrefslogtreecommitdiff
path: root/drivers/reset
diff options
context:
space:
mode:
authorDenys Drozdov <denys.drozdov@toradex.com>2022-01-10 14:21:04 +0200
committerDenys Drozdov <denys.drozdov@toradex.com>2022-01-10 14:21:04 +0200
commit905e3a2de88e6fbf0e2c0d3f1ae4217a6f75e126 (patch)
tree5aca9cb53f47568803fabab9581eb3f11a1b65d5 /drivers/reset
parent73268bc9be0e8dc0b6c30d6a85b937b4586cc7f1 (diff)
parent17efa1a44c7f615e9ec321f82138e7711690e7a1 (diff)
Merge tag 'v5.4.160' into HEAD
This is the 5.4.160 stable release
Diffstat (limited to 'drivers/reset')
-rw-r--r--drivers/reset/reset-socfpga.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
index 96953992c2bb..1c5236a69dc4 100644
--- a/drivers/reset/reset-socfpga.c
+++ b/drivers/reset/reset-socfpga.c
@@ -86,3 +86,29 @@ void __init socfpga_reset_init(void)
for_each_matching_node(np, socfpga_early_reset_dt_ids)
a10_reset_init(np);
}
+
+/*
+ * The early driver is problematic, because it doesn't register
+ * itself as a driver. This causes certain device links to prevent
+ * consumer devices from probing. The hacky solution is to register
+ * an empty driver, whose only job is to attach itself to the reset
+ * manager and call probe.
+ */
+static const struct of_device_id socfpga_reset_dt_ids[] = {
+ { .compatible = "altr,rst-mgr", },
+ { /* sentinel */ },
+};
+
+static int reset_simple_probe(struct platform_device *pdev)
+{
+ return 0;
+}
+
+static struct platform_driver reset_socfpga_driver = {
+ .probe = reset_simple_probe,
+ .driver = {
+ .name = "socfpga-reset",
+ .of_match_table = socfpga_reset_dt_ids,
+ },
+};
+builtin_platform_driver(reset_socfpga_driver);