@@ -295,6 +295,16 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
295
295
return - ENODEV ;
296
296
}
297
297
298
+ if (of_device_is_compatible (dev -> of_node , "aspeed,ast2600-lpc-ctrl" )) {
299
+ lpc_ctrl -> fwh2ahb = true;
300
+
301
+ lpc_ctrl -> scu = syscon_regmap_lookup_by_compatible ("aspeed,ast2600-scu" );
302
+ if (IS_ERR (lpc_ctrl -> scu )) {
303
+ dev_err (dev , "couldn't find scu\n" );
304
+ return PTR_ERR (lpc_ctrl -> scu );
305
+ }
306
+ }
307
+
298
308
lpc_ctrl -> clk = devm_clk_get (dev , NULL );
299
309
if (IS_ERR (lpc_ctrl -> clk )) {
300
310
dev_err (dev , "couldn't get clock\n" );
@@ -306,16 +316,6 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
306
316
return rc ;
307
317
}
308
318
309
- if (of_device_is_compatible (dev -> of_node , "aspeed,ast2600-lpc-ctrl" )) {
310
- lpc_ctrl -> fwh2ahb = true;
311
-
312
- lpc_ctrl -> scu = syscon_regmap_lookup_by_compatible ("aspeed,ast2600-scu" );
313
- if (IS_ERR (lpc_ctrl -> scu )) {
314
- dev_err (dev , "couldn't find scu\n" );
315
- return PTR_ERR (lpc_ctrl -> scu );
316
- }
317
- }
318
-
319
319
lpc_ctrl -> miscdev .minor = MISC_DYNAMIC_MINOR ;
320
320
lpc_ctrl -> miscdev .name = DEVICE_NAME ;
321
321
lpc_ctrl -> miscdev .fops = & aspeed_lpc_ctrl_fops ;
0 commit comments