File tree Expand file tree Collapse file tree 3 files changed +7
-48
lines changed Expand file tree Collapse file tree 3 files changed +7
-48
lines changed Original file line number Diff line number Diff line change @@ -272,23 +272,6 @@ static int ipa_runtime_idle(struct device *dev)
272
272
return - EAGAIN ;
273
273
}
274
274
275
- /* Get an IPA clock reference. If the reference count is non-zero, it is
276
- * incremented and return is immediate. Otherwise the IPA clock is
277
- * enabled.
278
- */
279
- int ipa_clock_get (struct ipa * ipa )
280
- {
281
- return pm_runtime_get_sync (& ipa -> pdev -> dev );
282
- }
283
-
284
- /* Attempt to remove an IPA clock reference. If this represents the
285
- * last reference, disable the IPA clock.
286
- */
287
- int ipa_clock_put (struct ipa * ipa )
288
- {
289
- return pm_runtime_put (& ipa -> pdev -> dev );
290
- }
291
-
292
275
static int ipa_suspend (struct device * dev )
293
276
{
294
277
struct ipa * ipa = dev_get_drvdata (dev );
Original file line number Diff line number Diff line change @@ -70,28 +70,4 @@ struct ipa_clock *ipa_clock_init(struct device *dev,
70
70
*/
71
71
void ipa_clock_exit (struct ipa_clock * clock );
72
72
73
- /**
74
- * ipa_clock_get() - Get an IPA clock reference
75
- * @ipa: IPA pointer
76
- *
77
- * Return: 0 if clock started, 1 if clock already running, or a negative
78
- * error code
79
- *
80
- * This call blocks if this is the first reference. A reference is
81
- * taken even if an error occurs starting the IPA clock.
82
- */
83
- int ipa_clock_get (struct ipa * ipa );
84
-
85
- /**
86
- * ipa_clock_put() - Drop an IPA clock reference
87
- * @ipa: IPA pointer
88
- *
89
- * Return: 0 if successful, or a negative error code
90
- *
91
- * This drops a clock reference. If the last reference is being dropped,
92
- * the clock is stopped and RX endpoints are suspended. This call will
93
- * not block unless the last reference is dropped.
94
- */
95
- int ipa_clock_put (struct ipa * ipa );
96
-
97
73
#endif /* _IPA_CLOCK_H_ */
Original file line number Diff line number Diff line change 21
21
22
22
#include <linux/types.h>
23
23
#include <linux/interrupt.h>
24
+ #include <linux/pm_runtime.h>
24
25
25
26
#include "ipa.h"
26
- #include "ipa_clock.h"
27
27
#include "ipa_reg.h"
28
28
#include "ipa_endpoint.h"
29
29
#include "ipa_interrupt.h"
@@ -80,14 +80,16 @@ static irqreturn_t ipa_isr_thread(int irq, void *dev_id)
80
80
struct ipa_interrupt * interrupt = dev_id ;
81
81
struct ipa * ipa = interrupt -> ipa ;
82
82
u32 enabled = interrupt -> enabled ;
83
+ struct device * dev ;
83
84
u32 pending ;
84
85
u32 offset ;
85
86
u32 mask ;
86
87
int ret ;
87
88
88
- ret = ipa_clock_get (ipa );
89
+ dev = & ipa -> pdev -> dev ;
90
+ ret = pm_runtime_get_sync (dev );
89
91
if (WARN_ON (ret < 0 ))
90
- goto out_clock_put ;
92
+ goto out_power_put ;
91
93
92
94
/* The status register indicates which conditions are present,
93
95
* including conditions whose interrupt is not enabled. Handle
@@ -108,15 +110,13 @@ static irqreturn_t ipa_isr_thread(int irq, void *dev_id)
108
110
109
111
/* If any disabled interrupts are pending, clear them */
110
112
if (pending ) {
111
- struct device * dev = & ipa -> pdev -> dev ;
112
-
113
113
dev_dbg (dev , "clearing disabled IPA interrupts 0x%08x\n" ,
114
114
pending );
115
115
offset = ipa_reg_irq_clr_offset (ipa -> version );
116
116
iowrite32 (pending , ipa -> reg_virt + offset );
117
117
}
118
- out_clock_put :
119
- (void )ipa_clock_put ( ipa );
118
+ out_power_put :
119
+ (void )pm_runtime_put ( dev );
120
120
121
121
return IRQ_HANDLED ;
122
122
}
You can’t perform that action at this time.
0 commit comments