summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2019-05-27 06:13:59 -0400
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-06-01 16:38:56 -0400
commit3e483e59c79601ea682aa67f9805da79716efab0 (patch)
treec877a798a1e1b1637922c8786c87b5631f95a066
parentc6af561a4ad0971c79faee397fa02fa085018fa3 (diff)
rtc: tegra: Turn into regular driver
Drivers registered with module_platform_driver_probe() are considered non-hotpluggable, which among other things means that they don't support deferred probe. However, recent changes in how the ARM SMMU works have required the BPMP (which is the clock provider on Tegra186 and later) be bound to the SMMU, which in turn means that the BPMP driver can defer probe and hence clocks become available much later than they used to. For most other drivers this is not a problem because they already properly support deferred probe, but rtc-tegra is the odd one out that now fails to probe and will therefore never be registered. Fix this by making the driver a regular driver that supports unloading and deferred probe. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/rtc/rtc-tegra.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index b68ba2dd1d36..8bbaea24926e 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -2,7 +2,7 @@
2/* 2/*
3 * An RTC driver for the NVIDIA Tegra 200 series internal RTC. 3 * An RTC driver for the NVIDIA Tegra 200 series internal RTC.
4 * 4 *
5 * Copyright (c) 2010, NVIDIA Corporation. 5 * Copyright (c) 2010-2019, NVIDIA Corporation.
6 */ 6 */
7 7
8#include <linux/clk.h> 8#include <linux/clk.h>
@@ -274,7 +274,7 @@ static const struct of_device_id tegra_rtc_dt_match[] = {
274}; 274};
275MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match); 275MODULE_DEVICE_TABLE(of, tegra_rtc_dt_match);
276 276
277static int __init tegra_rtc_probe(struct platform_device *pdev) 277static int tegra_rtc_probe(struct platform_device *pdev)
278{ 278{
279 struct tegra_rtc_info *info; 279 struct tegra_rtc_info *info;
280 struct resource *res; 280 struct resource *res;
@@ -406,6 +406,7 @@ static void tegra_rtc_shutdown(struct platform_device *pdev)
406} 406}
407 407
408static struct platform_driver tegra_rtc_driver = { 408static struct platform_driver tegra_rtc_driver = {
409 .probe = tegra_rtc_probe,
409 .remove = tegra_rtc_remove, 410 .remove = tegra_rtc_remove,
410 .shutdown = tegra_rtc_shutdown, 411 .shutdown = tegra_rtc_shutdown,
411 .driver = { 412 .driver = {
@@ -414,8 +415,7 @@ static struct platform_driver tegra_rtc_driver = {
414 .pm = &tegra_rtc_pm_ops, 415 .pm = &tegra_rtc_pm_ops,
415 }, 416 },
416}; 417};
417 418module_platform_driver(tegra_rtc_driver);
418module_platform_driver_probe(tegra_rtc_driver, tegra_rtc_probe);
419 419
420MODULE_AUTHOR("Jon Mayo <jmayo@nvidia.com>"); 420MODULE_AUTHOR("Jon Mayo <jmayo@nvidia.com>");
421MODULE_DESCRIPTION("driver for Tegra internal RTC"); 421MODULE_DESCRIPTION("driver for Tegra internal RTC");