@@ -129,6 +129,16 @@ static void dwc3_imx8mp_wakeup_disable(struct dwc3_imx8mp *dwc3_imx)
129
129
writel (val , dwc3_imx -> hsio_blk_base + USB_WAKEUP_CTRL );
130
130
}
131
131
132
+ static const struct property_entry dwc3_imx8mp_properties [] = {
133
+ PROPERTY_ENTRY_BOOL ("xhci-missing-cas-quirk" ),
134
+ PROPERTY_ENTRY_BOOL ("xhci-skip-phy-init-quirk" ),
135
+ {},
136
+ };
137
+
138
+ static const struct software_node dwc3_imx8mp_swnode = {
139
+ .properties = dwc3_imx8mp_properties ,
140
+ };
141
+
132
142
static irqreturn_t dwc3_imx8mp_interrupt (int irq , void * _dwc3_imx )
133
143
{
134
144
struct dwc3_imx8mp * dwc3_imx = _dwc3_imx ;
@@ -148,17 +158,6 @@ static irqreturn_t dwc3_imx8mp_interrupt(int irq, void *_dwc3_imx)
148
158
return IRQ_HANDLED ;
149
159
}
150
160
151
- static int dwc3_imx8mp_set_software_node (struct device * dev )
152
- {
153
- struct property_entry props [3 ] = { 0 };
154
- int prop_idx = 0 ;
155
-
156
- props [prop_idx ++ ] = PROPERTY_ENTRY_BOOL ("xhci-missing-cas-quirk" );
157
- props [prop_idx ++ ] = PROPERTY_ENTRY_BOOL ("xhci-skip-phy-init-quirk" );
158
-
159
- return device_create_managed_software_node (dev , props , NULL );
160
- }
161
-
162
161
static int dwc3_imx8mp_probe (struct platform_device * pdev )
163
162
{
164
163
struct device * dev = & pdev -> dev ;
@@ -221,17 +220,17 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
221
220
if (err < 0 )
222
221
goto disable_rpm ;
223
222
224
- err = dwc3_imx8mp_set_software_node (dev );
223
+ err = device_add_software_node (dev , & dwc3_imx8mp_swnode );
225
224
if (err ) {
226
225
err = - ENODEV ;
227
- dev_err (dev , "failed to create software node\n" );
226
+ dev_err (dev , "failed to add software node\n" );
228
227
goto disable_rpm ;
229
228
}
230
229
231
230
err = of_platform_populate (node , NULL , NULL , dev );
232
231
if (err ) {
233
232
dev_err (& pdev -> dev , "failed to create dwc3 core\n" );
234
- goto disable_rpm ;
233
+ goto remove_swnode ;
235
234
}
236
235
237
236
dwc3_imx -> dwc3 = of_find_device_by_node (dwc3_np );
@@ -255,6 +254,8 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
255
254
256
255
depopulate :
257
256
of_platform_depopulate (dev );
257
+ remove_swnode :
258
+ device_remove_software_node (dev );
258
259
disable_rpm :
259
260
pm_runtime_disable (dev );
260
261
pm_runtime_put_noidle (dev );
@@ -268,6 +269,7 @@ static void dwc3_imx8mp_remove(struct platform_device *pdev)
268
269
269
270
pm_runtime_get_sync (dev );
270
271
of_platform_depopulate (dev );
272
+ device_remove_software_node (dev );
271
273
272
274
pm_runtime_disable (dev );
273
275
pm_runtime_put_noidle (dev );
0 commit comments