@@ -1469,8 +1469,7 @@ static int __maybe_unused sysc_noirq_suspend(struct device *dev)
14691469
14701470 ddata = dev_get_drvdata (dev );
14711471
1472- if (ddata -> cfg .quirks &
1473- (SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_NO_IDLE ))
1472+ if (ddata -> cfg .quirks & SYSC_QUIRK_NO_IDLE )
14741473 return 0 ;
14751474
14761475 if (!ddata -> enabled )
@@ -1488,8 +1487,7 @@ static int __maybe_unused sysc_noirq_resume(struct device *dev)
14881487
14891488 ddata = dev_get_drvdata (dev );
14901489
1491- if (ddata -> cfg .quirks &
1492- (SYSC_QUIRK_LEGACY_IDLE | SYSC_QUIRK_NO_IDLE ))
1490+ if (ddata -> cfg .quirks & SYSC_QUIRK_NO_IDLE )
14931491 return 0 ;
14941492
14951493 if (ddata -> cfg .quirks & SYSC_QUIRK_REINIT_ON_RESUME ) {
@@ -2457,89 +2455,6 @@ static int __maybe_unused sysc_child_runtime_resume(struct device *dev)
24572455 return pm_generic_runtime_resume (dev );
24582456}
24592457
2460- #ifdef CONFIG_PM_SLEEP
2461- static int sysc_child_suspend_noirq (struct device * dev )
2462- {
2463- struct sysc * ddata ;
2464- int error ;
2465-
2466- ddata = sysc_child_to_parent (dev );
2467-
2468- dev_dbg (ddata -> dev , "%s %s\n" , __func__ ,
2469- ddata -> name ? ddata -> name : "" );
2470-
2471- error = pm_generic_suspend_noirq (dev );
2472- if (error ) {
2473- dev_err (dev , "%s error at %i: %i\n" ,
2474- __func__ , __LINE__ , error );
2475-
2476- return error ;
2477- }
2478-
2479- if (!pm_runtime_status_suspended (dev )) {
2480- error = pm_generic_runtime_suspend (dev );
2481- if (error ) {
2482- dev_dbg (dev , "%s busy at %i: %i\n" ,
2483- __func__ , __LINE__ , error );
2484-
2485- return 0 ;
2486- }
2487-
2488- error = sysc_runtime_suspend (ddata -> dev );
2489- if (error ) {
2490- dev_err (dev , "%s error at %i: %i\n" ,
2491- __func__ , __LINE__ , error );
2492-
2493- return error ;
2494- }
2495-
2496- ddata -> child_needs_resume = true;
2497- }
2498-
2499- return 0 ;
2500- }
2501-
2502- static int sysc_child_resume_noirq (struct device * dev )
2503- {
2504- struct sysc * ddata ;
2505- int error ;
2506-
2507- ddata = sysc_child_to_parent (dev );
2508-
2509- dev_dbg (ddata -> dev , "%s %s\n" , __func__ ,
2510- ddata -> name ? ddata -> name : "" );
2511-
2512- if (ddata -> child_needs_resume ) {
2513- ddata -> child_needs_resume = false;
2514-
2515- error = sysc_runtime_resume (ddata -> dev );
2516- if (error )
2517- dev_err (ddata -> dev ,
2518- "%s runtime resume error: %i\n" ,
2519- __func__ , error );
2520-
2521- error = pm_generic_runtime_resume (dev );
2522- if (error )
2523- dev_err (ddata -> dev ,
2524- "%s generic runtime resume: %i\n" ,
2525- __func__ , error );
2526- }
2527-
2528- return pm_generic_resume_noirq (dev );
2529- }
2530- #endif
2531-
2532- static struct dev_pm_domain sysc_child_pm_domain = {
2533- .ops = {
2534- SET_RUNTIME_PM_OPS (sysc_child_runtime_suspend ,
2535- sysc_child_runtime_resume ,
2536- NULL )
2537- USE_PLATFORM_PM_SLEEP_OPS
2538- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS (sysc_child_suspend_noirq ,
2539- sysc_child_resume_noirq )
2540- }
2541- };
2542-
25432458/* Caller needs to take list_lock if ever used outside of cpu_pm */
25442459static void sysc_reinit_modules (struct sysc_soc_info * soc )
25452460{
@@ -2610,25 +2525,6 @@ static void sysc_add_restored(struct sysc *ddata)
26102525 mutex_unlock (& sysc_soc -> list_lock );
26112526}
26122527
2613- /**
2614- * sysc_legacy_idle_quirk - handle children in omap_device compatible way
2615- * @ddata: device driver data
2616- * @child: child device driver
2617- *
2618- * Allow idle for child devices as done with _od_runtime_suspend().
2619- * Otherwise many child devices will not idle because of the permanent
2620- * parent usecount set in pm_runtime_irq_safe().
2621- *
2622- * Note that the long term solution is to just modify the child device
2623- * drivers to not set pm_runtime_irq_safe() and then this can be just
2624- * dropped.
2625- */
2626- static void sysc_legacy_idle_quirk (struct sysc * ddata , struct device * child )
2627- {
2628- if (ddata -> cfg .quirks & SYSC_QUIRK_LEGACY_IDLE )
2629- dev_pm_domain_set (child , & sysc_child_pm_domain );
2630- }
2631-
26322528static int sysc_notifier_call (struct notifier_block * nb ,
26332529 unsigned long event , void * device )
26342530{
@@ -2645,7 +2541,6 @@ static int sysc_notifier_call(struct notifier_block *nb,
26452541 error = sysc_child_add_clocks (ddata , dev );
26462542 if (error )
26472543 return error ;
2648- sysc_legacy_idle_quirk (ddata , dev );
26492544 break ;
26502545 default :
26512546 break ;
0 commit comments