diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-11-01 13:10:30 +0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-11-01 13:10:30 +0300 |
| commit | 875eaa399042064c4ba08a56919f12ade8ea6cb9 (patch) | |
| tree | 34c754e6174795aee4830e9363af47217ebbd475 /drivers/reset/reset-socfpga.c | |
| parent | 10269a2ca2b08cbdda9232771e59ba901b87a074 (diff) | |
| parent | 8bb7eca972ad531c9b149c0a51ab43a417385813 (diff) | |
| download | linux-875eaa399042064c4ba08a56919f12ade8ea6cb9.tar.xz | |
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/reset/reset-socfpga.c')
| -rw-r--r-- | drivers/reset/reset-socfpga.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c index 2a72f861f798..8c6492e5693c 100644 --- a/drivers/reset/reset-socfpga.c +++ b/drivers/reset/reset-socfpga.c @@ -92,3 +92,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); |
